Todd C. Miller [Mon, 14 Jun 2010 14:20:15 +0000 (10:20 -0400)]
Updates from Alain Roy to provide better examples for importing the
schema and to fix problems caused by Windows validating attributes
which have not yet been added before committing the changes.
Todd C. Miller [Fri, 11 Jun 2010 13:54:48 +0000 (09:54 -0400)]
Remove tfd from struct sudoersfile; it is not used.
Add prev pointer to struct sudoersfile.
Declare list of sudoersfile using TQ_DECLARE.
Use tq_append to append sudoers entries to the tail queue.
Todd C. Miller [Thu, 10 Jun 2010 21:53:27 +0000 (17:53 -0400)]
A comment character may not be part of a command line argument
unless it is quoted with a backslash. Fixes parsing of:
testuser ALL=NOPASSWD: /usr/bin/wl #comment foo bar
closes bz #441
Todd C. Miller [Tue, 8 Jun 2010 22:51:20 +0000 (18:51 -0400)]
Add definition of WCOREDUMP for systems without it. This is known
to work on AIX and SunOS 4, but may be incorrect on other systems
that lack WCOREDUMP.
Todd C. Miller [Tue, 8 Jun 2010 20:52:21 +0000 (16:52 -0400)]
If a file in a #includedir has improper permissions or owner just
skip it. This prevents packages that incorrectly install a file
into /etc/sudoers.d from breaking sudo so easily. Syntax errors
in #includedir files still result in a parse error (for now).
Todd C. Miller [Tue, 8 Jun 2010 14:26:15 +0000 (10:26 -0400)]
Instead of trying to keep the global environment in sync with our
private copy, provide our own getenv() that returns values from the
private environment and use env_get() to pass the environment in
to run_command().
Todd C. Miller [Mon, 7 Jun 2010 21:28:05 +0000 (17:28 -0400)]
Split exec.c into exec.c and exec_pty.c
Pass a flag in to sudo_execve to indicate whether we need to
wait for the command to finish (fork + execve vs. execve).
Todd C. Miller [Fri, 4 Jun 2010 21:44:43 +0000 (17:44 -0400)]
Do signal setup after turning off echo, not before. If we are using
a tty but are not the foreground pgrp this will generate SIGTTOU
so we want the default action to be taken (suspend process).
Use an array for signals received instead of a single variable so
we don't lose any when there are multiple different signals.
Todd C. Miller [Thu, 3 Jun 2010 15:31:22 +0000 (11:31 -0400)]
Pass in output function to lbuf_init() instead of writing to stdout.
A side effect is that the usage info can now go to stderr as it
should. Add support for embedded newlines in lbuf and use that
instead of multiple calls to lbuf_print.
Todd C. Miller [Thu, 3 Jun 2010 12:00:31 +0000 (08:00 -0400)]
Store info from stat(2)ing the tty in the tty ticket when tty tickets
are in use. If the tty lives on a devpts (Linux) or devices (Solaris)
filesystem, stash the ctime in the tty ticket file, as it is not
updated when the tty is written to. This helps us determine when
a tty has been reused without the user authenticating again with
sudo.
Todd C. Miller [Wed, 2 Jun 2010 14:25:20 +0000 (10:25 -0400)]
HP-UX ld uses +b instead or -R or -rpath
Fix typo in libvas check
libvas may need libdl for dlopen()
Add missing template for ENV_DEBUG
Adapted from Quest sudo
Todd C. Miller [Fri, 28 May 2010 13:45:01 +0000 (09:45 -0400)]
Handle duplicate variables in the environment. For unsetenv(),
keep looking even after remove the first instance. For sudo_putenv(),
check for and remove dupes after we replace an existing value.
Todd C. Miller [Wed, 14 Apr 2010 10:24:27 +0000 (06:24 -0400)]
Set errorfile to the sudoers path if we set parse_error manually.
This prevents a NULL dereference in printf() when checking a sudoers
file in strict mode when alias errors are present.
Todd C. Miller [Fri, 9 Apr 2010 10:10:07 +0000 (06:10 -0400)]
Qualify the command even if it is in the current working directory,
e.g. "./foo" instead of just returning "foo". This removes an ambiguity
between real commands and possible pseudo-commands in command matching.
Todd C. Miller [Mon, 8 Mar 2010 19:27:30 +0000 (14:27 -0500)]
Use parent process group id instead of parent process id when checking
foreground status and suspending parent. Fixes an issue when running
commands under /usr/bin/time and others.