* gic_pwd.c (krb5_get_init_creds_password): Fix so empty password
authorTom Yu <tlyu@mit.edu>
Thu, 10 Feb 2005 02:52:08 +0000 (02:52 +0000)
committerTom Yu <tlyu@mit.edu>
Thu, 10 Feb 2005 02:52:08 +0000 (02:52 +0000)
string causes prompting and doesn't cause truncation of password
to zero characters.

ticket: 2918
target_version: 1.4.1
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17098 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/ChangeLog
src/lib/krb5/krb/gic_pwd.c

index 4fbecafae82118aee00b73b3a9b642b01cf0be1a..c3e43123df511e5754f70c6e4e3fcfe2f46dff8f 100644 (file)
@@ -1,3 +1,9 @@
+2005-02-09  Tom Yu  <tlyu@mit.edu>
+
+       * gic_pwd.c (krb5_get_init_creds_password): Fix so empty password
+       string causes prompting and doesn't cause truncation of password
+       to zero characters.
+
 2005-01-28  Ezra Peisach  <epeisach@mit.edu>
 
        * t_walk_rtree.c (main): Free context at end to allow searching
index de0f47df3d84c90eb484a9c34297a44d34bc34a4..f2837effb61d9ef788662df6d9d4a66125e511ce 100644 (file)
@@ -104,7 +104,7 @@ krb5_get_init_creds_password(krb5_context context, krb5_creds *creds, krb5_princ
 
    pw0.data = pw0array;
 
-   if (password) {
+   if (password && password[0]) {
       if ((pw0.length = strlen(password)) > sizeof(pw0array)) {
         ret = EINVAL;
         goto cleanup;