summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-06-17 17:25:41 -0700
committerMichael Adam <obnox@samba.org>2013-06-27 02:02:24 +0200
commit59462f2e0102481bb9ac8f86e883a6de99259449 (patch)
tree241356b817d60c51dd0dd24f48ab8b2f5ef75e52 /source3/nmbd
parent011dc52df3a3319e33ae88617b9269dfe406d42c (diff)
downloadsamba-59462f2e0102481bb9ac8f86e883a6de99259449.tar.gz
samba-59462f2e0102481bb9ac8f86e883a6de99259449.tar.bz2
samba-59462f2e0102481bb9ac8f86e883a6de99259449.zip
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
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/nmbd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index 42e2b2f6ff..ec0e7d098f 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -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();