2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-29 13:28:10 +00:00

928 Commits

Author SHA1 Message Date
Todd C. Miller
47835ff289 Rename missing.h -> sudo_compat.h 2014-07-22 14:25:16 -06:00
Todd C. Miller
844a285391 Version the functions in libsudo_util 2014-07-22 11:26:17 -06:00
Todd C. Miller
127ba1354b Rename gettext.h -> sudo_gettext.h 2014-07-21 14:49:43 -06:00
Todd C. Miller
3687b665cb Rename fatal.h -> sudo_fatal.h 2014-07-21 14:40:18 -06:00
Todd C. Miller
b45727cefa Rename queue.h -> sudo_queue.h to avoid collisions with the system
version.
2014-07-21 14:37:27 -06:00
Todd C. Miller
fb96eb2445 Error out if sesh is run as a login shell but the shell it needs
to run has no slash.  This shouldn't happen in practice.
2014-07-14 09:56:38 -06:00
Todd C. Miller
d5ecc1590d Audit failed user role changes. RedHat bz #665131 2014-07-12 10:04:19 -06:00
Todd C. Miller
3f216cc2be When running a login shell via sesh, make new argv[0] -shell, not
/path/to-shell.  RedHat bz #1065418
2014-07-12 06:51:00 -06:00
Todd C. Miller
36a5767e3e efree -> sudo_efree for consistency 2014-07-10 15:35:04 -06:00
Todd C. Miller
78d2b42b7e Remove @SOEXT@ and @SHLIB_EXT@ now that we use libtool to install
shared objects.  Instead, use the new @SHLIB_ENABLE@ that is set
to the value of $enable_dlopen.  For sudo_noexec.so there is nothing
special to do since the install-noexec target is only called when
noexec is enabled by configure.
2014-07-08 20:19:09 -06:00
Todd C. Miller
12c3b456d8 Add sudo_warn_strerror() that wraps strerror() with calls to
setlocale() in sudoers so we always get the error string in the
user's locale.  Also change _warning() to take the error number as
a parameter instead of examining errno.
2014-07-08 09:52:21 -06:00
Todd C. Miller
2bad717548 Avoid a cppcheck warning when NSIG is not defined. 2014-07-03 16:55:01 -06:00
Todd C. Miller
4e1e76a4b1 Use libtool to install/uninstall the plugins and sudo_noexec. 2014-06-29 20:45:36 -06:00
Todd C. Miller
a8fa112a53 atobool -> sudo_strtobool
atoid-> sudo_strtoid
atomode -> sudo_strtomode
2014-06-27 14:53:54 -06:00
Todd C. Miller
2be0929f22 Handle systems like AIX that lack a way to set the modification
time on open fds.
2014-06-27 11:47:16 -06:00
Todd C. Miller
2d61d38c23 Add sudo_ prefix to alloc.c functions and rename alloc.h -> sudo_alloc.h 2014-06-27 10:48:31 -06:00
Todd C. Miller
8e088e65c0 Split fileops.c into parseln.c and locking.c 2014-06-27 09:46:24 -06:00
Todd C. Miller
aecef4aa1d Rename warning/fatal -> sudo_warn/sudo_fatal to avoid namespace
pollution in libsudo_util.so.
2014-06-27 09:30:52 -06:00
Todd C. Miller
d36846a699 Reduce name space pollution in libsudo_util.so 2014-06-26 16:21:19 -06:00
Todd C. Miller
9b3c19cc36 Use sudo_dso_load() from libsudo_util.so instead of dlopen() since
we no longer link sudo directly with libdl.so.
2014-06-26 16:01:24 -06:00
Todd C. Miller
7bafa63c15 Don't pollute the namespace with lbuf struct and functions 2014-06-26 15:51:15 -06:00
Todd C. Miller
6bdee0488c Rename parse_gid_list -> sudo_parse_gids to avoid namespace pollution. 2014-06-26 15:51:15 -06:00
Todd C. Miller
9ba5d82926 Rename fmt_string -> sudo_new_key_val to better describe its function. 2014-06-26 15:51:15 -06:00
Todd C. Miller
f029e3e744 Remove touch() from fileops.c and just call utimes/futimes directly.
Rename lock_file -> sudo_lock_file to avoid namespace pollution
2014-06-26 15:51:15 -06:00
Todd C. Miller
088edcb6f5 Add exported libsudo_util functions to util.exp and mark in headers
using __dso_public.
2014-06-26 15:51:15 -06:00
Todd C. Miller
4d37a4a162 Top level directory reorg
Move src/po -> po
Combine common and compat -> lib/util
Move zlib -> lib/zlib
2014-06-26 15:51:02 -06:00
Todd C. Miller
826e190f31 Ignore signals sent by the command's process group, not just the
command itself.  If we cannot determine the process group ID of the
sender (as it may no longer exist), just check the process ID.
2014-05-28 09:50:14 -06:00
Todd C. Miller
b121da2e21 In handler_user_only() only forward the signal if it was not generated
by the command.  This should fix a problem with programs that catch
SIGTSTP, perform cleanup, and then re-send the signal to their
process group (of which sudo is the leader).
2014-05-27 10:51:31 -06:00
Todd C. Miller
d628e17ead Handle EINTR from write(2) when writing to pipes and socket pairs. 2014-05-27 10:16:49 -06:00
Todd C. Miller
4eb0122e98 Norwegian Bokmaal translation for sudo from translationproject.com 2014-05-23 13:29:20 -06:00
Todd C. Miller
70f6249764 Sync with translationproject.org 2014-05-10 15:55:03 -06:00
Todd C. Miller
9cdf7797cf When comparing tty names, resolve the tty for fds 0-3 and compare
each one instead of just using the first that resolves.
2014-05-07 15:25:05 -06:00
Todd C. Miller
7f0b9eca03 Add debugging info for when we delete I/O events that still have
buffered data in them.
2014-05-02 14:58:01 -06:00
Todd C. Miller
134b2a4228 Rename emalloc2() -> emallocarray() and erealloc3() -> ereallocarray(). 2014-04-22 16:02:28 -06:00
Todd C. Miller
ac3ffde5e8 parse_gid_list() now returns -1 on error instead of calling fatalx(). 2014-04-07 05:33:36 -06:00
Todd C. Miller
36b991348c Forward SIGINFO to running command if supported. If the command
is being run in the background (or exec_background is set in sudoers),
it is the sudo process, not the actual command, that receives the ^T.
2014-04-04 15:30:15 -06:00
Todd C. Miller
a1240a5417 Use common printf format when warning of buffer overflow prevention. 2014-03-31 15:58:24 -06:00
Todd C. Miller
6a7ebd280b Fix aliasing warning in old-style interface probe code. 2014-03-25 16:16:19 -06:00
Todd C. Miller
250e8e750c Don't call fatal/fatalx in common/*.c 2014-03-25 16:16:10 -06:00
Todd C. Miller
f12a546a5e Don't run the check_ttyname test if cross compiling. 2014-03-11 09:16:21 -06:00
Todd C. Miller
7dec05d7d4 sync with translationproject.org 2014-03-07 14:48:13 -07:00
Todd C. Miller
ed87af2ae4 Catalan translation for sudo from translationproject.org. 2014-03-06 11:58:08 -07:00
Todd C. Miller
0e9b4d30cc Remove init.d file and link in uninstall target. 2014-02-16 15:07:22 -07:00
Todd C. Miller
96d87d55dd First cut add installing an init.d file for HP-UX and AIX to remove
old sudo timestamp files at boot time.
2014-02-16 10:22:43 -07:00
Todd C. Miller
12a1b672c0 We must include gettext.h before missing.h as it includes system
headers.  Also add missing DEFAULT_TEXT_DOMAIN defines in sudoers
audit code that does not include sudoers.h.
2014-02-11 09:40:59 -07:00
Todd C. Miller
151f001d81 Export getenv() so it is visible to shared objects we link with. 2014-02-11 07:34:04 -07:00
Todd C. Miller
135c85e152 In term_restore(), only restores the terminal if we are in the
foregroup process group.  Instead of calling tcgetpgrp(), which is
racy, we set a temporary handler for SIGTTOU and check whether it
was received after a failed call to tcsetattr().
2014-02-05 12:03:58 -07:00
Todd C. Miller
31858894c4 When the closefrom limit is greater than any of the preserved fds,
the pfds list will be non-empty but lastfd will be -1 triggering
an ecalloc(0) assertion.  Instead, test for lastfd being -1 and
make sure we always update it, even if dup() fails.
Also restore initial value of lowfd after we are done relocating.
Fixes bug #633
2014-02-04 06:22:19 -07:00
Todd C. Miller
b1de1bce33 term_restore() now restarts itself so we don't need to do it ourselves. 2014-02-03 20:36:48 -07:00
Todd C. Miller
b813c4de48 Use sudo_timeval macros and remove compat macros from missing.h 2014-01-30 15:51:59 -07:00