diff options
author | Keith Vetter <keithv@fusion.com> | 1995-05-31 00:30:24 +0000 |
---|---|---|
committer | Keith Vetter <keithv@fusion.com> | 1995-05-31 00:30:24 +0000 |
commit | f581566cc0892118a8d35a927be4ea854c80f239 (patch) | |
tree | 3906d00b6e5f5a842d9053aed3aef8b77521d726 /src/windows/cns/cns.c | |
parent | 4006345f4798a71d7918892579270b3053256a6b (diff) | |
download | krb5-f581566cc0892118a8d35a927be4ea854c80f239.tar.gz krb5-f581566cc0892118a8d35a927be4ea854c80f239.tar.xz krb5-f581566cc0892118a8d35a927be4ea854c80f239.zip |
Added k5 password changing code for the cns program (untested, waiting for
a server.)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5918 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/windows/cns/cns.c')
-rw-r--r-- | src/windows/cns/cns.c | 38 |
1 files changed, 8 insertions, 30 deletions
diff --git a/src/windows/cns/cns.c b/src/windows/cns/cns.c index 844777b3bc..d4f3249164 100644 --- a/src/windows/cns/cns.c +++ b/src/windows/cns/cns.c @@ -493,43 +493,21 @@ change_password ( #ifdef KRB5 /* FIXME */ char *msg; // Message string krb5_error_code code; // Return value - - krb5_error_code //FIXME INTERFACE - krb5_change_password( - krb5_context context, - char *user, - char *realm, - char *old_password, - char *new_password, - char **text); - - code = krb5_change_password (k5_context, name, realm, oldpw, newpw, &msg); + code = k5_change_password (k5_context, name, realm, oldpw, newpw, &msg); if (msg != NULL) { MessageBox (NULL, msg, NULL, MB_ICONEXCLAMATION); - //WHO FREES THIS SPACE??? free (msg); - } else if (code) - com_err (NULL, code, "while changing password."); + } else if (code) { + if (code == KRB5KRB_AP_ERR_BAD_INTEGRITY) + MessageBox (NULL, "Password incorrect", NULL, MB_ICONEXCLAMATION); + else + com_err (NULL, code, "while changing password."); + } return (code == 0); -#endif -} /* change_password */ -/*+*/ -#ifdef KRB5 -krb5_error_code //FIXME INTERFACE -krb5_change_password( - krb5_context context, - char *user, - char *realm, - char *old_password, - char *new_password, - char **text) -{ - *text = "Changing passwords is not yet implemented"; - return -1; -} #endif /* KRB5 */ +} /*+ * Function: Process WM_COMMAND messages for the password dialog. * |