]> granicus.if.org Git - sudo/log
sudo
13 years agoMark defaults descriptions for translation
Todd C. Miller [Tue, 17 May 2011 16:52:20 +0000 (12:52 -0400)]
Mark defaults descriptions for translation

13 years agoUpdate for sudo 1.8.1p2
Todd C. Miller [Tue, 17 May 2011 15:59:40 +0000 (11:59 -0400)]
Update for sudo 1.8.1p2

13 years agoQuiet compiler warning when SELinux is enabled.
Todd C. Miller [Mon, 16 May 2011 20:52:34 +0000 (16:52 -0400)]
Quiet compiler warning when SELinux is enabled.

13 years agoAdd missing includes of libintl.h.
Todd C. Miller [Mon, 16 May 2011 20:50:09 +0000 (16:50 -0400)]
Add missing includes of libintl.h.

13 years agoFix gettext marker.
Todd C. Miller [Mon, 16 May 2011 20:44:11 +0000 (16:44 -0400)]
Fix gettext marker.

13 years agoInclude libint.h where needed.
Todd C. Miller [Mon, 16 May 2011 20:37:11 +0000 (16:37 -0400)]
Include libint.h where needed.

13 years agoPrepare sudoers module messages for translation.
Todd C. Miller [Mon, 16 May 2011 20:32:05 +0000 (16:32 -0400)]
Prepare sudoers module messages for translation.

13 years agoOnly check gid of sudoers file if it is group-readable.
Todd C. Miller [Mon, 16 May 2011 16:19:07 +0000 (12:19 -0400)]
Only check gid of sudoers file if it is group-readable.

13 years agoFor AIX, keep calling authenticate() until reenter reaches 0.
Todd C. Miller [Mon, 16 May 2011 16:17:49 +0000 (12:17 -0400)]
For AIX, keep calling authenticate() until reenter reaches 0.

13 years agoCache the status of the initial gettext() check.
Todd C. Miller [Mon, 9 May 2011 15:04:19 +0000 (11:04 -0400)]
Cache the status of the initial gettext() check.

13 years agoAdd --disable-nls flag and improve checks for gettext.
Todd C. Miller [Mon, 9 May 2011 14:58:52 +0000 (10:58 -0400)]
Add --disable-nls flag and improve checks for gettext.

13 years agoWhen building with gcc on HP-UX, use -march=1.1 to produce portable
Todd C. Miller [Mon, 9 May 2011 14:02:16 +0000 (10:02 -0400)]
When building with gcc on HP-UX, use -march=1.1 to produce portable
binaries on a pa-risc2 host.  Previously, the +Dportable option was
used for the HP-UX C compiler but gcc always produced native binaries.

13 years agoPrepare sudo front end messages for translation.
Todd C. Miller [Fri, 6 May 2011 21:47:51 +0000 (17:47 -0400)]
Prepare sudo front end messages for translation.

13 years agoAdd initial scaffolding to support localization via gettext()
Todd C. Miller [Wed, 4 May 2011 19:26:31 +0000 (15:26 -0400)]
Add initial scaffolding to support localization via gettext()

13 years agoDon't let the fnmatch/glob macros expand the function prototype.
Todd C. Miller [Wed, 4 May 2011 15:21:03 +0000 (11:21 -0400)]
Don't let the fnmatch/glob macros expand the function prototype.

13 years agoResolve namespace collisions on HP-UX ia64 and possibly others by
Todd C. Miller [Tue, 3 May 2011 17:45:56 +0000 (13:45 -0400)]
Resolve namespace collisions on HP-UX ia64 and possibly others by
adding a rpl_ prefix to our fnmatch and glob replacements and
#defining rpl_foo to foo in the header files.

13 years agoSplit ALL, ROLE and TYPE into their own actions. Since you can
Todd C. Miller [Fri, 29 Apr 2011 20:05:50 +0000 (16:05 -0400)]
Split ALL, ROLE and TYPE into their own actions.  Since you can
only have #ifdefs inside of braces, ROLE and TYPE use a naughty
goto in the non-SELinux case.  This is safe because the actions are
in one big switch() statement.

