From a585481363f5e7dd50229dd10f8756d5db887fac Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Thu, 10 Feb 2005 02:52:08 +0000 Subject: [PATCH] * 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. 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 | 6 ++++++ src/lib/krb5/krb/gic_pwd.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index 4fbecafae..c3e43123d 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,9 @@ +2005-02-09 Tom Yu + + * 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 * t_walk_rtree.c (main): Free context at end to allow searching diff --git a/src/lib/krb5/krb/gic_pwd.c b/src/lib/krb5/krb/gic_pwd.c index de0f47df3..f2837effb 100644 --- a/src/lib/krb5/krb/gic_pwd.c +++ b/src/lib/krb5/krb/gic_pwd.c @@ -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; -- 2.26.2