1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-05 20:58:40 +03:00

winbindd and nmbd don't set their umask to zero on startup like smbd does.

Fix this - we already control tightly what permissions are
on the files we create. Ensure we don't get surprised.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Jun 27 02:02:24 CEST 2013 on sn-devel-104
This commit is contained in:
Jeremy Allison 2013-06-17 17:25:41 -07:00 committed by Michael Adam
parent 011dc52df3
commit 59462f2e01
2 changed files with 12 additions and 0 deletions

View File

@ -808,6 +808,12 @@ static bool open_sockets(bool isdaemon, int port)
talloc_enable_null_tracking();
frame = talloc_stackframe();
/*
* We want total control over the permissions on created files,
* so set our umask to 0.
*/
umask(0);
setup_logging(argv[0], DEBUG_DEFAULT_STDOUT);
load_case_tables();

View File

@ -1336,6 +1336,12 @@ int main(int argc, char **argv, char **envp)
talloc_enable_null_tracking();
frame = talloc_stackframe();
/*
* We want total control over the permissions on created files,
* so set our umask to 0.
*/
umask(0);
setup_logging("winbindd", DEBUG_DEFAULT_STDOUT);
/* glibc (?) likes to print "User defined signal 1" and exit if a