13 years agoFix regexp for matching a CIDR-style IPv4 netmask. From Marc Espie.
Todd C. Miller [Fri, 29 Apr 2011 15:22:49 +0000 (11:22 -0400)]
Fix regexp for matching a CIDR-style IPv4 netmask.  From Marc Espie.

13 years agoaskpass moved from sudoers to sudo.conf in sudo 1.8.0
Todd C. Miller [Wed, 27 Apr 2011 15:48:46 +0000 (11:48 -0400)]
askpass moved from sudoers to sudo.conf in sudo 1.8.0

13 years agoRemove obsolete warning about runas_default and ordering.
Todd C. Miller [Wed, 27 Apr 2011 15:42:46 +0000 (11:42 -0400)]
Remove obsolete warning about runas_default and ordering.
Move syslog facility and priority lists into the section where
the relevant options are described.

13 years agoFix SIA support; we no longer have access to the real argc and argv
Todd C. Miller [Tue, 26 Apr 2011 13:51:34 +0000 (09:51 -0400)]
Fix SIA support; we no longer have access to the real argc and argv
so allocate space for a fake one and use the argv passed to the
plugin with "sudo" for argv[0].

13 years agoRemove useless realloc when trying to get the buffer size right.
Todd C. Miller [Sat, 23 Apr 2011 10:14:36 +0000 (06:14 -0400)]
Remove useless realloc when trying to get the buffer size right.

13 years agoBe explicit when setting euid to 0 before call to setreuid(0, 0)
Todd C. Miller [Sat, 23 Apr 2011 10:13:48 +0000 (06:13 -0400)]
Be explicit when setting euid to 0 before call to setreuid(0, 0)

13 years agoNeed to do checks for krb5_verify_user, krb5_init_secure_context
Todd C. Miller [Mon, 18 Apr 2011 13:22:26 +0000 (09:22 -0400)]
Need to do checks for krb5_verify_user, krb5_init_secure_context
and krb5_get_init_creds_opt_alloc regardless of whether or not
krb5-config is present.

13 years agoWork around weird AIX saved uid semantics on setuid() and setreuid().
Todd C. Miller [Fri, 15 Apr 2011 16:30:08 +0000 (12:30 -0400)]
Work around weird AIX saved uid semantics on setuid() and setreuid().
On AIX, setuid() will only set the saved uid if the euid is already 0.

13 years agoupdate copyright year
Todd C. Miller [Thu, 14 Apr 2011 20:41:38 +0000 (16:41 -0400)]
update copyright year

13 years agoTreat a missing includedir like an empty one and do not return an error.
Todd C. Miller [Thu, 14 Apr 2011 18:27:11 +0000 (14:27 -0400)]
Treat a missing includedir like an empty one and do not return an error.

13 years agoFix ARCH setting in cross-compile Solaris packages.
Todd C. Miller [Tue, 12 Apr 2011 15:52:41 +0000 (11:52 -0400)]
Fix ARCH setting in cross-compile Solaris packages.

13 years agoFix aix version setting.
Todd C. Miller [Tue, 12 Apr 2011 15:50:20 +0000 (11:50 -0400)]
Fix aix version setting.

13 years agoRemove extraneous parens in LDAP filter when sudoers_search_filter
Todd C. Miller [Tue, 12 Apr 2011 15:48:04 +0000 (11:48 -0400)]
Remove extraneous parens in LDAP filter when sudoers_search_filter
is enabled that causes a search error.  From Matthew Thomas.

13 years agoCorrect sizeof() to fix test failure.
Todd C. Miller [Mon, 11 Apr 2011 15:41:38 +0000 (11:41 -0400)]
Correct sizeof() to fix test failure.

13 years ago"install" target should depend on "install-dirs".
Todd C. Miller [Mon, 11 Apr 2011 12:27:59 +0000 (08:27 -0400)]
"install" target should depend on "install-dirs".
Fixes "make -j" problem and closes bz #487.  From Chris Coleman.

13 years agoAdd HAVE_RFC1938_SKEYCHALLENGE
Todd C. Miller [Thu, 7 Apr 2011 11:04:26 +0000 (07:04 -0400)]
Add HAVE_RFC1938_SKEYCHALLENGE

