mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-05 12:20:36 +01:00
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.
This commit is contained in:
parent
b907d90f61
commit
8297683605
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue