diff options
| author | Thomas Haller <thaller@redhat.com> | 2016-03-21 11:40:42 +0100 |
|---|---|---|
| committer | Thomas Haller <thaller@redhat.com> | 2016-03-21 11:41:51 +0100 |
| commit | 8297683605c56efc96defbbb622ff8af8e05bb91 (patch) | |
| tree | 4457f97c83c29230c10b7aaa5e19a6f8da7a7508 | |
| parent | b907d90f612818050f4a88d7b3f30ffd19c4e929 (diff) | |
| download | NetworkManager-8297683605c56efc96defbbb622ff8af8e05bb91.tar.gz | |
main: create NMSTATEDIR with permissions 700
"NMSTATEDIR" is "nmstatedir" is "'${localstatedir}'/lib/$PACKAGE" is
usually "/var/lib/NetworkManager".
The "install-data-hook" in "src/Makefile.am" properly installs the
directory with permissions 700. When creating the directory at startup,
we must also use those permissions.
| -rw-r--r-- | src/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c index bf007008b1..bf1224dfd6 100644 --- a/src/main.c +++ b/src/main.c @@ -310,7 +310,7 @@ main (int argc, char *argv[]) nm_main_utils_ensure_not_running_pidfile (global_opt.pidfile); /* Ensure state directory exists */ - if (g_mkdir_with_parents (NMSTATEDIR, 0755) != 0) { + if (g_mkdir_with_parents (NMSTATEDIR, 0700) != 0) { fprintf (stderr, "Cannot create '%s': %s", NMSTATEDIR, strerror (errno)); exit (1); } |
