A bit better error handling
authorDavid Bartley <dtbartle@csclub.uwaterloo.ca>
Fri, 12 Jun 2009 22:49:52 +0000 (18:49 -0400)
committerDavid Bartley <dtbartle@csclub.uwaterloo.ca>
Fri, 12 Jun 2009 22:49:52 +0000 (18:49 -0400)
src/zfsaddhomedir.c

index 67de691..6b219e4 100644 (file)
@@ -43,10 +43,11 @@ int main(int argc, char *argv[]) {
 
         if (chown(homedir, uid, gid)) {
             errorpe("failed to chown %s", homedir);
-            return -1;
+            return 1;
         }
 
         if(seteuid(uid) != 0 || setegid(gid) != 0)
+            errorpe("failed to seteuid(%d) or setegid(%d)", uid, gid);
             return 1;
         if(spawnv(rsync_bin, rsync_argv))
             return 1;