added NO_PASSWD

This commit is contained in:
Todd C. Miller
1996-03-22 00:55:29 +00:00
parent 823ddd9fdd
commit 1265fcc4f8
3 changed files with 11 additions and 0 deletions

View File

@@ -64,6 +64,12 @@ EXEMPTGROUP
a password but where Jr. sysadmins need to.
This is off by default.
NO_PASSWD
If this is defined then sudo will *never* ask for a password.
It should only be used in an environment where machines are
physically secure. It would be a very bad idea for an open
lab.
ENV_EDITOR
Makes visudo consult the EDITOR and VISUAL environmental variables
before falling back on the default editor. Note that this may create

View File

@@ -40,6 +40,7 @@
#define SEND_MAIL_WHEN_NO_USER /* send mail when user not in sudoers file */
/*#define SEND_MAIL_WHEN_NOT_OK /* send mail if no permissions to run command */
/*#define EXEMPTGROUP "sudo" /* no passwd needed for users in this group */
/*#define NO_PASSWD /* no passwds are required */
/*#define ENV_EDITOR /* visudo honors EDITOR and VISUAL envars */
#define SHORT_MESSAGE /* short sudo message, no copyright printed */
#define TIMEOUT 5 /* minutes before sudo asks for passwd again */

4
sudo.c
View File

@@ -291,7 +291,9 @@ int main(argc, argv)
remove_timestamp(); /* remove the timestamp ticket file */
exit(0);
} else if (sudo_mode == MODE_LIST) {
#ifndef NO_PASSWD
check_user();
#endif /* NO_PASSWD */
log_error(ALL_SYSTEMS_GO);
(void) validate(FALSE);
exit(0);
@@ -304,7 +306,9 @@ int main(argc, argv)
switch (rtn) {
case VALIDATE_OK:
#ifndef NO_PASSWD
check_user();
#endif /* NO_PASSWD */
log_error(ALL_SYSTEMS_GO);
if (sudo_mode == MODE_VALIDATE)
exit(0);