Patchset to add asynchronous open/close to master

simo idra at samba.org
Thu Jun 21 16:15:03 MDT 2012


On Thu, 2012-06-21 at 15:02 -0700, Jeremy Allison wrote: 
> On Thu, Jun 21, 2012 at 05:55:48PM -0400, simo wrote:
> > 
> > Neat,
> > should we add some abort() calls to check the next time glibc decides to
> > use SETXID on anything ... who know some smart fella may decide to set
> > it on getpid() :-P
> 
> I think we only need to care about the setxxx
> calls, not any of the getxxx calls.
> 
> And we never call the setxx calls directly,
> but always through the wrappers in source3/lib/util_sec.c
> so if we make them call the syscalls directly we should be
> ok (IMHO). Plus the wrappers always do a getXXX
> check afterwards to ensure the set succeeded, and
> abort the entire process if any of them failed.

Why the getxxx ?
Don't we get an error back from the syscal if it fails ?

However the problem I was hinting is at how to find that someone changed
the id from under us, so I was wondering if we should have a geteuid()
right before the open and crap out if it doesn't match what we need ...
maybe we could have that enabled only with configure.developer() to
avoid adding more syscalls in production to the open path.

Simo. 

-- 
Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Principal Software Engineer at Red Hat, Inc. <simo at redhat.com>



More information about the samba-technical mailing list