Rename pwstars to pwfeedback

This commit is contained in:
Todd C. Miller
2009-02-15 20:53:49 +00:00
parent d1bbb48f19
commit dd56fbadb4
5 changed files with 13 additions and 13 deletions

View File

@@ -303,8 +303,8 @@ struct sudo_defs_types sudo_defs_table[] = {
"Allow sudo to prompt for a password even if it would be visisble", "Allow sudo to prompt for a password even if it would be visisble",
NULL, NULL,
}, { }, {
"pwstars", T_FLAG, "pwfeedback", T_FLAG,
"Print a stars at the password prompt when there is user input", "Provide visual feedback at the password prompt when there is user input",
NULL, NULL,
}, { }, {
"fast_glob", T_FLAG, "fast_glob", T_FLAG,

View File

@@ -138,8 +138,8 @@
#define I_SUDOERS_LOCALE 68 #define I_SUDOERS_LOCALE 68
#define def_visiblepw (sudo_defs_table[69].sd_un.flag) #define def_visiblepw (sudo_defs_table[69].sd_un.flag)
#define I_VISIBLEPW 69 #define I_VISIBLEPW 69
#define def_pwstars (sudo_defs_table[70].sd_un.flag) #define def_pwfeedback (sudo_defs_table[70].sd_un.flag)
#define I_PWSTARS 70 #define I_PWFEEDBACK 70
#define def_fast_glob (sudo_defs_table[71].sd_un.flag) #define def_fast_glob (sudo_defs_table[71].sd_un.flag)
#define I_FAST_GLOB 71 #define I_FAST_GLOB 71

View File

@@ -223,9 +223,9 @@ sudoers_locale
visiblepw visiblepw
T_FLAG T_FLAG
"Allow sudo to prompt for a password even if it would be visisble" "Allow sudo to prompt for a password even if it would be visisble"
pwstars pwfeedback
T_FLAG T_FLAG
"Print a stars at the password prompt when there is user input" "Provide visual feedback at the password prompt when there is user input"
fast_glob fast_glob
T_FLAG T_FLAG
"Use faster globbing that is less accurate but does not access the filesystem" "Use faster globbing that is less accurate but does not access the filesystem"

View File

@@ -660,15 +660,15 @@ user's existing group vector is left unaltered. The real and
effective group IDs, however, are still set to match the target effective group IDs, however, are still set to match the target
user. This flag is I<off> by default. user. This flag is I<off> by default.
=item pwstars =item pwfeedback
By default, B<sudo> reads the password like most other Unix programs, By default, B<sudo> reads the password like most other Unix programs,
by turning off echo until the user hits the return (or enter) key. by turning off echo until the user hits the return (or enter) key.
Some users become confused by this as it appears to them that B<sudo> Some users become confused by this as it appears to them that B<sudo>
has hung at this point. When I<pwstars> is set, B<sudo> will print has hung at this point. When I<pwfeedback> is set, B<sudo> will
a star for each character of the password the user enters. Note provide visual feedback when the user presses a key. Note that
that this does have a security impact, as an onlooker will be able this does have a security impact as an onlooker may be able to
to determine the length of the password being entered. determine the length of the password being entered.
This flag is I<off> by default. This flag is I<off> by default.
=item requiretty =item requiretty

View File

@@ -119,7 +119,7 @@ restart:
(void) sigaction(SIGTTIN, &sa, &savettin); (void) sigaction(SIGTTIN, &sa, &savettin);
(void) sigaction(SIGTTOU, &sa, &savettou); (void) sigaction(SIGTTOU, &sa, &savettou);
if (def_pwstars) if (def_pwfeedback)
neednl = term_raw(input); neednl = term_raw(input);
else else
neednl = term_noecho(input); neednl = term_noecho(input);
@@ -131,7 +131,7 @@ restart:
if (timeout > 0) if (timeout > 0)
alarm(timeout); alarm(timeout);
pass = getln(input, buf, sizeof(buf), def_pwstars); pass = getln(input, buf, sizeof(buf), def_pwfeedback);
alarm(0); alarm(0);
save_errno = errno; save_errno = errno;