summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-04-01 02:57:04 +0000
committerNick Mathewson <nickm@torproject.org>2005-04-01 02:57:04 +0000
commitbd75b46ef9b87b6b2343eb704a20f39166585d06 (patch)
tree0cf2816f850598f5c023cdfe486b4d07cefd4d5f
parentefe9ca659a3d53b388124e2dd777d29e4914e1fb (diff)
downloadtor-bd75b46ef9b87b6b2343eb704a20f39166585d06.tar.gz
tor-bd75b46ef9b87b6b2343eb704a20f39166585d06.zip
Make sure to create OS X Tor user in <500 range
svn:r3941
-rwxr-xr-xcontrib/osx/addsysuser5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/osx/addsysuser b/contrib/osx/addsysuser
index 62d201fca2..8a22d75bc4 100755
--- a/contrib/osx/addsysuser
+++ b/contrib/osx/addsysuser
@@ -25,8 +25,9 @@ fi
home=/Users/$username
# defhome is what goes into NetInfo
defhome="/Network/Servers/MyServer/Users"
-#echo "Determining next available uid (please be patient)..."
-uiddef=`nidump passwd / | cut -d: -f3 | sort -n | tail -n 1`
+#echo "Determining next available system uid (please be patient)..."
+# Uids over 500 are for system users.
+uiddef=`nidump passwd / | cut -d: -f3 | sort -n | grep -v '^[56789]..' |grep -v '^....$' | tail -n 1`
uiddef=`echo $uiddef + 1 |bc`
echo Creating account for $username...
niutil -create / /users/$username