Always call deauth

This commit is contained in:
David Bartley 2008-05-20 18:59:05 -04:00
parent ede20cf95e
commit 2820f4d824
1 changed files with 3 additions and 4 deletions

View File

@ -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;
}