libreplace on Linux was (Re: Changing back to per-thread credentials on Linux (fixing native AIO).)
Jeremy Allison
jra at samba.org
Thu Jun 28 09:25:10 MDT 2012
On Thu, Jun 28, 2012 at 05:19:05PM +0200, Michael Adam wrote:
>
> I think both requests are reasonable.
> I believe (because I don't know enough about libc internals to
> really judge) that you can fix the issues with the syscall tricks.
I do, and yes it's the only way :-). It is done
this way in the userspace threaded NFS server ganesha.
> And having a small patch is of course good.
>
> The patches themselves look clean to me.
> And the size of the patch using the libreplace approach is
> really appealing, maybe too seductive.
>
> But if design says it may not be done this way in libreplace,
> then the patch needs to be bigger. Can we create an abstraction
> layer where we can replace the standard setFOOid calls with the
> special linux syscall variants? Something like vfs?
> Or maybe it is sufficient to decide it at configure/compile time?
Another abstraction layer is too heavyweight. We need to
rename all setXXid() calls to samba_setXXid() calls
and then add setid.c into lib/util if we're doing it
without libreplace.
The real headache is uid_wrapper, which is embedded
inside lib/replace and complicates the rename. To
make this work uid_wrapper has to be moved out of
libreplace as it's a Samba-specific library anyway.
Jeremy.
More information about the samba-technical
mailing list