13 years agoMention plugin loading and libgcc changes
Todd C. Miller [Wed, 6 Apr 2011 21:57:10 +0000 (17:57 -0400)]
Mention plugin loading and libgcc changes

13 years agoLoad plugins after parsing arguments and potentially printing the
Todd C. Miller [Wed, 6 Apr 2011 21:51:36 +0000 (17:51 -0400)]
Load plugins after parsing arguments and potentially printing the
version.  That way, an error loading or initializing a plugin doesn't
break "sudo -h" or "sudo -V".

13 years agoWhen using a sub-shell to invoke the sub-make, exec make instead of
Todd C. Miller [Wed, 6 Apr 2011 19:32:04 +0000 (15:32 -0400)]
When using a sub-shell to invoke the sub-make, exec make instead of
running it inside the shell to avoid an extra process.

13 years agoStop testing unspecified behavior in fnmatch
Todd C. Miller [Wed, 6 Apr 2011 19:13:23 +0000 (15:13 -0400)]
Stop testing unspecified behavior in fnmatch
Make glob test more portable

13 years agoNo need to add current dir to include path and having it breaks the
Todd C. Miller [Wed, 6 Apr 2011 19:12:34 +0000 (15:12 -0400)]
No need to add current dir to include path and having it breaks the
test programs that expect to get the system glob.h and fnmatch.h

13 years agoFix and document --with-plugindir; partially from Diego Elio Petteno
Todd C. Miller [Wed, 6 Apr 2011 16:02:49 +0000 (12:02 -0400)]
Fix and document --with-plugindir; partially from Diego Elio Petteno

13 years agoFix fnmatch and glob tests to not use hard-coded flag values in the
Todd C. Miller [Wed, 6 Apr 2011 14:57:39 +0000 (10:57 -0400)]
Fix fnmatch and glob tests to not use hard-coded flag values in the
input file.  Link test programs with libreplace so we get our
replacement verions as needed.

13 years agoIf make in a subdir fails, fail the target in the upper level Makefile too.
Todd C. Miller [Wed, 6 Apr 2011 14:15:54 +0000 (10:15 -0400)]
If make in a subdir fails, fail the target in the upper level Makefile too.
Adapted from a patch from Diego Elio Petteno

13 years agoAdd check for NetBSD-style 4-argument skeychallenge() as Gentoo also
Todd C. Miller [Wed, 6 Apr 2011 14:08:57 +0000 (10:08 -0400)]
Add check for NetBSD-style 4-argument skeychallenge() as Gentoo also
has this.  Adapted from a patch from Diego Elio Petteno

13 years agoMake SUDOERS_LDFLAGS reference $(LDFLAGS) instead of using @LDFLAGS@
Todd C. Miller [Wed, 6 Apr 2011 14:06:51 +0000 (10:06 -0400)]
Make SUDOERS_LDFLAGS reference $(LDFLAGS) instead of using @LDFLAGS@
directly.

13 years agoFix warnings when -without-skey, --without-opie, --without-kerb4,
Todd C. Miller [Wed, 6 Apr 2011 13:33:07 +0000 (09:33 -0400)]
Fix warnings when -without-skey, --without-opie, --without-kerb4,
--without-kerb5 or --without-SecurID were specified.

13 years agoAdd plugins/sudoers/sudoers_version.h
Todd C. Miller [Wed, 6 Apr 2011 12:34:39 +0000 (08:34 -0400)]
Add plugins/sudoers/sudoers_version.h

13 years agoBack out the --with-libpath addition to SUDOERS_LDFLAGS since that
Todd C. Miller [Wed, 6 Apr 2011 11:01:17 +0000 (07:01 -0400)]
Back out the --with-libpath addition to SUDOERS_LDFLAGS since that
now include LDFLAGS in the sudoers Makefile.in.
Add missing settng of @LDFLAGS@ in plugin Makefile.in files.

13 years agoMention %#gid support in User_List and Runas_List
Todd C. Miller [Tue, 5 Apr 2011 22:15:05 +0000 (18:15 -0400)]
Mention %#gid support in User_List and Runas_List

13 years agoKeep track of sudoers grammar version and report it in the -V output.
Todd C. Miller [Tue, 5 Apr 2011 15:47:31 +0000 (11:47 -0400)]
Keep track of sudoers grammar version and report it in the -V output.

