new ldb group mapping code

simo idra at samba.org
Wed Sep 27 05:24:24 GMT 2006


On Wed, 2006-09-27 at 13:45 +1000, tridge at samba.org wrote:
> Jerry,
> 
>  > > But I can seem to find where to set the perms in the open.
>  > 
>  > Why is the 0666 mode hard coded in the open?
> 
> wel, strictly speaking its doing what all good libraries should do on
> posix systems, which is to obey the umask() set by the admin.
> 
> Unfortunately for various historical reasons, both Samba3 and Samba4
> smbd force umask(0) at startup, which screws up libs like ldb (I seem
> to remember putting that in smbd, so its my fault for being ignorant
> of posix conventions at the time).
> 
> For now I've changed ldb to use 0644, but that of course means a
> sysadmin can't create a ldb with the permissions they want in a shell
> script (using for example ldbadd). Longer term we should fix smbd to
> not use the umask(0) trick.
> 
> I guess we could have some sort of ldb_set_umask() call after
> ldb_init() and before ldb_connect() instead. Then we could make
> 'normal' ldb usage obey posix conventions and make smbd call
> ldb_set_umask() to allow it continue with its wicked ways.
> 
> Simo, any comment on your preferred approach?

I like the ldb_set_umask() approach.
ldb's are often created using the ldb tools, And they should
definitively respect the posix umask.

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer
email: idra at samba.org
http://samba.org



More information about the samba-technical mailing list