Commit 82976836 authored by Thomas Haller's avatar Thomas Haller
Browse files

main: create NMSTATEDIR with permissions 700

"NMSTATEDIR" is "nmstatedir" is "'${localstatedir}'/lib/$PACKAGE" is
usually "/var/lib/NetworkManager".

The "install-data-hook" in "src/" properly installs the
directory with permissions 700. When creating the directory at startup,
we must also use those permissions.
parent b907d90f
......@@ -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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment