Commit Graph

2701 Commits

Author SHA1 Message Date
Todd C. Miller
cf92836ecf Only need to do 'lc = login_getclass(NULL)' if lc == NULL 2001-12-13 02:42:45 +00:00
Todd C. Miller
3f97a5e44f '\\' is a perfectly legal character to have in a command line argument. 2001-12-13 02:24:40 +00:00
Todd C. Miller
678f56e2e8 o Defer call to set_fqdn() until it is safe to use log_error()
o Don't print errno string value if gethostbyname fails, it is not relevant
2001-12-13 01:24:45 +00:00
Todd C. Miller
4572e80469 Fix CIDR -> in_addr_t conversion. 2001-12-13 01:07:25 +00:00
Todd C. Miller
bcdcc32a7f Remove an extra "User_List" in the User_Spec definition
From ybertrand AT snoopymail.com
2001-12-12 21:21:49 +00:00
Todd C. Miller
afff0d56b4 Make 'listpw=never' work for users who are not explicitly mentioned in
sudoers.
2001-12-12 21:00:56 +00:00
Todd C. Miller
3d1344a717 Remove gratuitous '=' in EBNF grammar; era AT iki.fi 2001-12-12 20:40:12 +00:00
Todd C. Miller
b1687838f5 Document new list Defaults type and convert env_keep and env_delete
to lists.
Document new env_check option.
2001-12-12 20:34:26 +00:00
Todd C. Miller
d684d37a95 regen parser 2001-12-12 20:11:47 +00:00
Todd C. Miller
4447e04fa7 Don't let '#' appear in a {WORD} and restrict #foo in a Runas spec to #[0-9-]+. 2001-12-12 19:56:53 +00:00
Todd C. Miller
40840e10cd regen 2001-12-12 19:55:36 +00:00
Todd C. Miller
170eef9642 Simpler SUDO_FUNC_ISBLANK that uses AC_TRY_LINK 2001-12-12 19:55:25 +00:00
Todd C. Miller
f66fcb464b Add check for skeyaccess(3) 2001-12-12 19:43:23 +00:00
Todd C. Miller
4632986cd0 Document new -c, -f, and -q options 2001-12-12 00:47:49 +00:00
Todd C. Miller
3c4691a1d0 o Add -f option (alternate sudoers file)
o Convert to use getopt(3)
2001-12-12 00:41:33 +00:00
Todd C. Miller
4073b477f2 regen 2001-12-12 00:31:16 +00:00
Todd C. Miller
46be666b32 Add check for isblank and a replacement macro if it doesn't exist. 2001-12-12 00:31:07 +00:00
Todd C. Miller
8f896ec2e2 In check-only mode, don't create sudoers if it does not already exist. 2001-12-11 23:22:54 +00:00
Todd C. Miller
5486390782 o Add a new token, DEFVAR, to indicate a Defaults variable name
o Add support for "+=" and "-=" list operators
 o replace some 1 and 0 with TRUE and FALSE for greater legibility.
2001-12-11 23:06:52 +00:00
Todd C. Miller
cf2db3682b o Use exclusive start conditions to remove some ambiguity in the
lexer.  Also reorder some things for clarity.
 o Add support for "+=" and "-=" list operators.
 o Use the new DEFVAR token to denote a Defaults variable name.
2001-12-11 23:05:44 +00:00
Todd C. Miller
e63182a25b Prototype init_envtables() 2001-12-11 23:03:24 +00:00
Todd C. Miller
199a17436d o Convert environment handling to use lists instead of strings.
This greatly simplifies routines that need to do "foreach" type
   operations.
 o Add new init_envtables() function to set env_check and env_delete
   defaults based on initial_badenv_table and initial_checkenv_table
   (formerly sudo_badenv_table).
2001-12-11 23:02:51 +00:00
Todd C. Miller
2f818e2c32 o Add a new LIST type and functions to manipulate it.
o This is for use with environment handling variables.
 o Call new init_envtables() routine inside init_defaults() to
   initialize the environment lists.
