Skip to content

Commit

Permalink
config: save config with 0600 permissions (fixes DeaDBeeF-Player#1030)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksiy-Yakovenko committed Oct 26, 2015
1 parent 5f54a69 commit ce1c6e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
#include <sys/stat.h>
#include "conf.h"
#include "threading.h"
#include "common.h"
Expand Down Expand Up @@ -190,6 +191,9 @@ conf_save (void) {
if (err != 0) {
fprintf (stderr, "config rename %s -> %s failed: %s\n", tempfile, str, strerror (errno));
}
else {
chmod (str, 0600);
}
conf_unlock ();
return 0;
}
Expand Down

0 comments on commit ce1c6e7

Please sign in to comment.