chiark / gitweb /
Fix permissions on /run/systemd/nspawn/locks
[elogind.git] / src / shared / machine-image.c
index bc215f0ad5ca60e60d8fa600c6879717c354d65c..273dacff1f2ac610adf80812ad0669c0e88912f9 100644 (file)
@@ -603,7 +603,7 @@ int image_path_lock(const char *path, int operation, LockFile *global, LockFile
                 return r;
 
         if (p) {
-                mkdir_p("/run/systemd/nspawn/locks", 0600);
+                mkdir_p("/run/systemd/nspawn/locks", 0700);
 
                 r = make_lock_file(p, operation, global);
                 if (r < 0) {
@@ -643,7 +643,7 @@ int image_name_lock(const char *name, int operation, LockFile *ret) {
         if (streq(name, ".host"))
                 return -EBUSY;
 
-        mkdir_p("/run/systemd/nspawn/locks", 0600);
+        mkdir_p("/run/systemd/nspawn/locks", 0700);
         p = strjoina("/run/systemd/nspawn/locks/name-", name);
 
         return make_lock_file(p, operation, ret);