2001-12-11 23:00:34 +00:00
Todd C. Miller
93971de654 Convert environment options to use the new LIST type and add a new one,
env_check that only deletes if the sanity check fails.
2001-12-11 22:57:44 +00:00
Todd C. Miller
7b93f51d5e Add dummy version of init_envtables() 2001-12-11 22:55:23 +00:00
Todd C. Miller
f0e806a12c honor quiet mode 2001-12-11 22:53:39 +00:00
Todd C. Miller
f7f91aff57 Add check-only mode 2001-12-11 22:51:17 +00:00
Todd C. Miller
76ff0218c1 Fix generation of entries with NULL descriptions. 2001-12-11 01:27:42 +00:00
Todd C. Miller
d38e57ef48 Use sigaction_t and quiet a gcc warning. 2001-12-09 05:27:11 +00:00
Todd C. Miller
4cad1daa76 Must reset signal handlers before we exec 2001-12-09 05:20:34 +00:00
Todd C. Miller
88951a3b9d Be carefule now that tgetpass() can return NULL (user hit ^C).
PAM version needs testing.
Set SIGTSTP to SIG_DFL during password entry so user can suspend us.
2001-12-09 05:17:00 +00:00
Todd C. Miller
6d6d4628f4 Add support for interrupting/suspending tgetpass via keyboard input.
If you suspend sudo from the password prompt and resume it will
re-prompt you.
2001-12-09 05:14:23 +00:00
Todd C. Miller
60bbfa42df Don't block keyboard interrupt signals, just set them to SIG_IGN. 2001-12-09 05:09:10 +00:00
Todd C. Miller
e6545c86fc add back HAVE_SIGACTION 2001-12-08 19:48:03 +00:00
Todd C. Miller
c570580e42 regen 2001-12-08 19:44:55 +00:00
Todd C. Miller
241cb64cc4 Kill POSIX_SIGNALS define and old signal support now that we emulate POSIX ones
Also be sure to correctly initialize struct sigaction.
2001-12-08 19:44:30 +00:00
Todd C. Miller
028a55fb23 Don't need config.h or "#ifndef HAVE_STRERROR" wrapper. 2001-12-08 19:42:32 +00:00
Todd C. Miller
fb66a33153 Add scaffolding for POSIX signal emulation 2001-12-08 19:39:28 +00:00
Todd C. Miller
0cee8304a7 o Add missing ';' so this compiles
o Can't use NULL since we don't include stdio.h
2001-12-08 19:36:48 +00:00
Todd C. Miller
9af30ba66e Emulate sigaction() using sigvec() 2001-12-08 19:23:11 +00:00
Todd C. Miller
78d67cfb53 Document new behavior of negative values of timestamp_timeout
Fix a typo
2001-11-13 00:32:11 +00:00
Todd C. Miller
eac21ad7bf Add security note about command not being logged after 'sudo su' and
friends.
2001-11-13 00:31:20 +00:00
Todd C. Miller
031b009219 Mention that -V prints default values when run as root, including
the list of environment variables to clear.
2001-11-13 00:19:29 +00:00
Todd C. Miller
fc52725317 Run pod2man with --quotes=none to avoid stupid quoting of C<> entries. 2001-11-13 00:14:29 +00:00
Todd C. Miller
de9d655ea6 Add mail_badpass option
Also modify mail_always behavior to also send mail when the password is wrong
2001-11-12 18:13:03 +00:00
Todd C. Miller
63ae9ec2ad Dump default bad env table when 'sudo -V' is run by root. 2001-11-12 18:08:30 +00:00
Todd C. Miller
c4c0f0046e document env_delete 2001-11-12 04:52:23 +00:00
Todd C. Miller
65302649f5 Add support for '*' in env_keep when not resetting the environment
(ie: the normal case).
2001-11-12 04:51:57 +00:00
Todd C. Miller
ab020c056b Add env_delete variable that lets the user replace/add to the bad_env_table.
Allow '*' wildcard in env_keep entries.
2001-11-12 04:47:22 +00:00
Todd C. Miller
07f5d7ae7e Force umask to 022 to guarantee sane directory permissions. 2001-11-06 18:59:36 +00:00