summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarza <arza@arza.us>2016-09-19 05:03:48 +0300
committerarza <arza@arza.us>2016-09-19 05:03:48 +0300
commitd28f94a2f9d7ddba2bc439ce7cc3160305cedb82 (patch)
tree9cf4f2de0c966f0ee6adef20f85280038e5829eb
parent3df21424bb2633fb770419de3242b3235351abb2 (diff)
Changed the umask to 077 so that the keys file is not readable/writable by other users.
-rw-r--r--other/bootstrap_daemon/src/tox-bootstrapd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/other/bootstrap_daemon/src/tox-bootstrapd.c b/other/bootstrap_daemon/src/tox-bootstrapd.c
index 86bf1ddb..686b968f 100644
--- a/other/bootstrap_daemon/src/tox-bootstrapd.c
+++ b/other/bootstrap_daemon/src/tox-bootstrapd.c
@@ -157,8 +157,6 @@ void daemonize(LOG_BACKEND log_backend, char *pid_file_path)
157 exit(1); 157 exit(1);
158 } 158 }
159 159
160 // Change the file mode mask
161 umask(0);
162 160
163 // Change the current working directory 161 // Change the current working directory
164 if ((chdir("/")) < 0) { 162 if ((chdir("/")) < 0) {
@@ -176,6 +174,7 @@ void daemonize(LOG_BACKEND log_backend, char *pid_file_path)
176 174
177int main(int argc, char *argv[]) 175int main(int argc, char *argv[])
178{ 176{
177 umask(077);
179 char *cfg_file_path; 178 char *cfg_file_path;
180 LOG_BACKEND log_backend; 179 LOG_BACKEND log_backend;
181 bool run_in_foreground; 180 bool run_in_foreground;