mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
aklog: Dispose of the pointless confname string
confname makes a static copy of the AFSDIR_CLIENT_ETC_DIRPATH string. As pr_Initialize takes it as const, there's no need to maintain our own copy, and so this is superfluous. Remove it. Change-Id: I64b13aae80b15f6b7511a040f39467bca76186b8 Reviewed-on: http://gerrit.openafs.org/1322 Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
60ea6a23ab
commit
f8c6bfffd3
@ -415,7 +415,6 @@ auth_to_cell(krb5_context context, char *cell, char *realm, char **linkedcell)
|
|||||||
int retry; /* round, and round we go ... */
|
int retry; /* round, and round we go ... */
|
||||||
|
|
||||||
char *local_cell = NULL;
|
char *local_cell = NULL;
|
||||||
static char confname[512] = { 0 };
|
|
||||||
krb5_creds *v5cred = NULL;
|
krb5_creds *v5cred = NULL;
|
||||||
struct ktc_principal aserver;
|
struct ktc_principal aserver;
|
||||||
struct ktc_principal aclient;
|
struct ktc_principal aclient;
|
||||||
@ -424,11 +423,6 @@ auth_to_cell(krb5_context context, char *cell, char *realm, char **linkedcell)
|
|||||||
|
|
||||||
memset(realm_of_user, 0, sizeof(realm_of_user));
|
memset(realm_of_user, 0, sizeof(realm_of_user));
|
||||||
|
|
||||||
if (confname[0] == '\0') {
|
|
||||||
strncpy(confname, AFSDIR_CLIENT_ETC_DIRPATH, sizeof(confname));
|
|
||||||
confname[sizeof(confname) - 2] = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
/* NULL or empty cell returns information on local cell */
|
/* NULL or empty cell returns information on local cell */
|
||||||
if ((status = get_cellconfig(cell, &cellconf, &local_cell)))
|
if ((status = get_cellconfig(cell, &cellconf, &local_cell)))
|
||||||
return(status);
|
return(status);
|
||||||
@ -792,8 +786,8 @@ auth_to_cell(krb5_context context, char *cell, char *realm, char **linkedcell)
|
|||||||
username, aserver.cell);
|
username, aserver.cell);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pr_Initialize (0, confname, aserver.cell))
|
if (!pr_Initialize (0, AFSDIR_CLIENT_ETC_DIRPATH, aserver.cell))
|
||||||
status = pr_SNameToId (username, &viceId);
|
status = pr_SNameToId (username, &viceId);
|
||||||
|
|
||||||
if (dflag) {
|
if (dflag) {
|
||||||
if (status)
|
if (status)
|
||||||
@ -833,7 +827,8 @@ auth_to_cell(krb5_context context, char *cell, char *realm, char **linkedcell)
|
|||||||
* level
|
* level
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ((status = pr_Initialize(1L, confname, aserver.cell))) {
|
if ((status = pr_Initialize(1L, AFSDIR_CLIENT_ETC_DIRPATH,
|
||||||
|
aserver.cell))) {
|
||||||
printf("Error %d\n", status);
|
printf("Error %d\n", status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user