DEVEL15-windows-aklog-afsid-lookup-20060519

if the cell matches the realm, do not lookup with realm


(cherry picked from commit 36f3bafb44aae8472453a1c39e9585b920a1bada)
This commit is contained in:
Jeffrey Altman 2006-06-01 16:38:52 +00:00 committed by Derrick Brashear
parent 92c2d265cd
commit 5de6714250

View File

@ -199,10 +199,15 @@ void ViceIDToUsername(char *username, char *realm_of_user, char *realm_of_cell,
strcpy(lastcell, aserver->cell);
if (!pr_Initialize (0, confname, aserver->cell)) {
char sname[PR_MAXNAMELEN];
char sname[PR_MAXNAMELEN], *at;
strncpy(sname, username, PR_MAXNAMELEN);
sname[PR_MAXNAMELEN-1] = '\0';
*status = pr_SNameToId (sname, &viceId);
at = strchr(sname, '@');
if (at && !stricmp(at+1, realm_of_cell))
*at = '\0';
*status = pr_SNameToId (sname, &viceId);
}
if (dflag)