]> granicus.if.org Git - sudo/log
sudo
14 years agoIn sudoers_io_close(), skip NULL io_fds[] elements.
Todd C. Miller [Tue, 8 Jun 2010 20:57:18 +0000 (16:57 -0400)]
In sudoers_io_close(), skip NULL io_fds[] elements.

14 years agoNo longer need NGROUPS_MAX define
Todd C. Miller [Tue, 8 Jun 2010 22:42:36 +0000 (18:42 -0400)]
No longer need NGROUPS_MAX define

14 years agoReplace timerfoo macros with timevalfoo since the timer macros are known
Todd C. Miller [Tue, 8 Jun 2010 22:38:23 +0000 (18:38 -0400)]
Replace timerfoo macros with timevalfoo since the timer macros are known
to be busted on some systems.

14 years agoRemove duplicate call to selinux_setup().
Todd C. Miller [Tue, 8 Jun 2010 20:16:08 +0000 (16:16 -0400)]
Remove duplicate call to selinux_setup().

14 years agoIf pam_open_session() fails, pass its status to pam_end.
Todd C. Miller [Tue, 8 Jun 2010 20:54:04 +0000 (16:54 -0400)]
If pam_open_session() fails, pass its status to pam_end.

14 years agoIf a file in a #includedir has improper permissions or owner just
Todd C. Miller [Tue, 8 Jun 2010 20:53:38 +0000 (16:53 -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).

14 years agoAdd use_pty sudoers option to force use of a pty even when not logging I/O.
Todd C. Miller [Tue, 8 Jun 2010 15:25:33 +0000 (11:25 -0400)]
Add use_pty sudoers option to force use of a pty even when not logging I/O.

14 years agoMake env_init() void as it never fails.
Todd C. Miller [Tue, 8 Jun 2010 14:23:35 +0000 (10:23 -0400)]
Make env_init() void as it never fails.

14 years agoNo longer use _NSGetEnviron so don't need crt_externs.h
Todd C. Miller [Tue, 8 Jun 2010 13:55:36 +0000 (09:55 -0400)]
No longer use _NSGetEnviron so don't need crt_externs.h

14 years agoRemove unused VNULL define
Todd C. Miller [Tue, 8 Jun 2010 13:44:19 +0000 (09:44 -0400)]
Remove unused VNULL define

14 years agoAdd #define for maximum session id
Todd C. Miller [Mon, 7 Jun 2010 22:53:58 +0000 (18:53 -0400)]
Add #define for maximum session id

14 years agoSplit exec.c into exec.c and exec_pty.c
Todd C. Miller [Mon, 7 Jun 2010 22:06:22 +0000 (18:06 -0400)]
Split exec.c into exec.c and exec_pty.c

14 years agoSync with source file moves.
Todd C. Miller [Mon, 7 Jun 2010 15:20:31 +0000 (11:20 -0400)]
Sync with source file moves.

14 years agoRename pty.c -> get_pty.c
Todd C. Miller [Mon, 7 Jun 2010 15:13:03 +0000 (11:13 -0400)]
Rename pty.c -> get_pty.c

14 years agoOnly use I/O input log file if def_log_input is set and output file
Todd C. Miller [Sun, 6 Jun 2010 15:54:46 +0000 (11:54 -0400)]
Only use I/O input log file if def_log_input is set and output file
if def_log_output is set.

14 years agoUpdate copyright year
Todd C. Miller [Fri, 4 Jun 2010 19:37:24 +0000 (15:37 -0400)]
Update copyright year

14 years agouid -> ttyuid
Todd C. Miller [Fri, 4 Jun 2010 18:20:03 +0000 (14:20 -0400)]
uid -> ttyuid

14 years agoFor sudoedit, make a local copy of editor string si become part of
Todd C. Miller [Fri, 4 Jun 2010 16:17:19 +0000 (12:17 -0400)]
For sudoedit, make a local copy of editor string si become part of
argv.  If no editor environment variable, split def_editor on ':'
since it may be a colon-delimited path.

14 years agoRemove unneeded endpwent()/endgrent()
Todd C. Miller [Fri, 4 Jun 2010 16:11:02 +0000 (12:11 -0400)]
Remove unneeded endpwent()/endgrent()

14 years agoUse value of nroff from configure
Todd C. Miller [Fri, 4 Jun 2010 13:40:01 +0000 (09:40 -0400)]
Use value of nroff from configure

14 years agoAdd missing const to I/O log action function
Todd C. Miller [Fri, 4 Jun 2010 13:10:05 +0000 (09:10 -0400)]
Add missing const to I/O log action function

14 years agoUpdate copyright year and fix whitespace
Todd C. Miller [Fri, 4 Jun 2010 13:09:39 +0000 (09:09 -0400)]
Update copyright year and fix whitespace

14 years agoFix typo
Todd C. Miller [Fri, 4 Jun 2010 13:09:19 +0000 (09:09 -0400)]
Fix typo

14 years agoRemove redundant tty signal blocking in log function.
Todd C. Miller [Fri, 4 Jun 2010 12:56:39 +0000 (08:56 -0400)]
Remove redundant tty signal blocking in log function.

14 years agoPlace static keyword where it belongs
Todd C. Miller [Thu, 3 Jun 2010 17:13:42 +0000 (13:13 -0400)]
Place static keyword where it belongs

14 years agoAlways use a printf format string for send_mail()
Todd C. Miller [Thu, 3 Jun 2010 13:48:39 +0000 (09:48 -0400)]
Always use a printf format string for send_mail()

14 years agoExtend atobool() so we can use it in the LDAP code.
Todd C. Miller [Thu, 3 Jun 2010 12:50:02 +0000 (08:50 -0400)]
Extend atobool() so we can use it in the LDAP code.

14 years agoSudo now stashes tty ctime for tty_tickets on Solaris too.
Todd C. Miller [Thu, 3 Jun 2010 12:32:53 +0000 (08:32 -0400)]
Sudo now stashes tty ctime for tty_tickets on Solaris too.

14 years agoFix dummy version of get_boottime()
Todd C. Miller [Thu, 3 Jun 2010 11:40:15 +0000 (07:40 -0400)]
Fix dummy version of get_boottime()

14 years agoEnable tty_is_devpts() support for Solaris with the "devices" filesystem.
Todd C. Miller [Wed, 2 Jun 2010 18:30:13 +0000 (14:30 -0400)]
Enable tty_is_devpts() support for Solaris with the "devices" filesystem.

14 years agoUnbreak the non-io logging case.
Todd C. Miller [Wed, 2 Jun 2010 18:23:38 +0000 (14:23 -0400)]
Unbreak the non-io logging case.

14 years agoFix symbol name conflict with sudo_printf.
Todd C. Miller [Wed, 2 Jun 2010 15:10:04 +0000 (11:10 -0400)]
Fix symbol name conflict with sudo_printf.

14 years agoFix OpenPAM detection for newer versions.
Todd C. Miller [Wed, 2 Jun 2010 14:33:02 +0000 (10:33 -0400)]
Fix OpenPAM detection for newer versions.

14 years agoSync with Quest sudo git repo
Todd C. Miller [Wed, 2 Jun 2010 14:32:31 +0000 (10:32 -0400)]
Sync with Quest sudo git repo

14 years agoHP-UX ld uses +b instead or -R or -rpath
Todd C. Miller [Wed, 2 Jun 2010 14:30:34 +0000 (10:30 -0400)]
HP-UX ld uses +b instead or -R or -rpath
Fix typo in libvas check
Add missing template for ENV_DEBUG
Adapted from Quest sudo

14 years agoFix typos; from Quest Sudo
Todd C. Miller [Wed, 2 Jun 2010 14:27:57 +0000 (10:27 -0400)]
Fix typos; from Quest Sudo

14 years agoAdd back -I$(top_srcdir); we need it for including compat/foo.h
Todd C. Miller [Tue, 1 Jun 2010 16:35:19 +0000 (12:35 -0400)]
Add back -I$(top_srcdir); we need it for including compat/foo.h
since we cannot rely on "foo.h" being found relative to the
source file when the cwd is different.

14 years agoFix a bug where we could treat EAGAIN as a permanent error.
Todd C. Miller [Tue, 1 Jun 2010 14:58:11 +0000 (10:58 -0400)]
Fix a bug where we could treat EAGAIN as a permanent error.
Also set cstat if perform_io() returns an error.

14 years agoAdd casts to quiet compiler warnings.
Todd C. Miller [Tue, 1 Jun 2010 13:54:03 +0000 (09:54 -0400)]
Add casts to quiet compiler warnings.

14 years agoFix typo in ternary operator usage.
Todd C. Miller [Tue, 1 Jun 2010 13:44:54 +0000 (09:44 -0400)]
Fix typo in ternary operator usage.

14 years agoAdd --enable-warnings and fix typo in SUDO_IO_LOGDIR
Todd C. Miller [Sun, 30 May 2010 15:16:31 +0000 (11:16 -0400)]
Add --enable-warnings and fix typo in SUDO_IO_LOGDIR

14 years agoUpdate docs to match sudoers I/O logging changes
Todd C. Miller [Sun, 30 May 2010 14:57:14 +0000 (10:57 -0400)]
Update docs to match sudoers I/O logging changes

14 years agoBreak sudoers transcript feature up into log_input and log_output.
Todd C. Miller [Sun, 30 May 2010 14:31:38 +0000 (10:31 -0400)]
Break sudoers transcript feature up into log_input and log_output.

14 years agoUse setprogname() as needed.
Todd C. Miller [Sun, 30 May 2010 10:35:21 +0000 (06:35 -0400)]
Use setprogname() as needed.

14 years agoAdapt sudoreplay to iolog changes.
Todd C. Miller [Sun, 30 May 2010 10:29:41 +0000 (06:29 -0400)]
Adapt sudoreplay to iolog changes.

14 years agoLog all input and output into separate files and store a number on
Todd C. Miller [Sat, 29 May 2010 23:44:33 +0000 (19:44 -0400)]
Log all input and output into separate files and store a number on
each timing file line to indicate which file the data is in.

14 years agoMake sudoers_io functions static to iolog.c
Todd C. Miller [Sat, 29 May 2010 14:43:34 +0000 (10:43 -0400)]
Make sudoers_io functions static to iolog.c

14 years agoCompletely remove the -L flag from the sudo front end.
Todd C. Miller [Fri, 28 May 2010 21:37:36 +0000 (17:37 -0400)]
Completely remove the -L flag from the sudo front end.

14 years agoFix EAGAIN handling when writing to stdout.
Todd C. Miller [Fri, 28 May 2010 17:24:07 +0000 (13:24 -0400)]
Fix EAGAIN handling when writing to stdout.

14 years agoEliminate unused variables
Todd C. Miller [Fri, 28 May 2010 17:21:56 +0000 (13:21 -0400)]
Eliminate unused variables

14 years agoRe-enable cleanup functions in sudoers plugin and sudo driver
Todd C. Miller [Fri, 28 May 2010 16:15:14 +0000 (12:15 -0400)]
Re-enable cleanup functions in sudoers plugin and sudo driver
for error()/errorx().

14 years agoUse sudo_printf to display verbose version information.
Todd C. Miller [Fri, 28 May 2010 16:01:06 +0000 (12:01 -0400)]
Use sudo_printf to display verbose version information.

14 years agoMinor Makefile cleanup: fix a typo, change the removal order in
Todd C. Miller [Fri, 28 May 2010 14:41:58 +0000 (10:41 -0400)]
Minor Makefile cleanup: fix a typo, change the removal order in
the clean targets, and remove a superfluous include path for
the sudoers plugin.

14 years agoHandle duplicate variables in the environment. For unsetenv(),
Todd C. Miller [Fri, 28 May 2010 13:42:50 +0000 (09:42 -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.

14 years agoUse explicit path to source file instead of $< for files that live
Todd C. Miller [Thu, 27 May 2010 22:11:51 +0000 (18:11 -0400)]
Use explicit path to source file instead of $< for files that live
in devdir and top_srcdir.

14 years agoAdd explicit rules to compile gram.c and toke.c for HP-UX
Todd C. Miller [Thu, 27 May 2010 22:00:08 +0000 (18:00 -0400)]
Add explicit rules to compile gram.c and toke.c for HP-UX
Pevent ending LIBSUDOERS_OBJS with a backslash

14 years agoLink libcommon before libreplace since libcommon may use functions
Todd C. Miller [Thu, 27 May 2010 21:48:17 +0000 (17:48 -0400)]
Link libcommon before libreplace since libcommon may use functions
only present in libreplace.

14 years agoMove code common to sudo and the sudoers plugin to a convenience library,
Todd C. Miller [Thu, 27 May 2010 21:29:09 +0000 (17:29 -0400)]
Move code common to sudo and the sudoers plugin to a convenience library,
libcommon.  Removes the need to make links in the sudoers plugin dir
and reduces re-compilation of duplicate object files.

14 years agoMove code common to sudo and the sudoers plugin to a convenience library,
Todd C. Miller [Thu, 27 May 2010 21:27:36 +0000 (17:27 -0400)]
Move code common to sudo and the sudoers plugin to a convenience library,
libcommon.  Removes the need to make links in the sudoers plugin dir
and reduces re-compilation of duplicate object files.

14 years agoRename script_execve to sudo_execve and rename script_foo in exec.c
Todd C. Miller [Thu, 27 May 2010 20:46:31 +0000 (16:46 -0400)]
Rename script_execve to sudo_execve and rename script_foo in exec.c

14 years agorename script.c exec.c and fix up the MANIFEST file
Todd C. Miller [Thu, 27 May 2010 20:32:41 +0000 (16:32 -0400)]
rename script.c exec.c and fix up the MANIFEST file

14 years agoRename script_setup() to pty_setup() and call from script_execve()
Todd C. Miller [Thu, 27 May 2010 20:29:48 +0000 (16:29 -0400)]
Rename script_setup() to pty_setup() and call from script_execve()
directly.

14 years agobump version to 1.8.0a2
Todd C. Miller [Thu, 27 May 2010 19:09:05 +0000 (15:09 -0400)]
bump version to 1.8.0a2

14 years agoDocument init_session
Todd C. Miller [Thu, 27 May 2010 19:07:43 +0000 (15:07 -0400)]
Document init_session

14 years agoClean up the sudoers auth API a bit and update the docs.
Todd C. Miller [Thu, 27 May 2010 18:53:11 +0000 (14:53 -0400)]
Clean up the sudoers auth API a bit and update the docs.

14 years agoAdd init_session function to struct policy_plugin that gets called
Todd C. Miller [Thu, 27 May 2010 18:46:39 +0000 (14:46 -0400)]
Add init_session function to struct policy_plugin that gets called
before the uid/gid/etc changes.  A struct passwd pointer is passed in,which may be NULL if the user does not exist in the passwd database.The sudoers module uses init_session to open the pam session as needed.

14 years agoAdd open/close session to sudo auth, only used by PAM.
Todd C. Miller [Wed, 26 May 2010 21:57:47 +0000 (17:57 -0400)]
Add open/close session to sudo auth, only used by PAM.
This allows us to open (and close) the PAM session from sudoers.

14 years agoAdd explicit rule to build getdate.o for HP-UX make.
Todd C. Miller [Wed, 26 May 2010 21:20:21 +0000 (17:20 -0400)]
Add explicit rule to build getdate.o for HP-UX make.

14 years agoBack out most of change 45e406ebdea2. Create dummy .l.c and .y.c
Todd C. Miller [Wed, 26 May 2010 21:01:00 +0000 (17:01 -0400)]
Back out most of change 45e406ebdea2.  Create dummy .l.c and .y.c
rules as an alternate way to prevent HP-UX make (and others) from
trying to rebuild the parser in non-dev mode.

14 years agoRe-enable PATH_MAX check for command
Todd C. Miller [Wed, 26 May 2010 20:33:35 +0000 (16:33 -0400)]
Re-enable PATH_MAX check for command

14 years agoFor distclean, clean the main directory last since the subdirs
Todd C. Miller [Wed, 26 May 2010 20:10:24 +0000 (16:10 -0400)]
For distclean, clean the main directory last since the subdirs
need to be able to run libtool to clean things.

14 years agoFix generation of mksiglist.h
Todd C. Miller [Wed, 26 May 2010 19:43:46 +0000 (15:43 -0400)]
Fix generation of mksiglist.h

14 years agoNow that we defer sending cstat until the end of script_child()
Todd C. Miller [Wed, 26 May 2010 15:19:17 +0000 (11:19 -0400)]
Now that we defer sending cstat until the end of script_child()
we cannot reuse cstat when reading command status from parent.

14 years agoUse numeric registers to handle conditionals instead of trying
Todd C. Miller [Tue, 25 May 2010 20:13:04 +0000 (16:13 -0400)]
Use numeric registers to handle conditionals instead of trying
to do it all with text processing.

14 years agoDocument per-command SELinux settings
Todd C. Miller [Tue, 25 May 2010 18:43:39 +0000 (14:43 -0400)]
Document per-command SELinux settings

14 years agoRepair "sudo -l -U username"
Todd C. Miller [Tue, 25 May 2010 18:21:21 +0000 (14:21 -0400)]
Repair "sudo -l -U username"

14 years agoSet selinux role and type in command details.
Todd C. Miller [Tue, 25 May 2010 17:58:16 +0000 (13:58 -0400)]
Set selinux role and type in command details.

14 years agoRework SELinux support.
Todd C. Miller [Tue, 25 May 2010 15:00:39 +0000 (11:00 -0400)]
Rework SELinux support.

14 years agoMake SELinux support compile again. Needs more work to be complete.
Todd C. Miller [Mon, 24 May 2010 22:18:50 +0000 (18:18 -0400)]
Make SELinux support compile again.  Needs more work to be complete.

14 years agoBring back closefrom settings.
Todd C. Miller [Mon, 24 May 2010 19:40:36 +0000 (15:40 -0400)]
Bring back closefrom settings.

14 years agoIf running a command or sudoedit in transcript mode, call io_nextid()
Todd C. Miller [Mon, 24 May 2010 18:30:54 +0000 (14:30 -0400)]
If running a command or sudoedit in transcript mode, call io_nextid()
before log_allowed() so the session id is logged.

14 years agoUse mandoc(1) if nroff(1) is not present.
Todd C. Miller [Mon, 24 May 2010 16:35:43 +0000 (12:35 -0400)]
Use mandoc(1) if nroff(1) is not present.

14 years agoUse the --file argument to config.status instead of setting CONFIG_FILES
Todd C. Miller [Mon, 24 May 2010 16:25:20 +0000 (12:25 -0400)]
Use the --file argument to config.status instead of setting CONFIG_FILES
in the environment.

14 years agoWe cannot conditionally update gram.h or the dependency ordering gets
Todd C. Miller [Mon, 24 May 2010 16:10:05 +0000 (12:10 -0400)]
We cannot conditionally update gram.h or the dependency ordering gets
messed up in devel mode.

14 years agoSubstitute @SHELL@ into Makefiles
Todd C. Miller [Sat, 22 May 2010 01:29:44 +0000 (21:29 -0400)]
Substitute @SHELL@ into Makefiles

14 years agoFix typo
Todd C. Miller [Sat, 22 May 2010 01:05:44 +0000 (21:05 -0400)]
Fix typo

14 years agoUpdate to autoconf 2.65
Todd C. Miller [Fri, 21 May 2010 23:25:17 +0000 (19:25 -0400)]
Update to autoconf 2.65

14 years agoFix libtool target (space vs. tabs)
Todd C. Miller [Fri, 21 May 2010 22:41:18 +0000 (18:41 -0400)]
Fix libtool target (space vs. tabs)

14 years agoRemove use of RETSIGTYPE; all modern systems have signal handlers that
Todd C. Miller [Fri, 21 May 2010 22:40:04 +0000 (18:40 -0400)]
Remove use of RETSIGTYPE; all modern systems have signal handlers that
return void.

14 years agoUpdate to libtool-2.2.6b. I haven't made any local modifications
Todd C. Miller [Fri, 21 May 2010 21:59:47 +0000 (17:59 -0400)]
Update to libtool-2.2.6b.  I haven't made any local modifications
this time, which should be OK since we install sudo_noexec.so by
hand now.

14 years agoUse libtool to clean objects
Todd C. Miller [Fri, 21 May 2010 20:53:21 +0000 (16:53 -0400)]
Use libtool to clean objects

14 years agoInstall sudo_plugin.h as part of "make install" and make other install
Todd C. Miller [Fri, 21 May 2010 20:52:31 +0000 (16:52 -0400)]
Install sudo_plugin.h as part of "make install" and make other install
targets callable from the top-level Makefile

14 years agoregen with autoupdate to eliminate AC_TRY_LINK
Todd C. Miller [Fri, 21 May 2010 19:53:39 +0000 (15:53 -0400)]
regen with autoupdate to eliminate AC_TRY_LINK

14 years agoInstall sudo_plugin.h as part of "make install" and make other install
Todd C. Miller [Fri, 21 May 2010 19:31:36 +0000 (15:31 -0400)]
Install sudo_plugin.h as part of "make install" and make other install
targets callable from the top-level Makefile

14 years agoThe sample plugin doesn't support being run with no args so return
Todd C. Miller [Fri, 21 May 2010 18:56:31 +0000 (14:56 -0400)]
The sample plugin doesn't support being run with no args so return
a usage error in this case.

14 years agoSet close on exec flag for descriptors used for I/O logging so they
Todd C. Miller [Fri, 21 May 2010 18:51:50 +0000 (14:51 -0400)]
Set close on exec flag for descriptors used for I/O logging so they
are not present in the command being run.

14 years agoSet close on exec flag in private versions of setpwent() and setgrent().
Todd C. Miller [Fri, 21 May 2010 18:51:05 +0000 (14:51 -0400)]
Set close on exec flag in private versions of setpwent() and setgrent().

14 years agoClose the I/O pipes aftering dup2()ing them to std{in,out,err}.
Todd C. Miller [Fri, 21 May 2010 18:50:26 +0000 (14:50 -0400)]
Close the I/O pipes aftering dup2()ing them to std{in,out,err}.
Fixes extra fds being present in the command when it is part of a pipeline.

14 years agoSet user_tty to "unknown" if there is no tty, like sudo 1.7 does
Todd C. Miller [Fri, 21 May 2010 16:19:55 +0000 (12:19 -0400)]
Set user_tty to "unknown" if there is no tty, like sudo 1.7 does
(it is used when logging).  Note that user_ttypath will still be
NULL if there is no tty.

14 years agoCosmetic changes:
Todd C. Miller [Fri, 21 May 2010 16:01:11 +0000 (12:01 -0400)]
Cosmetic changes:
    add comments, remove orphaned prototype and make a global static.