(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:
Assar Westerlund
1999-08-24 23:28:07 +00:00
parent ab1f32ffef
commit 19e96f8094

View File

@@ -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).
* All rights reserved.
*
@@ -101,9 +101,9 @@ static int
set_password (krb5_principal principal, char *password)
{
krb5_error_code ret = 0;
char *pw, pwbuf[128];
char pwbuf[128];
if(pw == NULL) {
if(password == NULL) {
char *princ_name;
char *prompt;
@@ -115,10 +115,10 @@ set_password (krb5_principal principal, char *password)
if(ret){
return 0; /* XXX error code? */
}
pw = pwbuf;
password = pwbuf;
}
if(ret == 0)
ret = kadm5_chpass_principal(kadm_handle, principal, pw);
ret = kadm5_chpass_principal(kadm_handle, principal, password);
memset(pwbuf, 0, sizeof(pwbuf));
return ret;
}