[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-557-gd380c49

Stefan (metze) Metzmacher metze at samba.org
Thu Mar 19 12:36:32 GMT 2009


Hi Tridge,

> - Log -----------------------------------------------------------------
> commit d380c49791d1010d759369cab12d93b6fbd48dc7
> Author: Andrew Tridgell <tridge at samba.org>
> 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 <tridge at samba.org>
> 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.samba.org/archive/samba-technical/attachments/20090319/75220a8b/signature.bin


More information about the samba-technical mailing list