Todd C. Miller [Thu, 10 Jun 2004 20:53:03 +0000 (20:53 +0000)]
o Update some out of date bits to reality
o Change the shell promt in examples to bourne-shell style
o Clarify some details
o Add a CAVEAT about "sudo cd /foo"
Todd C. Miller [Tue, 8 Jun 2004 17:53:52 +0000 (17:53 +0000)]
Add a MATCHED macro for testing whether foo_matches has been set to
TRUE or FALSE. This is more readable than checking for >=0 or < 0.
Doesn't change the actual code generated.
Todd C. Miller [Sat, 5 Jun 2004 17:42:04 +0000 (17:42 +0000)]
Add NOMATCH and UNSPEC defines (-1 and -2 respectively) and use
these in parse.yacc. Also in parse.yacc initialize the *_matches
vars to UNSPEC and add two macros, SETMATCH and SETNMATCH for use
when setting *_matches to a value that may be NOMATCH/UNSPEC/TRUE/FALSE.
Todd C. Miller [Sat, 5 Jun 2004 17:42:04 +0000 (17:42 +0000)]
Add NOMATCH and UNSPEC defines (-1 and -2 respectively) and use
these in parse.yacc. Also in parse.yacc initialize the *_matches
vars to UNSPEC and add two macros, SETMATCH and SETNMATCH for use
when setting *_matches to a value that may be NOMATCH/UNSPEC/TRUE/FALSE.
Todd C. Miller [Sat, 5 Jun 2004 15:17:10 +0000 (15:17 +0000)]
Initialize runas to -2, not -1 since we need to be able to distinguish
between the initialized value and the value of a non-match when
passing along the runas value to multiple commands.
The result of this is that an unmatched runas is now set to -1, not 0.
This is required now that parse.c treats a FALSE value for runas as
being explicitly denied.
Todd C. Miller [Tue, 1 Jun 2004 20:53:31 +0000 (20:53 +0000)]
Better check for dirfd macro--we now set HAVE_DIRFD for the macro version too.
Added check for dd_fd in `DIR' if no dirfd is found; this is now used to
confitionally define the dirfd macro in compat.h.
Todd C. Miller [Tue, 1 Jun 2004 20:53:31 +0000 (20:53 +0000)]
Better check for dirfd macro--we now set HAVE_DIRFD for the macro version too.
Added check for dd_fd in `DIR' if no dirfd is found; this is now used to
confitionally define the dirfd macro in compat.h.
Todd C. Miller [Tue, 1 Jun 2004 20:53:31 +0000 (20:53 +0000)]
Better check for dirfd macro--we now set HAVE_DIRFD for the macro version too.
Added check for dd_fd in `DIR' if no dirfd is found; this is now used to
confitionally define the dirfd macro in compat.h.
Todd C. Miller [Mon, 31 May 2004 18:16:34 +0000 (18:16 +0000)]
o sysconf returns a long, not an int.
o check for negative return value from sysconf/getdtablesize and use
OPEN_MAX in this case.
o define OPEN_MAX to 256 for those without it (a fair guess...)
Todd C. Miller [Thu, 27 May 2004 19:55:06 +0000 (19:55 +0000)]
In sudoers_lookup() return VALIDATE_NOT_OK if the runas user was
explicitly denied and the command matched. This fixes a long-standing
bug and makes:
foo machine = (ALL) /usr/bin/blah
foo machine = (!bar) /usr/bin/blah
equivalent to:
foo machine = (ALL, !bar) /usr/bin/blah
Todd C. Miller [Mon, 17 May 2004 20:28:54 +0000 (20:28 +0000)]
No longer use /tmp/.odus as a possible timestamp dir unless specifically
configured to do so. Instead, if no /var/run exists, use /var/adm/sudo
or /usr/adm/sudo.
Todd C. Miller [Mon, 17 May 2004 20:28:53 +0000 (20:28 +0000)]
No longer use /tmp/.odus as a possible timestamp dir unless specifically
configured to do so. Instead, if no /var/run exists, use /var/adm/sudo
or /usr/adm/sudo.
Todd C. Miller [Mon, 17 May 2004 20:28:53 +0000 (20:28 +0000)]
No longer use /tmp/.odus as a possible timestamp dir unless specifically
configured to do so. Instead, if no /var/run exists, use /var/adm/sudo
or /usr/adm/sudo.
Todd C. Miller [Mon, 17 May 2004 20:28:53 +0000 (20:28 +0000)]
No longer use /tmp/.odus as a possible timestamp dir unless specifically
configured to do so. Instead, if no /var/run exists, use /var/adm/sudo
or /usr/adm/sudo.