s/des_read_pw_string/UI_UTIL_read_pw_string/

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12753 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2003-09-03 09:37:03 +00:00
parent 33efaf1f26
commit 54fc57ccb5
12 changed files with 17 additions and 17 deletions

View File

@@ -119,7 +119,7 @@ kt_add(int argc, char **argv)
kvno = atoi(buf);
}
if(password_string == NULL && random_flag == 0) {
if(des_read_pw_string(buf, sizeof(buf), "Password: ", 1))
if(UI_UTIL_read_pw_string(buf, sizeof(buf), "Password: ", 1))
goto out;
password_string = buf;
}

View File

@@ -1303,7 +1303,7 @@ user(int argc, char **argv)
n = command("USER %s", argv[1]);
if (n == CONTINUE) {
if (argc < 3 ) {
des_read_pw_string (tmp,
UI_UTIL_read_pw_string (tmp,
sizeof(tmp),
"Password: ", 0);
argv[2] = tmp;
@@ -1594,7 +1594,7 @@ account(int argc, char **argv)
}
}
else {
des_read_pw_string(acct, sizeof(acct), "Account:", 0);
UI_UTIL_read_pw_string(acct, sizeof(acct), "Account:", 0);
}
command("ACCT %s", acct);
}

View File

@@ -219,7 +219,7 @@ login (char *host)
}
if (pass == NULL) {
pass = defaultpass;
des_read_pw_string (tmp, sizeof (tmp), prompt, 0);
UI_UTIL_read_pw_string (tmp, sizeof (tmp), prompt, 0);
if (tmp[0])
pass = tmp;
}
@@ -229,7 +229,7 @@ login (char *host)
if (n == CONTINUE) {
aflag++;
acct = tmp;
des_read_pw_string (acct, 128, "Account:", 0);
UI_UTIL_read_pw_string (acct, 128, "Account:", 0);
n = command ("ACCT %s", acct);
}
if (n != COMPLETE) {

View File

@@ -91,7 +91,7 @@ renew (int argc, char **argv, OtpAlgorithm *alg, char *user)
newctx.alg->name,
newctx.n,
newctx.seed);
if (des_read_pw_string (pw, sizeof(pw), prompt, 0) == 0 &&
if (UI_UTIL_read_pw_string (pw, sizeof(pw), prompt, 0) == 0 &&
otp_parse (newctx.key, pw, alg) == 0) {
ctx = &newctx;
ret = 0;
@@ -126,7 +126,7 @@ verify_user_otp(char *username)
}
snprintf (prompt, sizeof(prompt), "%s's %s Password: ", username, ss);
if(des_read_pw_string(passwd, sizeof(passwd)-1, prompt, 0))
if(UI_UTIL_read_pw_string(passwd, sizeof(passwd)-1, prompt, 0))
return 1;
return otp_verify_user (&ctx, passwd);
}
@@ -153,7 +153,7 @@ set (int argc, char **argv, OtpAlgorithm *alg, char *user)
strlcpy (ctx.seed, argv[1], sizeof(ctx.seed));
strlwr(ctx.seed);
do {
if (des_read_pw_string (pw, sizeof(pw), "Pass-phrase: ", 1))
if (UI_UTIL_read_pw_string (pw, sizeof(pw), "Pass-phrase: ", 1))
return 1;
if (strlen (pw) < OTP_MIN_PASSPHRASE)
printf ("Too short pass-phrase. Use at least %d characters\n",

View File

@@ -79,7 +79,7 @@ print (int argc,
usage (1);
n = atoi(argv[0]);
seed = argv[1];
if (des_read_pw_string (pw, sizeof(pw), "Pass-phrase: ", 0))
if (UI_UTIL_read_pw_string (pw, sizeof(pw), "Pass-phrase: ", 0))
return 1;
alg->init (key, pw, seed);
for (i = 0; i < n; ++i) {

View File

@@ -299,7 +299,7 @@ krb_verify(const struct passwd *login_info,
asprintf (&prompt,
"%s's Password: ",
krb_unparse_name_long (name, instance, realm));
if (des_read_pw_string (password, sizeof (password), prompt, 0)) {
if (UI_UTIL_read_pw_string (password, sizeof (password), prompt, 0)) {
memset (password, 0, sizeof (password));
free(prompt);
return (1);
@@ -346,7 +346,7 @@ verify_unix(struct passwd *su)
int r;
if(su->pw_passwd != NULL && *su->pw_passwd != '\0') {
snprintf(prompt, sizeof(prompt), "%s's password: ", su->pw_name);
r = des_read_pw_string(pw_buf, sizeof(pw_buf), prompt, 0);
r = UI_UTIL_read_pw_string(pw_buf, sizeof(pw_buf), prompt, 0);
if(r != 0)
exit(0);
pw = crypt(pw_buf, su->pw_passwd);

View File

@@ -107,7 +107,7 @@ set_password (krb5_principal principal, char *password)
krb5_unparse_name(context, principal, &princ_name);
asprintf(&prompt, "%s's Password: ", princ_name);
free (princ_name);
ret = des_read_pw_string(pwbuf, sizeof(pwbuf), prompt, 1);
ret = UI_UTIL_read_pw_string(pwbuf, sizeof(pwbuf), prompt, 1);
free (prompt);
if(ret){
return 0; /* XXX error code? */

View File

@@ -104,7 +104,7 @@ main(int argc, char **argv)
buf[n] = '\0';
buf[strcspn(buf, "\r\n")] = '\0';
} else {
if(des_read_pw_string(buf, sizeof(buf), "Master key: ", 1))
if(UI_UTIL_read_pw_string(buf, sizeof(buf), "Master key: ", 1))
exit(1);
}
krb5_string_to_key_salt(context, enctype, buf, salt, &key);

View File

@@ -169,7 +169,7 @@ main(int argc, char **argv)
if(argv[0])
password = argv[0];
if(password == NULL){
if(des_read_pw_string(buf, sizeof(buf), "Password: ", 0))
if(UI_UTIL_read_pw_string(buf, sizeof(buf), "Password: ", 0))
return 1;
password = buf;
}

View File

@@ -79,7 +79,7 @@ change_password(krb5_context context,
if (msg == NULL)
krb5_errx (context, 1, "out of memory");
ret = des_read_pw_string (pwbuf, sizeof(pwbuf), msg, 1);
ret = UI_UTIL_read_pw_string (pwbuf, sizeof(pwbuf), msg, 1);
free(msg);
if (name)
free(name);

View File

@@ -497,7 +497,7 @@ get_new_tickets(krb5_context context,
asprintf (&prompt, "%s's Password: ", p);
free (p);
if (des_read_pw_string(passwd, sizeof(passwd)-1, prompt, 0)){
if (UI_UTIL_read_pw_string(passwd, sizeof(passwd)-1, prompt, 0)){
memset(passwd, 0, sizeof(passwd));
exit(1);
}

View File

@@ -51,7 +51,7 @@ krb5_prompter_posix (krb5_context context,
fprintf (stderr, "%s\n", banner);
for (i = 0; i < num_prompts; ++i) {
if (prompts[i].hidden) {
if(des_read_pw_string(prompts[i].reply->data,
if(UI_UTIL_read_pw_string(prompts[i].reply->data,
prompts[i].reply->length,
prompts[i].prompt,
0))