From: Jeffrey Altman Date: Sun, 30 Mar 2008 17:21:07 +0000 (+0000) Subject: DEVEL15-windows-aklog-cross-cell-20080330 X-Git-Tag: openafs-devel-1_5_35~49 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=3b16299f870f83459839d8c1731e56d1f16ff776;p=packages%2Fo%2Fopenafs.git DEVEL15-windows-aklog-cross-cell-20080330 LICENSE MIT report the new ID after a successful cross cell registration (cherry picked from commit 99a29903c8b77e2e3260bf06d913367fadbc4fed) --- diff --git a/src/WINNT/aklog/aklog.c b/src/WINNT/aklog/aklog.c index e5b6b885f..237e599d1 100644 --- a/src/WINNT/aklog/aklog.c +++ b/src/WINNT/aklog/aklog.c @@ -239,9 +239,6 @@ void ViceIDToUsername(char *username, char *realm_of_user, char *realm_of_cell, static char confname[512] = { 0 }; char username_copy[BUFSIZ]; afs_int32 viceId; /* AFS uid of user */ -#ifdef ALLOW_REGISTER - afs_int32 id; -#endif /* ALLOW_REGISTER */ if (confname[0] == '\0') { strncpy(confname, AFSDIR_CLIENT_ETC_DIRPATH, sizeof(confname)); @@ -297,7 +294,6 @@ void ViceIDToUsername(char *username, char *realm_of_user, char *realm_of_cell, printf("doing first-time registration of %s " "at %s\n", username, cell_to_use); } - id = 0; strncpy(aclient->name, username, MAXKTCNAMELEN - 1); aclient->name[MAXKTCNAMELEN - 1] = '\0'; strcpy(aclient->instance, ""); @@ -331,7 +327,7 @@ void ViceIDToUsername(char *username, char *realm_of_user, char *realm_of_cell, /* copy the name because pr_CreateUser lowercases the realm */ strncpy(username_copy, username, BUFSIZ); - *status = pr_CreateUser(username, &id); + *status = pr_CreateUser(username, &viceId); /* and restore the name to the original state */ strncpy(username, username_copy, BUFSIZ);