about summary refs log tree commit diff
path: root/src/nix-setuid-helper
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-09-19T19·43-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-09-19T19·43-0400
commit76e88871b21c47c0216e160a5fb926f763ba64fe (patch)
tree815918838ee85fc3c655c55d6aca11c8a36bb502 /src/nix-setuid-helper
parent00092b2d356293a7af9d4d8125a689f90c461591 (diff)
Templatise tokenizeString()
Diffstat (limited to 'src/nix-setuid-helper')
-rw-r--r--src/nix-setuid-helper/nix-setuid-helper.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nix-setuid-helper/nix-setuid-helper.cc b/src/nix-setuid-helper/nix-setuid-helper.cc
index 26c457fd93c3..697964088c2a 100644
--- a/src/nix-setuid-helper/nix-setuid-helper.cc
+++ b/src/nix-setuid-helper/nix-setuid-helper.cc
@@ -193,16 +193,15 @@ static void run(int argc, char * * argv)
     if (st.st_mode & (S_IWGRP | S_IWOTH))
         throw Error(format("`%1%' should not be group or world-writable") % configFile);
 
-    Strings tokens = tokenizeString(readFile(fdConfig));
+    vector<string> tokens = tokenizeString<vector<string> >(readFile(fdConfig));
 
     fdConfig.close();
 
     if (tokens.size() != 2)
         throw Error(format("parse error in `%1%'") % configFile);
 
-    Strings::iterator i = tokens.begin();
-    string nixUser = *i++;
-    string buildUsersGroup = *i++;
+    string nixUser = tokens[0];
+    string buildUsersGroup = tokens[1];
 
 
     /* Check that the caller (real uid) is the one allowed to call