strcpy(lastcell, aserver->cell);
- if (!pr_Initialize (0, confname, aserver->cell))
- status = pr_SNameToId (username, &viceId);
+ if (!pr_Initialize (0, confname, aserver->cell)) {
+ char sname[PR_MAXNAMELEN];
+ strncpy(sname, username, PR_MAXNAMELEN);
+ sname[PR_MAXNAMELEN-1] = '\0';
+ status = pr_SNameToId (sname, &viceId);
+ }
/*
* This is a crock, but it is Transarc's crock, so
strcpy(aclient.cell, realm_of_cell);
len = min(k5creds->client->realm.length,strlen(realm_of_cell));
- if ( strncmp(realm_of_cell, k5creds->client->realm.data, len) ) {
+ /* For Khimaira, always append the realm name */
+ if ( 1 /* strncmp(realm_of_cell, k5creds->client->realm.data, len) */ ) {
char * p;
strcat(aclient.name, "@");
p = aclient.name + strlen(aclient.name);
strcpy(lastcell, aserver->cell);
- if (!pr_Initialize (0, confname, aserver->cell))
- *status = pr_SNameToId (username, &viceId);
+ if (!pr_Initialize (0, confname, aserver->cell)) {
+ char sname[PR_MAXNAMELEN];
+ strncpy(sname, username, PR_MAXNAMELEN);
+ sname[PR_MAXNAMELEN-1] = '\0';
+ *status = pr_SNameToId (sname, &viceId);
+ }
if (dflag)
{
}
}
- if (strcmp(realm_of_user, realm_of_cell))
+ /* For Khimaira we want to always append the realm to the name */
+ if (1 /* strcmp(realm_of_user, realm_of_cell) */)
{
strcat(username, "@");
strcat(username, realm_of_user);