Commit Graph

454 Commits

Author SHA1 Message Date
Todd C. Miller
cf8caed3bb Fix printing "User_Alias FOO = ALL" 2011-03-23 16:00:30 -04:00
Todd C. Miller
06bf685b33 Restore ability to define TRACELEXER and have trace output go to stderr. 2011-03-21 17:57:38 -04:00
Todd C. Miller
a2297743aa Restore old behavior of setting sawspace = TRUE for command line
args when a line continuation character is hit to avoid causing
problems for existing sudoers files.
2011-03-21 17:46:50 -04:00
Todd C. Miller
0a4c000854 Add test for line continuation and aliases 2011-03-21 15:21:51 -04:00
Todd C. Miller
2f6c096fb5 Make test output line up nicely for parse vs. toke 2011-03-21 15:09:47 -04:00
Todd C. Miller
830fce0f19 Move parser tests to sudoers directory and test the tokenizer output too. 2011-03-21 15:08:49 -04:00
Todd C. Miller
c7dd8399eb If we match a rule anchored to the beginning of a line after parsing
a line continuation character, return an ERROR token.  It would be
nicer to use REJECT instead but that substantially slows down the
lexer.
2011-03-21 12:48:33 -04:00
Todd C. Miller
edfb5cd7a2 Move LEXTRACE macro to toke.h so we can use it in yyerror(). 2011-03-21 12:39:06 -04:00
Todd C. Miller
a27b3f3407 Make lex tracing settable at run-time in testsudoers via the -t
flag.  Trace output goes to stderr.  Will be used by regress tests
to check lexer.
2011-03-20 21:25:57 -04:00
Todd C. Miller
f083e72a57 Allow whitespace after the modifier in a Defaults entry.
E.g. "Defaults: username set_home"
2011-03-20 12:24:36 -04:00
Todd C. Miller
33516ed826 user_shell -> run_shell to avoid confusion with the user's SHELL variable. 2011-03-18 10:23:35 -04:00
Todd C. Miller
e8776da730 Add support for sudoers_search_filter setting in ldap.conf. This
can be used to restrict the set of records returned by the LDAP
query.
2011-03-18 09:38:42 -04:00
Todd C. Miller
6170002e6f We normaly transition from GOTDEFS to STARTDEFS on whitespace, but
if that whitespace is followed by a comma, we want to treat it as
part of a list and not transition.
2011-03-17 16:36:13 -04:00
Todd C. Miller
b7487ae489 Add check for whitespace when a User_List is used for a per-user
Defaults entry.
2011-03-17 16:33:11 -04:00
Todd C. Miller
1c0917aa39 Expand quoted name checks to cover recent fixes. 2011-03-17 15:48:00 -04:00
Todd C. Miller
88e35a1932 Fix parsing of double-quoted names in Defaultd and Aliases which was
broken in 601d97ea8792.
2011-03-17 15:06:55 -04:00
Todd C. Miller
95bf624417 toke_util.c lives in $(srcdir) not $(devdir) 2011-03-17 14:33:25 -04:00
Todd C. Miller
092b4b4d02 Be careful not to deref user_stat if it is NULL. This cannot currently
happen in sudo but might in other programs using the parser.
2011-03-16 15:59:44 -04:00
Todd C. Miller
3506f01077 Add support for controlling whether utmp is updated and which user is
listed in the entry.
2011-03-15 15:53:49 -04:00
Todd C. Miller
cf7ec7a3cc Fix typo; tupple vs. tuple 2011-03-15 15:52:18 -04:00
Todd C. Miller
bf5f17bd63 Adapt check_iolog_path to sessid changes 2011-03-14 11:30:32 -04:00
Todd C. Miller
53da5e8cdf Update copyright years. 2011-03-11 15:34:35 -05:00
Todd C. Miller
cde2cb00f0 Add "user_shell" boolean as a way to indicate to the plugin that
the -s flag was given.
2011-03-11 15:02:13 -05:00
Todd C. Miller
6e2778eb22 Move sessid out of sudo_user. 2011-03-11 14:07:26 -05:00
Todd C. Miller
383aef00b1 Log the TSID even if it is not a simple session ID. 2011-03-11 12:11:05 -05:00
Todd C. Miller
6bea3f524e Fix running commands as non-root on systems where setreuid() changes
the saved uid based on the effective uid we are changing to.
2011-03-11 10:48:12 -05:00
Todd C. Miller
7debf44742 Move noexec path into sudo.conf now that sudo itself handles noexec.
Currently can be configured in sudoers too but is now undocumented
and will be removed in a future release.
2011-03-10 16:12:33 -05:00
Todd C. Miller
a092d2fdcf Move noexec handling to sudo front-end where it is documented as being. 2011-03-10 15:11:49 -05:00
Todd C. Miller
c7a7d31905 Add support for disabling exec via solaris privileges.
Includes preparation for moving noexec support out of sudoers
and into front end as documented.
2011-03-10 14:24:10 -05:00
Todd C. Miller
7599034e69 Only export the symbols corresponding to the plugin structs. 2011-03-10 12:12:14 -05:00
Todd C. Miller
498248d1f0 Install plugins manually instead of using libtool. This works
around a problem on AIX where libtool will install a .a file
containing the .so file instead of the .so file itself.
2011-03-10 10:57:56 -05:00
Todd C. Miller
9c9c0223e6 Avoid pulling in headers we don't need on Linux
For getutx?id(), call setutx?ent() first and always call endutx?ent().
2011-03-08 15:34:34 -05:00
Todd C. Miller
d6252de205 Fix return value of "sudo -l command" when command is not allowed, broken
in [c7097ea22111].  The default return value is now TRUE and a bad:
label is used when permission is denied.  Also fixed missing permissions
restoration on certain errors.  On error()/errorx(), the password and
group files are now closed before returning.
2011-03-08 09:38:21 -05:00
Todd C. Miller
47968912a2 Fix passing of login class back to sudo front end. 2011-03-07 16:55:08 -05:00
Todd C. Miller
e65bc35c6d Fix exit value for validate and list mode. 2011-03-06 15:52:40 -05:00
Todd C. Miller
a0ba308694 Fix non-interactive mode with sudoers plugin. 2011-03-06 15:38:02 -05:00
Todd C. Miller
85e8e584ae Add support for replaying sessions when iolog_file is set to something
other than %{seq}.
2011-03-04 20:10:44 -05:00
Todd C. Miller
f5e356ed40 If we are killed by a signal, display the name of the signal that got us. 2011-03-04 16:12:40 -05:00
Todd C. Miller
95512ae05e No longer need sudo_getepw() stubs. 2011-03-04 08:08:22 -05:00
Todd C. Miller
8ee8a0d87a Fix exit value of "sudo -l command" in sudoers module. 2011-03-03 09:38:15 -05:00
Todd C. Miller
4688f1ce60 fix test description 2011-02-23 15:39:24 -05:00
Todd C. Miller
a64bd36b33 convert test2 to use testsudoers 2011-02-23 15:26:13 -05:00
Todd C. Miller
3c0672e2e3 Allow sudoers file name, mode, uid and gid to be specified in the
settings list.  The sudo front end does not currently set these
but may in the future.
2011-02-23 13:38:52 -05:00
Todd C. Miller
59515a4a6d add help text to sudo, visudo and sudoreplay for the -h option 2011-02-21 11:33:36 -05:00
Todd C. Miller
435e44808d add localstatedir; closes bug 471 2011-02-19 08:29:21 -05:00
Todd C. Miller
39d9feb438 The howmany macro lives in sys/sysmacros.h on SVR5 systems
Closes Bug 470
2011-02-19 08:23:46 -05:00
Todd C. Miller
c3d795ff95 Avoid printing empty "Runas and Command-specific defaults for user"
line.
2011-02-14 11:29:20 -05:00
Todd C. Miller
289afc301e Remove unneeded variable. 2011-02-11 09:47:23 -05:00
Todd C. Miller
63449de859 Include utmp.h / utmpx.h before missing.h as apparently including it
afterwards causes a compilation problem on GNU Hurd.
2011-02-09 15:09:57 -05:00
Todd C. Miller
4294650039 #include "foo.h", not <foo.h> for local includes. 2011-02-07 10:51:43 -05:00