Spawn nscd, don't exec()
authorMichael Spang <mspang@uwaterloo.ca>
Mon, 1 Oct 2007 22:08:04 +0000 (18:08 -0400)
committerMichael Spang <mspang@uwaterloo.ca>
Mon, 1 Oct 2007 22:08:04 +0000 (18:08 -0400)
We were replacing the process with nscd. Oops.

bin/addhomedir

index 7212dc1..8873328 100755 (executable)
@@ -79,7 +79,7 @@ if not os.path.isdir(cfg['skeleton_dir']):
     fail("invalid skeleton dir %s" % cfg['skeleton_dir'])
 
 try:
     fail("invalid skeleton dir %s" % cfg['skeleton_dir'])
 
 try:
-    os.execvp("/usr/sbin/nscd", ("/usr/sbin/nscd", "-i", "passwd"))
+    os.spawnvp(os.P_WAIT, "/usr/sbin/nscd", ("/usr/sbin/nscd", "-i", "passwd"))
     pwent = pwd.getpwnam(username)
     uid = pwent.pw_uid
     gid = pwent.pw_gid
     pwent = pwd.getpwnam(username)
     uid = pwent.pw_uid
     gid = pwent.pw_gid