2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-09-03 07:45:47 +00:00

Remove list_options() function that is no longer used now that "sudo

-L" is gone.
This commit is contained in:
Todd C. Miller
2011-09-16 09:05:17 -04:00
parent 523492af52
commit cab1968da2
2 changed files with 0 additions and 37 deletions

View File

@@ -184,42 +184,6 @@ dump_defaults(void)
} }
} }
/*
* List each option along with its description.
*/
void
list_options(void)
{
struct sudo_defs_types *cur;
char *p, *desc;
sudo_printf(SUDO_CONV_INFO_MSG,
_("Available options in a sudoers ``Defaults'' line:\n\n"));
for (cur = sudo_defs_table; cur->name; cur++) {
if (cur->desc) {
desc = _(cur->desc);
switch (cur->type & T_MASK) {
case T_FLAG:
sudo_printf(SUDO_CONV_INFO_MSG,
_("%s: %s\n"), cur->name, desc);
break;
default:
p = strrchr(desc, ':');
if (p) {
while (p > desc && isspace((unsigned char)p[-1]))
p--;
sudo_printf(SUDO_CONV_INFO_MSG, _("%s: %.*s\n"),
cur->name, (int) (p - desc), desc);
} else {
sudo_printf(SUDO_CONV_INFO_MSG,
_("%s: %s\n"), cur->name, desc);
}
break;
}
}
}
}
/* /*
* Sets/clears an entry in the defaults structure * Sets/clears an entry in the defaults structure
* If a variable that takes a value is used in a boolean * If a variable that takes a value is used in a boolean

View File

@@ -107,7 +107,6 @@ struct sudo_defs_types {
*/ */
void dump_default(void); void dump_default(void);
void init_defaults(void); void init_defaults(void);
void list_options(void);
int set_default(char *, char *, int); int set_default(char *, char *, int);
int update_defaults(int); int update_defaults(int);