13 years agoAdd multiple inclusion guard
Todd C. Miller [Tue, 5 Apr 2011 15:42:53 +0000 (11:42 -0400)]
Add multiple inclusion guard

13 years agoThe --with-libpath option now adds to SUDOERS_LDFLAGS as well as LDFLAGS.
Todd C. Miller [Tue, 5 Apr 2011 13:42:59 +0000 (09:42 -0400)]
The --with-libpath option now adds to SUDOERS_LDFLAGS as well as LDFLAGS.
Remove old -static hack for HP-UX < 9.
Add LTLDFLAGS and set it to -Wc,-static-libgcc if not using GNU ld so we
    don't have a dependency on the shared libgcc in sudoers.so.

13 years agoFix typo; from Petr Uzel
Todd C. Miller [Tue, 5 Apr 2011 13:13:18 +0000 (09:13 -0400)]
Fix typo; from Petr Uzel

13 years agoIn dump-only mode, use "root" as the default username instead of
Todd C. Miller [Fri, 1 Apr 2011 17:54:30 +0000 (13:54 -0400)]
In dump-only mode, use "root" as the default username instead of
"nobody" as the latter may not be available on all systems.

13 years agoRemove NewArgv/NewArgc, they are no longer needed.
Todd C. Miller [Thu, 31 Mar 2011 18:06:11 +0000 (14:06 -0400)]
Remove NewArgv/NewArgc, they are no longer needed.

13 years agoFix setting of user_args
Todd C. Miller [Thu, 31 Mar 2011 17:57:05 +0000 (13:57 -0400)]
Fix setting of user_args

13 years agoAdd '!' token to lex tracing
Todd C. Miller [Thu, 31 Mar 2011 17:42:05 +0000 (13:42 -0400)]
Add '!' token to lex tracing

13 years agoUse group bin in test, not wheel as most systems have the bin group
Todd C. Miller [Thu, 31 Mar 2011 16:54:17 +0000 (12:54 -0400)]
Use group bin in test, not wheel as most systems have the bin group
but the same is no longer true of wheel.

13 years agoAvoid using pre or post increment in a parameter to a ctype(3)
Todd C. Miller [Thu, 31 Mar 2011 16:48:01 +0000 (12:48 -0400)]
Avoid using pre or post increment in a parameter to a ctype(3)
function as it might be a macro that causes the increment to happen
more than once.

13 years agoStrip off the beta or release candidate version when building AIX
Todd C. Miller [Wed, 30 Mar 2011 16:25:41 +0000 (12:25 -0400)]
Strip off the beta or release candidate version when building AIX
packages.

13 years agoWe need to include OSDEFS in CFLAGS when doing the utmp/utmpx
Todd C. Miller [Wed, 30 Mar 2011 14:14:25 +0000 (10:14 -0400)]
We need to include OSDEFS in CFLAGS when doing the utmp/utmpx
structure checks for glibc which only has __e_termination visible
when _GNU_SOURCE is *not* defined.

13 years agogetuserattr(user, ...) will fall back to the "default" entry
Todd C. Miller [Wed, 30 Mar 2011 12:54:38 +0000 (08:54 -0400)]
getuserattr(user, ...) will fall back to the "default" entry
automatically, there's no need to check "default" manually.

13 years agoDocument parser changes.
Todd C. Miller [Tue, 29 Mar 2011 21:57:46 +0000 (17:57 -0400)]
Document parser changes.

13 years agoIf there is an existing sudoers file, only install if it passes a
Todd C. Miller [Tue, 29 Mar 2011 19:20:32 +0000 (15:20 -0400)]
If there is an existing sudoers file, only install if it passes a
syntax check.

13 years agoAdd runasgroup support to testsudoers
Todd C. Miller [Tue, 29 Mar 2011 18:40:07 +0000 (14:40 -0400)]
Add runasgroup support to testsudoers

13 years agoFor "make check", keep going even if a test fails.
Todd C. Miller [Tue, 29 Mar 2011 18:39:02 +0000 (14:39 -0400)]
For "make check", keep going even if a test fails.

