about summary refs log tree commit diff
path: root/src/nix-setuid-helper/nix-setuid-helper.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2007-02-06T20·03+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2007-02-06T20·03+0000
commit46605fb4f5024120f894f9894b8873c6a666a7a5 (patch)
treec55991b6035b2f16502f874e8b601f18db36db21 /src/nix-setuid-helper/nix-setuid-helper.cc
parent52d03276dd035aab2fc5c0c6e462866b6f96d6fb (diff)
* Fix 64-bit compiler warnings.
Diffstat (limited to 'src/nix-setuid-helper/nix-setuid-helper.cc')
-rw-r--r--src/nix-setuid-helper/nix-setuid-helper.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix-setuid-helper/nix-setuid-helper.cc b/src/nix-setuid-helper/nix-setuid-helper.cc
index ffb2abc1f164..58df479fc845 100644
--- a/src/nix-setuid-helper/nix-setuid-helper.cc
+++ b/src/nix-setuid-helper/nix-setuid-helper.cc
@@ -105,7 +105,7 @@ static void runBuilder(uid_t uidNix, gid_t gidBuildUsers,
        account.  The idea is that the current directory is the
        temporary build directory in /tmp or somewhere else, and we
        don't want to create that directory here. */
-    secureChown(uidNix, -1, uidTargetUser, gidBuildUsers, ".");
+    secureChown(uidNix, (gid_t) -1, uidTargetUser, gidBuildUsers, ".");
 
     /* Set the real, effective and saved gid.  Must be done before
        setuid(), otherwise it won't set the real and saved gids. */
@@ -239,7 +239,7 @@ static void run(int argc, char * * argv)
     else if (command == "get-ownership") {
         /* Syntax: nix-setuid-helper get-ownership <path> */
         if (argc != 3) throw Error("missing path");
-        secureChown(-1, gidBuildUsers, uidNix, gidBuildUsers, argv[2]);
+        secureChown((uid_t) -1, gidBuildUsers, uidNix, gidBuildUsers, argv[2]);
     }
 
     else if (command == "kill") {