use krb5_prompter_posix instead of calling des_read_pw_string directly
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11436 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
11
admin/add.c
11
admin/add.c
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997 - 2001 Kungliga Tekniska H<>gskolan
|
* Copyright (c) 1997 - 2002 Kungliga Tekniska H<>gskolan
|
||||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -119,7 +119,14 @@ kt_add(int argc, char **argv)
|
|||||||
kvno = atoi(buf);
|
kvno = atoi(buf);
|
||||||
}
|
}
|
||||||
if(password_string == NULL && random_flag == 0) {
|
if(password_string == NULL && random_flag == 0) {
|
||||||
if(des_read_pw_string(buf, sizeof(buf), "Password: ", 1))
|
krb5_prompt prompt;
|
||||||
|
krb5_data reply;
|
||||||
|
prompt.hidden = 1;
|
||||||
|
prompt.prompt = "Password: ";
|
||||||
|
prompt.reply = &reply;
|
||||||
|
reply.data = buf;
|
||||||
|
reply.length = sizeof(buf);
|
||||||
|
if(krb5_prompter_posix(context, NULL, NULL, NULL, 1, &prompt))
|
||||||
goto out;
|
goto out;
|
||||||
password_string = buf;
|
password_string = buf;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user