13 years agoMore useful exit codes:
Todd C. Miller [Tue, 29 Mar 2011 17:09:58 +0000 (13:09 -0400)]
More useful exit codes:
 * 0 - parsed OK and command matched.
 * 1 - parse error
 * 2 - command not matched
 * 3 - command denied

13 years agoDocument %#gid, and %:#nonunix_gid syntax.
Todd C. Miller [Tue, 29 Mar 2011 16:53:37 +0000 (12:53 -0400)]
Document %#gid, and %:#nonunix_gid syntax.

13 years agoAdd support to user_in_group() for treating group names that begin with
Todd C. Miller [Tue, 29 Mar 2011 15:29:43 +0000 (11:29 -0400)]
Add support to user_in_group() for treating group names that begin with
a '#' as gids.

13 years agoAdd explicit check for struct utmpx.ut_exit.e_termination
Todd C. Miller [Tue, 29 Mar 2011 13:10:40 +0000 (09:10 -0400)]
Add explicit check for struct utmpx.ut_exit.e_termination
and struct utmpx.ut_exit.__e_termination.  HP-UX uses the latter.
Only update ut_exit if we detect one or the other.

13 years agoAdd back missing #include of config.h
Todd C. Miller [Mon, 28 Mar 2011 18:50:55 +0000 (14:50 -0400)]
Add back missing #include of config.h

13 years agoAvoid a NULL deref on unrecognized escapes.
Todd C. Miller [Mon, 28 Mar 2011 16:54:41 +0000 (12:54 -0400)]
Avoid a NULL deref on unrecognized escapes.
Collapse %% -> % like strftime() does.

13 years agoQuote first argument to AC_DEFUN(); from Elan Ruusamae
Todd C. Miller [Mon, 28 Mar 2011 13:36:01 +0000 (09:36 -0400)]
Quote first argument to AC_DEFUN(); from Elan Ruusamae

13 years agoadd new sudoers tests
Todd C. Miller [Sun, 27 Mar 2011 22:29:55 +0000 (18:29 -0400)]
add new sudoers tests

13 years agoAdd test for a newline in the middle of a string when no line continuation
Todd C. Miller [Sun, 27 Mar 2011 21:22:02 +0000 (17:22 -0400)]
Add test for a newline in the middle of a string when no line continuation
character is used.

13 years agoUse bitwise AND instead of modulus to check for length being odd.
Todd C. Miller [Sun, 27 Mar 2011 21:12:45 +0000 (17:12 -0400)]
Use bitwise AND instead of modulus to check for length being odd.
A newline in the middle of a string is an error unless a line
continuation character is used.

13 years agoMove lexer globals initialization into init_lexer.
Todd C. Miller [Sun, 27 Mar 2011 13:45:42 +0000 (09:45 -0400)]
Move lexer globals initialization into init_lexer.

13 years agoFix a potential crash when a non-regular file is present in an
Todd C. Miller [Sun, 27 Mar 2011 13:27:43 +0000 (09:27 -0400)]
Fix a potential crash when a non-regular file is present in an
includedir.  Fixes bz #452

13 years agoOn some Linux systems, "uname -p" contains detailed processor info
Todd C. Miller [Sun, 27 Mar 2011 13:24:52 +0000 (09:24 -0400)]
On some Linux systems, "uname -p" contains detailed processor info
so check "uname -m" first and then "uname -p" if needed.
Recognize PLD Linux.

13 years agoDon't need all sudoers.h here.
Todd C. Miller [Fri, 25 Mar 2011 14:22:19 +0000 (10:22 -0400)]
Don't need all sudoers.h here.

13 years agoPrint sudo version early, in case policy plugin init fails.
Todd C. Miller [Fri, 25 Mar 2011 13:58:08 +0000 (09:58 -0400)]
Print sudo version early, in case policy plugin init fails.

13 years agoUpdate to match change in input.
Todd C. Miller [Thu, 24 Mar 2011 15:15:11 +0000 (11:15 -0400)]
Update to match change in input.

13 years agoMake an empty group or netgroup a syntax error.
Todd C. Miller [Thu, 24 Mar 2011 15:00:30 +0000 (11:00 -0400)]
Make an empty group or netgroup a syntax error.

