2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Initial bits of sudoers plugin; still needs work.

This commit is contained in:
Todd C. Miller
2010-03-14 19:58:47 -04:00
parent 3116e254b4
commit 9b0205846b
44 changed files with 1030 additions and 1395 deletions

View File

@@ -48,7 +48,7 @@
#include <login_cap.h>
#include <bsd_auth.h>
#include "sudo.h"
#include "sudoers.h"
#include "sudo_auth.h"
extern char *login_style; /* from sudo.c */
@@ -114,9 +114,9 @@ bsdauth_verify(pw, prompt, auth)
* S/Key.
*/
if ((s = auth_challenge(as)) == NULL) {
pass = tgetpass(prompt, def_passwd_timeout * 60, tgetpass_flags);
pass = auth_getpass(prompt, def_passwd_timeout * 60, SUDO_CONV_PROMPT_ECHO_OFF);
} else {
pass = tgetpass(s, def_passwd_timeout * 60, tgetpass_flags);
pass = auth_getpass(prompt, def_passwd_timeout * 60, SUDO_CONV_PROMPT_ECHO_OFF);
if (pass && *pass == '\0') {
if ((prompt = strrchr(s, '\n')))
prompt++;
@@ -131,8 +131,8 @@ bsdauth_verify(pw, prompt, auth)
while (isspace(prompt[len]) || prompt[len] == ':')
prompt[len--] = '\0';
easprintf(&s, "%s [echo on]: ", prompt);
pass = tgetpass(s, def_passwd_timeout * 60,
tgetpass_flags | TGP_ECHO);
pass = auth_getpass(prompt, def_passwd_timeout * 60,
SUDO_CONV_PROMPT_ECHO_ON);
free(s);
}
}