(krb5_password_key_proc): check return value from des_read_pw_string
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6969 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997 Kungliga Tekniska H<>gskolan
|
||||
* Copyright (c) 1997 - 1999 Kungliga Tekniska H<>gskolan
|
||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -55,7 +55,10 @@ krb5_password_key_proc (krb5_context context,
|
||||
if (*key == NULL)
|
||||
return ENOMEM;
|
||||
if (password == NULL) {
|
||||
des_read_pw_string (buf, sizeof(buf), "Password: ", 0);
|
||||
if(des_read_pw_string (buf, sizeof(buf), "Password: ", 0)) {
|
||||
free (*key);
|
||||
return KRB5_LIBOS_PWDINTR;
|
||||
}
|
||||
password = buf;
|
||||
}
|
||||
ret = krb5_string_to_key_salt (context, type, password, salt, *key);
|
||||
|
Reference in New Issue
Block a user