13 years agoAn empty group or netgroup should be a syntax error.
Todd C. Miller [Thu, 24 Mar 2011 15:00:05 +0000 (11:00 -0400)]
An empty group or netgroup should be a syntax error.

13 years agoCheck that uids work in per-user and per-runas Defaults
Todd C. Miller [Thu, 24 Mar 2011 14:40:03 +0000 (10:40 -0400)]
Check that uids work in per-user and per-runas Defaults
Check that uids and gids work in a Command_Spec

13 years agoTest empty string in User_Alias and Command_Spec
Todd C. Miller [Thu, 24 Mar 2011 14:39:25 +0000 (10:39 -0400)]
Test empty string in User_Alias and Command_Spec

13 years agoAllow a group ID in the User_Spec.
Todd C. Miller [Thu, 24 Mar 2011 14:37:34 +0000 (10:37 -0400)]
Allow a group ID in the User_Spec.

13 years agoReturn an error for the empty string when a word is expected.
Todd C. Miller [Wed, 23 Mar 2011 22:51:57 +0000 (18:51 -0400)]
Return an error for the empty string when a word is expected.
Allow an ID for per-user or per-runas Defaults.

13 years agoFix printing "User_Alias FOO = ALL"
Todd C. Miller [Wed, 23 Mar 2011 20:00:30 +0000 (16:00 -0400)]
Fix printing "User_Alias FOO = ALL"

13 years agoBetter error message about invalid -C argument
Todd C. Miller [Tue, 22 Mar 2011 14:19:32 +0000 (10:19 -0400)]
Better error message about invalid -C argument

13 years agofix typo
Todd C. Miller [Tue, 22 Mar 2011 14:03:10 +0000 (10:03 -0400)]
fix typo

13 years agoFix placement of equal size ('=') in user specification summary.
Todd C. Miller [Tue, 22 Mar 2011 13:40:24 +0000 (09:40 -0400)]
Fix placement of equal size ('=') in user specification summary.

13 years agoupdate to match sudoers regress
Todd C. Miller [Mon, 21 Mar 2011 22:52:03 +0000 (18:52 -0400)]
update to match sudoers regress

13 years agoRestore ability to define TRACELEXER and have trace output go to stderr.
Todd C. Miller [Mon, 21 Mar 2011 21:57:38 +0000 (17:57 -0400)]
Restore ability to define TRACELEXER and have trace output go to stderr.

13 years agoRestore old behavior of setting sawspace = TRUE for command line
Todd C. Miller [Mon, 21 Mar 2011 21:46:50 +0000 (17:46 -0400)]
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.

13 years agoAdd test for line continuation and aliases
Todd C. Miller [Mon, 21 Mar 2011 19:21:51 +0000 (15:21 -0400)]
Add test for line continuation and aliases

13 years agoMake test output line up nicely for parse vs. toke
Todd C. Miller [Mon, 21 Mar 2011 19:09:47 +0000 (15:09 -0400)]
Make test output line up nicely for parse vs. toke

13 years agoMove parser tests to sudoers directory and test the tokenizer output too.
Todd C. Miller [Mon, 21 Mar 2011 19:08:49 +0000 (15:08 -0400)]
Move parser tests to sudoers directory and test the tokenizer output too.

13 years agoIf we match a rule anchored to the beginning of a line after parsing
Todd C. Miller [Mon, 21 Mar 2011 16:48:33 +0000 (12:48 -0400)]
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.

13 years agoMove LEXTRACE macro to toke.h so we can use it in yyerror().
Todd C. Miller [Mon, 21 Mar 2011 16:39:06 +0000 (12:39 -0400)]
Move LEXTRACE macro to toke.h so we can use it in yyerror().

13 years agoMake lex tracing settable at run-time in testsudoers via the -t
Todd C. Miller [Mon, 21 Mar 2011 01:25:57 +0000 (21:25 -0400)]
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.

13 years agoAllow whitespace after the modifier in a Defaults entry.
Todd C. Miller [Sun, 20 Mar 2011 16:24:36 +0000 (12:24 -0400)]
Allow whitespace after the modifier in a Defaults entry.
E.g. "Defaults: username set_home"