mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
Windows: aklog must reset viceId to 0 before pr_CreateUser call
If the viceId is not reset to 0, the ptserver believes the client is attempting to request the anonymous id value and fails the registration request with permission denied. LICENSE MIT Change-Id: I82cc6105ad9d08b2f460b0c08cf7de500cea8537 Reviewed-on: http://gerrit.openafs.org/1659 Reviewed-by: Jeffrey Altman <jaltman@openafs.org> Tested-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
parent
114ed05d8d
commit
fda5f9a373
@ -364,18 +364,16 @@ 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, &viceId);
|
||||
|
||||
/* and restore the name to the original state */
|
||||
strncpy(username, username_copy, BUFSIZ);
|
||||
viceId = 0;
|
||||
*status = pr_CreateUser(username_copy, &viceId);
|
||||
|
||||
if (*status) {
|
||||
printf("%s: unable to create remote PTS "
|
||||
"user %s in cell %s (status: %s).\n", progname,
|
||||
username, cell_to_use, afs_error_message(*status));
|
||||
username_copy, cell_to_use, afs_error_message(*status));
|
||||
} else {
|
||||
printf("created cross-cell entry for %s (Id %d) at %s\n",
|
||||
username, viceId, cell_to_use);
|
||||
username_copy, viceId, cell_to_use);
|
||||
#ifdef AFS_ID_TO_NAME
|
||||
snprintf (username, BUFSIZ, "%s (AFS ID %d)", username_copy, (int) viceId);
|
||||
#endif /* AFS_ID_TO_NAME */
|
||||
|
Loading…
Reference in New Issue
Block a user