Commit Graph

7566 Commits

Author SHA1 Message Date
Todd C. Miller
6be0a820d0 Bug 661 2014-09-20 09:35:51 -06:00
Todd C. Miller
7ab40be5c0 On AIX, _PATH_BSHELL is /usr/bin/bsh but we want to use /usr/bin/sh
(which is usually ksh).  This makes sudo's behavior when executing
a shell without the #! magic number match execvp() on AIX.
2014-09-20 09:21:51 -06:00
Todd C. Miller
d4d724b886 Whitespace changes. 2014-09-20 09:09:01 -06:00
Todd C. Miller
c952155b77 Prefer /usr/bin/sh to /bin/sh to match modern systems. 2014-09-20 09:03:26 -06:00
Todd C. Miller
f5647654dd Don't use SSP_CFLAGS or PIE_CFLAGS when building mksiglist/mksigname
as they are built with the host compiler which may be different
when cross-compiling.  From Gustavo Zacarias.  Bug 662.
2014-09-20 06:46:27 -06:00
Todd C. Miller
ae137ba557 Sync with translationproject.org 2014-09-17 10:12:12 -06:00
Todd C. Miller
09a876ceda Make sure we can't insert an nss entry in the list that has already
been used before.
2014-09-16 14:15:30 -06:00
Todd C. Miller
e7de8f66ff Use correct gettext macro with sudo_warnx() 2014-09-16 14:01:02 -06:00
Todd C. Miller
109b2116cc Make nsswitch.conf bug fix description more accurrate. It affects
the "files" nsswitch source too.
2014-09-16 13:38:38 -06:00
Todd C. Miller
52b675d748 Mention nsswitch.conf duplicate entry fix. 2014-09-16 12:54:13 -06:00
Todd C. Miller
15dee8745d Make sudoers file nsswitch functions static to parse.c since they
are self-contained.
2014-09-15 15:11:30 -06:00
Todd C. Miller
f9ac177763 Fix infinite loop when mulitple sudoers entries are present in
nsswitch.conf.  From Daniel Kopecek.
2014-09-15 07:40:33 -06:00
Todd C. Miller
326167bad1 Fix for bug #660 2014-09-10 06:01:29 -06:00
Todd C. Miller
d1fe802f08 Fix compilation on systems without openpty(), _getpty() or grantpt().
From Vasilyy Balyasnyy
2014-09-10 05:57:31 -06:00
Todd C. Miller
398a16c6af Remove remaining use of SUDO_CONV_DEBUG_MSG. 2014-09-08 16:37:33 -06:00
Todd C. Miller
4913e02b40 SUDO_CONV_DEBUG_MSG is no longer supported. 2014-09-08 16:34:47 -06:00
Todd C. Miller
393e57b82c regen 2014-09-08 16:33:58 -06:00
Todd C. Miller
e20475922d There is no longer a reason for the plugin to init the debug subsystem
itself.  It will always be initialized by the front-end if needed.
2014-09-08 16:24:32 -06:00
Todd C. Miller
0f735f6581 Add function arg names to prototypes where missing. 2014-09-08 14:43:01 -06:00
Todd C. Miller
d557aee1ec Remove obsolete definition of SIZE_T which is now handled by
sudo_compat.h and rename the format arg to fmt in sudo_evasprintf_v1()
for consistency with sudo_easprintf_v1().
2014-09-08 14:30:17 -06:00
Todd C. Miller
1cc2433428 If we were invoked with any name ending in "edit", treat as sudoedit. 2014-09-08 09:37:39 -06:00
Todd C. Miller
5fcc7a8f27 regen 2014-09-04 10:15:32 -06:00
Todd C. Miller
328c563791 Check return value of sigaction(), even though it should never fail. 2014-09-04 10:13:26 -06:00
Todd C. Miller
111136dc8b regen 2014-09-03 10:32:02 -06:00
Todd C. Miller
2cc8ac30a1 Add hexchar unit test 2014-09-03 10:31:47 -06:00
Todd C. Miller
b3586c46e2 Avoid division by zero if there was no test data. 2014-09-03 10:29:46 -06:00
Todd C. Miller
f95ca8d4f0 Remove confusing comment. 2014-09-02 15:00:23 -06:00
Todd C. Miller
4fa58d6974 Use a stack buffer for the debug message when possible, most are small. 2014-09-02 14:36:05 -06:00
Todd C. Miller
f6e738feeb Sync with translationproject.org 2014-09-01 12:47:22 -06:00
Todd C. Miller
0546f0b6a2 Convert a debug printf to a user-visible warning. 2014-08-31 20:32:18 -06:00
Todd C. Miller
8bc688188f Move sudo_printf extern to sudo_util.h 2014-08-31 18:46:26 -06:00
Todd C. Miller
a07ce849f7 Some versions of the HP C Compiler don't export functions that take
function pointers as arguments unless a typedef is used.
2014-08-31 18:33:30 -06:00
Todd C. Miller
73d5fb33e7 Work around a bug in the HP C compiler. 2014-08-31 15:21:48 -06:00
Todd C. Miller
152178e4be Don't need sudo_fatal.h 2014-08-31 14:20:44 -06:00
Todd C. Miller
6fdf9028ee Sync with translationproject.org 2014-08-30 16:28:08 -06:00
Todd C. Miller
cfa4cebf13 Remove signal_event from evbase before calling sudo_ev_loopexit()
when the command has exited or been killed.  It is possible that
we could receive another signal on the pipe if they are delivered
out of order.
2014-08-30 16:24:53 -06:00
Todd C. Miller
26e61adc50 Treat EOF on signal pipe (which should never happen) as ECONNRESET. 2014-08-29 11:20:17 -06:00
Todd C. Miller
2b849b2687 Don't allow sudo_ev_loopcont() to override sudo_ev_loopexit() 2014-08-29 09:47:08 -06:00
Todd C. Miller
e9370718f9 Add some internal convenience functions. 2014-08-29 09:44:08 -06:00
Todd C. Miller
ef11361eea Fix osrelease sed expression. It wasn't matching distros with a
single digit version such as sles9.
2014-08-26 15:47:48 -06:00
Todd C. Miller
191a0569f3 Sync with translationproject.org 2014-08-26 13:55:48 -06:00
Todd C. Miller
af9306cd81 Return -1 from logging functions if we get a write error. 2014-08-26 13:54:29 -06:00
Todd C. Miller
1345ebbcc7 Mention I/O plugin changes. 2014-08-26 13:41:32 -06:00
Todd C. Miller
acdb6d3690 Change behavior when plugin I/O logging function returns 0 or -1.
For -1 (error) return, we now kill the command and disable
the I/O logging function that returned the error.
For a 0 (reject) return, we no longer display the rejected
output to the user's terminal.  The plugin API revision is now 1.6.
2014-08-26 12:07:57 -06:00
Todd C. Miller
3e13662f35 regen to fix version. 2014-08-26 12:05:09 -06:00
Todd C. Miller
136e6e616f Add trivial dirty word check to the sample output logging function. 2014-08-26 12:04:25 -06:00
Todd C. Miller
f0af3bb6b2 Update for 1.8.11b2 2014-08-25 13:05:38 -06:00
Todd C. Miller
79f209dbd7 Fix restoration of effective uid/gid in command_details.
This masked the effects an unset (really zero) egid.
Bug 656
2014-08-25 11:30:03 -06:00
Todd C. Miller
4f1deee575 Set runas egid to the same value as runas gid if egid not specified
by the plugin.  Only affects new files created by sudoedit.  Bug #656
2014-08-25 11:27:30 -06:00
Todd C. Miller
5676d9874d Don't leak temp fd in sudo_edit_copy_tfiles().
Fix fd leak in error path in sudo_edit_copy_tfiles().
2014-08-25 10:42:59 -06:00