diff options
author | irungentoo <irungentoo@gmail.com> | 2016-09-21 23:27:58 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2016-09-21 23:27:58 -0400 |
commit | 161ab46f88728480fff647675eb41176a775a968 (patch) | |
tree | 9cf4f2de0c966f0ee6adef20f85280038e5829eb | |
parent | e6af3a7825e8307a501bc7c3e7b1ff323f081870 (diff) | |
parent | d28f94a2f9d7ddba2bc439ce7cc3160305cedb82 (diff) |
Merge branch 'arza-zara-umask'
-rw-r--r-- | other/bootstrap_daemon/src/tox-bootstrapd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/other/bootstrap_daemon/src/tox-bootstrapd.c b/other/bootstrap_daemon/src/tox-bootstrapd.c index 27a910f3..686b968f 100644 --- a/other/bootstrap_daemon/src/tox-bootstrapd.c +++ b/other/bootstrap_daemon/src/tox-bootstrapd.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <stdio.h> | 29 | #include <stdio.h> |
30 | #include <stdlib.h> | 30 | #include <stdlib.h> |
31 | #include <string.h> | 31 | #include <string.h> |
32 | #include <sys/stat.h> | ||
32 | 33 | ||
33 | // toxcore | 34 | // toxcore |
34 | #include "../../../toxcore/LAN_discovery.h" | 35 | #include "../../../toxcore/LAN_discovery.h" |
@@ -156,8 +157,6 @@ void daemonize(LOG_BACKEND log_backend, char *pid_file_path) | |||
156 | exit(1); | 157 | exit(1); |
157 | } | 158 | } |
158 | 159 | ||
159 | // Change the file mode mask | ||
160 | umask(0); | ||
161 | 160 | ||
162 | // Change the current working directory | 161 | // Change the current working directory |
163 | if ((chdir("/")) < 0) { | 162 | if ((chdir("/")) < 0) { |
@@ -175,6 +174,7 @@ void daemonize(LOG_BACKEND log_backend, char *pid_file_path) | |||
175 | 174 | ||
176 | int main(int argc, char *argv[]) | 175 | int main(int argc, char *argv[]) |
177 | { | 176 | { |
177 | umask(077); | ||
178 | char *cfg_file_path; | 178 | char *cfg_file_path; |
179 | LOG_BACKEND log_backend; | 179 | LOG_BACKEND log_backend; |
180 | bool run_in_foreground; | 180 | bool run_in_foreground; |