Always call deauth

pull/5/head
David Bartley 15 years ago
parent ede20cf95e
commit 2820f4d824
  1. 7
      src/addhomedir.c

@ -17,6 +17,7 @@ int ceo_create_home(char *homedir, uid_t uid, gid_t gid, char *mode, char *acl)
char uid_str[16], gid_str[16];
char *zfs_argv[] = { "ssh", "ceo@ginseng", "/usr/sbin/zfsaddhomedir", \
homedir, skeleton_dir, uid_str, gid_str, mode, acl, NULL };
int ret = 0;
assert(homedir[0]);
snprintf(uid_str, sizeof(uid_str), "%ld", (long)uid);
@ -24,13 +25,11 @@ int ceo_create_home(char *homedir, uid_t uid, gid_t gid, char *mode, char *acl)
if(!acl[0]) acl = NULL;
ceo_krb5_auth(admin_bind_userid, admin_bind_keytab);
if(spawnv("/usr/bin/ssh", zfs_argv)) {
errorpe("failed calling zfsaddhomedir for %s", homedir);
return -1;
ret = -1;
}
ceo_krb5_deauth();
return 0;
return ret;
}

Loading…
Cancel
Save