(set_password): use correct variable. From Love <lha@e.kth.se>
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6865 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
10
kadmin/cpw.c
10
kadmin/cpw.c
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 1998 Kungliga Tekniska H<>gskolan
|
* Copyright (c) 1997, 1998, 1999 Kungliga Tekniska H<>gskolan
|
||||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -101,9 +101,9 @@ static int
|
|||||||
set_password (krb5_principal principal, char *password)
|
set_password (krb5_principal principal, char *password)
|
||||||
{
|
{
|
||||||
krb5_error_code ret = 0;
|
krb5_error_code ret = 0;
|
||||||
char *pw, pwbuf[128];
|
char pwbuf[128];
|
||||||
|
|
||||||
if(pw == NULL) {
|
if(password == NULL) {
|
||||||
char *princ_name;
|
char *princ_name;
|
||||||
char *prompt;
|
char *prompt;
|
||||||
|
|
||||||
@@ -115,10 +115,10 @@ set_password (krb5_principal principal, char *password)
|
|||||||
if(ret){
|
if(ret){
|
||||||
return 0; /* XXX error code? */
|
return 0; /* XXX error code? */
|
||||||
}
|
}
|
||||||
pw = pwbuf;
|
password = pwbuf;
|
||||||
}
|
}
|
||||||
if(ret == 0)
|
if(ret == 0)
|
||||||
ret = kadm5_chpass_principal(kadm_handle, principal, pw);
|
ret = kadm5_chpass_principal(kadm_handle, principal, password);
|
||||||
memset(pwbuf, 0, sizeof(pwbuf));
|
memset(pwbuf, 0, sizeof(pwbuf));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user