Commit Graph

268 Commits

Author SHA1 Message Date
Todd C. Miller
fc08d7004c Move user_is_exempt prototype into sudo.h 2000-02-15 23:36:04 +00:00
Todd C. Miller
9e0bae9fc6 update copyright year on changed files 2000-01-17 23:46:26 +00:00
Todd C. Miller
ccb808da31 Add 'shell_noargs' runtime option back in. We have to defer checking
until after the sudoers file has been parsed but since there are now
other options that operate that way this one can too.  Based on a patch
from bguillory@email.com.
2000-01-17 17:25:10 +00:00
Todd C. Miller
f68cc2f628 Add "listpw" and "verifypw" options. 2000-01-17 04:05:18 +00:00
Todd C. Miller
625e3e46d0 Make treatment of -l and -v sane wrt NOPASSWD flags. Now allow -l w/o a passwd
if there is *any* entry for the user on the host with a NOPASSWD flag.
For -v, only allow w/o a passwd if *all* entries for the user on the host
w/ the specified runas user have the NOPASSWD flag set.
2000-01-03 04:43:33 +00:00
Todd C. Miller
449f67f776 o Kill shell_noargs option, it cannot work since the command needs to
be set before sudoers is parsed.
o Fix the "set_home" sudoers option (only worked at compile time).
o Fix "fqdn" sudoers option.  We now set host/shost via set_fqdn which
  gets called when the "fqdn" option is set in sudoers.
o Move the openlog() to store_syslogfac() so this gets overridden
  correctly from the sudoers file.
1999-12-02 20:31:25 +00:00
Todd C. Miller
13bf42675d Add support for "Defaults" line in sudoers to make configuration variables
changable at runtime (and on a global, per-host and per-user basis).
Both the names and the internal representation are still subject to change.
It was necessary to make sudo_user.runas but a char ** instead of a
char * since this value can be changed by a Defaults line.  There is a
similar (but more complicated) issue with sudo_user.prompt but it
is handled differently at the moment.

Add a "-L" flag to list the name of options with their descriptions.  This
may only be temporary.

Move some prototypes to parse.h

Be much less restrictive on what is allowed for a username.
1999-09-08 08:06:28 +00:00
Todd C. Miller
607e54b5e6 add strcasecmp proto 1999-08-28 09:59:18 +00:00
Todd C. Miller
a2b3e36e73 add FLAG_NO_CHECK 1999-08-26 09:06:41 +00:00
Todd C. Miller
0598093e2c sudoers_lookup() now returns a bitmap instead of an int. This makes it
possible to express things like "failed to validate because user not listed
for this host".  Some thigns that were previously VALIDATE_FOO are now
FLAG_FOO.  This may change later on.

Reorganized code in log_auth() and sudo.c to deal with above changes.

Safer versions of push/pushcp with in the do { ... } while (0) style

parse.yacc now saves info on the stack to allow parse.c to determine
if a user was listed, but not for the host he/she tried to run on.

