new ldb group mapping code
tridge at samba.org
tridge at samba.org
Wed Sep 27 03:45:44 GMT 2006
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?
Cheers, Tridge
More information about the samba-technical
mailing list