mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Changed the umask to 077 so that the keys file is not readable/writable by other users.
This commit is contained in:
parent
3df21424bb
commit
d28f94a2f9
|
@ -157,8 +157,6 @@ void daemonize(LOG_BACKEND log_backend, char *pid_file_path)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change the file mode mask
|
|
||||||
umask(0);
|
|
||||||
|
|
||||||
// Change the current working directory
|
// Change the current working directory
|
||||||
if ((chdir("/")) < 0) {
|
if ((chdir("/")) < 0) {
|
||||||
|
@ -176,6 +174,7 @@ void daemonize(LOG_BACKEND log_backend, char *pid_file_path)
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
umask(077);
|
||||||
char *cfg_file_path;
|
char *cfg_file_path;
|
||||||
LOG_BACKEND log_backend;
|
LOG_BACKEND log_backend;
|
||||||
bool run_in_foreground;
|
bool run_in_foreground;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user