aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.txt3
-rw-r--r--pseudo_server.c5
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index a511e27..1c1419f 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,6 @@
+2016-03-11:
+ * (seebs) set sane umask in server, just in case.
+
2016-03-10:
* (seebs) make bind work (so userspace NFS server can handle pseudo)
diff --git a/pseudo_server.c b/pseudo_server.c
index 12159e7..65102dd 100644
--- a/pseudo_server.c
+++ b/pseudo_server.c
@@ -153,6 +153,11 @@ pseudo_server_start(int daemonize) {
char *lockpath;
struct flock lock_data;
+ /* we want a sane umask for server operations; this is what
+ * would control the modes of database files, sockets, and so
+ * on.
+ */
+ umask(022);
/* parent process will wait for child process, or until it gets
* SIGUSR1, or until too much time has passed. */
if (daemonize) {