Added --with-mail-if-no-host option
1999-08-19 16:30:09 +00:00
Todd C. Miller
804e168d90 o NewArgv and NewArgc don't need to be externally visible.
o If pedantic > 1, it is a parse error.
o Add -s (strict) option to visudo which sets pedantic to 2.
1999-08-17 15:29:47 +00:00
Todd C. Miller
d7ebfe06d1 o Digital UNIX needs to check for *snprintf() before -ldb is added to LIBS
since -ldb includes a bogus snprintf().
o Add forward refs for struct mbuf and struct rtentry for Digital UNIX.
o Reorder some functions in snprintf.c to fix -Wall
o Add missing includes to fix more -Wall
1999-08-12 16:24:10 +00:00
Todd C. Miller
76148d5316 o Move lock_file() and touch() into fileops.c so visudo can use them
o Visudo now locks the sudoers temp file instead of bailing when
the temp file already exists.  This fixes the problem of stale
temp files but it does *require* that you not try to put the
temp file in a world-writable directory.  This shoud not be
an issue as the temp file should live in the same dir as sudoers.
o Visudo now only installs the temp file as sudoers if it changed.
1999-08-07 09:59:43 +00:00
Todd C. Miller
27d6f353e2 o new defines for syslog facility and priority
o use new print_version() functino for -V mode
1999-08-05 10:51:02 +00:00
Todd C. Miller
6b3909c780 rename validate() to the more descriptive sudoers_lookup() 1999-08-01 15:42:12 +00:00
Todd C. Miller
0d732401f4 add 4th term to license similar to term 5 in the apache license 1999-07-31 16:19:50 +00:00
Todd C. Miller
794f537eef there was a 1995 release too 1999-07-31 16:02:13 +00:00
Todd C. Miller
fd410d4bcb add easprintf() and evasprintf(), error checking versions of asprintf() and vasprintf() 1999-07-22 16:22:47 +00:00
Todd C. Miller
95179ddffe o BSD copyright
o logging and parser bits moved to their own .h files
o new "struct sudo_user" to encapsulate many of the old globals.
1999-07-22 12:56:28 +00:00
Todd C. Miller
69a00325ec New (correct) PAM code
Tgetpass now takes an echo flag for use with PAM_PROMPT_ECHO_ON
Block SIGINT and SIGTSTP during auth
remove a useless umask setting
Change error from BAD_ALLOCATION -> BAD_AUTH_INIT (for use with sia/PAM)
Some cosmetic changes to auth.c for consistency
1999-07-05 20:14:21 +00:00
Todd C. Miller
406056d7e5 move authentication code to auth.c 1999-06-03 15:51:07 +00:00
Todd C. Miller
80287c981c Move interface-related defines to interfaces.h so we don't have to include
<netinet/in.h> everywhere.
1999-05-17 01:36:30 +00:00
Todd C. Miller
8e8fbc251e catch case where cmnd_safe is not set (this should not be possible) 1999-04-10 04:37:35 +00:00
Todd C. Miller
59b0cff8cf Stash the "safe" path (ie: the one listed in sudoers) to the command instead
of stashing the struct stat.  Should be safer.
1999-04-10 04:10:01 +00:00
Todd C. Miller
0d67007d1b In estrdup(), do the malloc ourselves so we don't need to rely on the
system strdup(3) which may or may not exist.  There is now no need to
provide strdup() for those w/o it.  Also, the prototype for estrdup()
was wrong, it returns char * and its param is const.
1999-04-06 17:55:01 +00:00
Todd C. Miller
d53f3818ad Kill GLOBAL_NO_SPW_ENT (not used) and crank GLOBAL_PROBLEM 1999-04-06 05:38:59 +00:00
Todd C. Miller
1818ace053 Definitions of *_matched were wrong--user top, not top-2 as subscript. 1999-04-06 05:08:40 +00:00
Todd C. Miller
499e869237 Add VALIDATE_NOT_OK_NOPASS for when user is not allowed to run a command
but the NOPASSWD flag was set.
Make runasspec, runaslist, runasuser, and nopasswd typeless in parse.yacc
Add support for '!' in the runas list
Fix double printing of '%' and '+' for groups and netgroups respectively
Add *_matched macros (no need for local stack variable).  Should only be
used directly after a pop (since top must be >= 2).
1999-04-06 05:00:29 +00:00
Todd C. Miller
e6deacb6c4 Crank version to 1.6 and combine copyright statements 1999-04-05 20:57:25 +00:00
Todd C. Miller
79c46d1c81 ++version 1999-03-29 04:05:15 +00:00
Todd C. Miller
382ef75493 Use emalloc/erealloc/estrdup 1999-03-29 02:59:34 +00:00
Todd C. Miller
a3029dedd8 If the user enters an empty password and really has no password, accept
the empty password they entered.  Perviously, they could enter anything
*but* an empty password.  Also, add GETPASS macro that calls either
tgetpass() or getpass() depending on how sudo was configured.
Problem noted by jdg@maths.qmw.ac.uk
1999-02-07 00:43:24 +00:00
Todd C. Miller
52916f16ac add explicate copyright 1999-02-03 04:32:19 +00:00
Todd C. Miller
2519622730 testing Sudo tag 1999-01-17 22:56:56 +00:00
Todd C. Miller
d3aaf52283 crank version and regen files 1999-01-17 22:40:55 +00:00
Todd C. Miller
3983a7a651 kerb5 support from fcusack@iconnet.net 1999-01-17 22:08:55 +00:00
Todd C. Miller
0900eabf3b go back to printing "command not found" unless --disable-path-info
specified.  Also, tell user when we ignore '.' in their path and
it would have been used but for --with-ignore-dot.
1998-11-08 20:56:52 +00:00
Todd C. Miller
1548a20d9a tgetpass now has the same args as getpass again 1998-11-03 20:03:12 +00:00
Todd C. Miller
261cdb5d87 add pass_warn() which prints out INCORRECT_PASSWORD or an insult to stderr 1998-10-24 23:28:04 +00:00
Todd C. Miller
1dffdd17c3 add SIA support 1998-10-19 00:22:38 +00:00
Todd C. Miller
16d565dd81 move Syslog_* defs into sudo.h 1998-10-18 23:10:18 +00:00
Todd C. Miller
f4bef103d5 added check_secureware 1998-10-18 22:16:10 +00:00
Todd C. Miller
0ef9f25d7e updated version 1998-09-17 16:27:15 +00:00
Todd C. Miller
0c040bfc59 HAVE_GETWD -> HAVE_GETCWD 1998-09-07 02:51:05 +00:00
Todd C. Miller
12477fd6e6 updated version 1998-04-06 03:35:50 +00:00
Todd C. Miller
36ef6aa489 fix version 1998-04-06 03:34:36 +00:00
Todd C. Miller
3b1be424aa updated version 1998-04-06 03:17:56 +00:00
Todd C. Miller
e37e1e56b6 updated version 1998-03-31 05:05:49 +00:00
Todd C. Miller
c866646cdf updated version 1998-02-18 21:39:31 +00:00
Todd C. Miller
2fc787d5f6 updated version 1998-02-17 02:43:17 +00:00