Todd C. Miller [Fri, 6 Aug 2004 23:24:41 +0000 (23:24 +0000)]
Error out when targetpw is enabled and sudo is run with -u #uid but
#uid does not exist in the passwd database. We can't do target
authentication when the target is not in passwd!
Todd C. Miller [Mon, 2 Aug 2004 18:44:58 +0000 (18:44 +0000)]
Don't pass user_cmnd and user_args to command_matches(), just use
the globals there. Since we keep state with statics anyway it is
misleading to pretend that passing in different cmnd and cmnd_args
will work.
Todd C. Miller [Mon, 2 Aug 2004 18:44:58 +0000 (18:44 +0000)]
Don't pass user_cmnd and user_args to command_matches(), just use
the globals there. Since we keep state with statics anyway it is
misleading to pretend that passing in different cmnd and cmnd_args
will work.
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...)