about summary refs log tree commit diff
path: root/src/libstore/local-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-10-09T21·33+0200
committerEelco Dolstra <edolstra@gmail.com>2019-10-09T21·58+0200
commit2070d55b0b3c39cc2e8b7ce3eb13567c92bd5433 (patch)
tree2742d3a1bc2b6df4c71ff026c29936e26f017553 /src/libstore/local-store.cc
parentfe51fbaf816eb73cb52bb5b51a27c1dc1258cc16 (diff)
Force per-user group to a known value
(cherry picked from commit 20eec802ff11dd2b152715cd5c81b756d318219d)
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r--src/libstore/local-store.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index 7b7d6cfa2545..6d2e21b931a9 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -1443,7 +1443,7 @@ void LocalStore::createUser(const std::string & userName, uid_t userId)
         createDirs(dir);
         if (chmod(dir.c_str(), 0755) == -1)
             throw SysError("changing permissions of directory '%s'", dir);
-        if (chown(dir.c_str(), userId, -1) == -1)
+        if (chown(dir.c_str(), userId, 0) == -1)
             throw SysError("changing owner of directory '%s'", dir);
     }
 }