Commit Graph

5709 Commits

Author SHA1 Message Date
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
3e41e39be2 Don't set CC when cross-compiling. 2011-03-18 17:40:24 -04:00
Todd C. Miller
b87bd95d5b Credit Matthew Thomas for the sudoers_search_filter changes. 2011-03-18 13:05:47 -04:00
Todd C. Miller
f7db83d9b5 Add the .sym files to the MANIFEST 2011-03-18 10:41:46 -04:00
Todd C. Miller
cc4e1a372a Update for sudo 1.8.1 beta 2011-03-18 10:24:40 -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
5d7889c0d7 Save the controlling tty process group before suspending in pty
mode.  Previously, we assumed that the child pgrp == child pid
(which is usually, but not always, the case).
2011-03-18 10:04:50 -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
13b9c7b17b Remove the hack to disable -g in CFLAGS unless --with-devel 2011-03-17 18:43:46 -04:00
Todd C. Miller
c91d2a08a2 The '@' character does not normally need to be quoted. 2011-03-17 16:45:09 -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
27dbaa8ded Change trunk version to 1.8.x to distinguish from real 1.8.0. 2011-03-16 16:07:33 -04:00
Todd C. Miller
53ddb01f39 Document major changes in 1.8.1 and add upgrade notes. 2011-03-16 16:06:16 -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
de0df45cc9 configure will not add -O2 to CFLAGS if it is already defined to
add -O2 to the CFLAGS we pass in when PIE is being used.
2011-03-16 13:38:58 -04:00
Todd C. Miller
aa29582acc Warn about the dangers of log_input and mention iolog_file and iolog_dir
in the log_input and log_output descriptions.
2011-03-16 13:26:27 -04:00
Todd C. Miller
5c228d4244 sync with git version 2011-03-16 13:06:39 -04:00
Todd C. Miller
639903f132 It seems that h comes after i 2011-03-16 12:07:03 -04:00
Todd C. Miller
09f9796ea3 Move log_input and log_output to their proper, sorted, location.
Document set_utmp and utmp_runas.
2011-03-16 12:05:32 -04:00
Todd C. Miller
240642399b Save the controlling tty process group before suspending so we can
restore it when we resume.  Fixes job control problems on Linux
caused by the previous attemp to fix resuming a shell when I/O
logging not enabled.
2011-03-16 12:02:04 -04:00
Todd C. Miller
9e65afc15f Fix printing of the remainder after a newline. Fixes "sudo -l" output
corruption that could occur in some cases.
2011-03-16 10:26:10 -04:00
Todd C. Miller
2041d39db7 Add support for ut_exit 2011-03-15 16:18:33 -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
07968755aa For legacy utmp, strip the /dev/ prefix before trying to determine
slot since the ttys file does not include the /dev/ prefix.
2011-03-15 15:51:44 -04:00
Todd C. Miller
5e6bc4017b Add check for _PATH_UTMP 2011-03-15 11:56:49 -04:00
Todd C. Miller
bf5f17bd63 Adapt check_iolog_path to sessid changes 2011-03-14 11:30:32 -04:00
Todd C. Miller
8653ccc809 Redo utmp handling. If no getutent()/getutxent() is available,
assume a ttyslot-based utmp.  If getttyent() is available, use
that directly instead of ttyslot() so we don't have to do the
stdin dup2 dance.
2011-03-14 10:20:47 -04:00
Todd C. Miller
1e9def1efa Move utmp handling into utmp.c 2011-03-11 15:54:12 -05: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
9660f08e32 Document noexec in sample.sudo.conf and add back noexec_file section
in sudoers with a note that it is deprecated.
2011-03-11 11:34:11 -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
dc8012265f Document "Path noexec ..." in sudo.conf.
No longer document noexec_file in sudoers, it will be removed in a future
release.
2011-03-10 16:06:16 -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