Hi Tridge, > - Log ----------------------------------------------------------------- > commit d380c49791d1010d759369cab12d93b6fbd48dc7 > Author: Andrew Tridgell <[email protected]> > Date: Thu Mar 19 11:23:49 2009 +1100 > > use the tevent nesting code to avoid the uid problem in the VFS > backend > > The vfs_unixuid module changes the uid of the process when executing > operations on behalf of the user. Within the VFS backend we may rely > on semi-async calls, such as winbind calls, which will call the event > loop again. To cope with this we need to ensure that while inside > those calls we revert the uid to root, then revert back to the > connected user when we have finished with the semi-async calls. > > commit 13b6663e23a424473d14324ac229a21e1e90580a > Author: Andrew Tridgell <[email protected]> > Date: Thu Mar 19 11:21:36 2009 +1100 > > fixed a logic bug in the tevent nesting code > > The event nesting code never triggered as nesting.level was never > greater than 1. The main event loop needs to increase the nesting > level by 1.
That was desired, why do you want to be called if there's no nesting? you do if (unixuid_nesting_level == 0) return; anyway. If we change it to call the hook at level 0, we should change that in tevent_loop_once() and not in tevent_loop_wait(). > I also added a paranoia check to the nesting setup call. The API as > currently written cannot support multiple nesting hooks, so we need to > abort if multiple hooks are tried. I think we should have global in vfs_unixid.c which remembers that we already set the hook and not reset it on each tree connect. metze
signature.asc
Description: OpenPGP digital signature
