summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/nmbd/nmbd.c6
-rw-r--r--source3/winbindd/winbindd.c6
2 files changed, 12 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();
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index 141ca5c7c5..953e208e2a 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -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