Commit Graph

7991 Commits

Author SHA1 Message Date
Todd C. Miller
f2f5c2949c Add line number to debug log for memory allocation errors. 2015-07-14 14:47:12 -06:00
Todd C. Miller
7187c19c83 Add warning if calloc() fails.
Add debugging for other unexpected errors.
2015-07-14 14:00:18 -06:00
Todd C. Miller
ff5b6dbb60 Add missing check for calloc(3) return value. 2015-07-14 13:56:29 -06:00
Todd C. Miller
5125f82c4e Document that the values printed by "sudo -V" are affected by
Defaults settings in sudoers.
2015-07-13 12:58:25 -06:00
Todd C. Miller
374146f70f Avoid calling dlerror() multiple times since it clear the error
status after printing the error.
Problem caused by sudo_warn/sudo_fatal being macros...
2015-07-10 10:31:21 -06:00
Todd C. Miller
42666204e2 Attempt to clarify the conditions under which MAIL and HOME are
set to the target user.
2015-07-10 10:02:38 -06:00
Todd C. Miller
4870060e91 Better checks for the libaudit package for Debian and error out
if we can't figure it out.
2015-07-09 13:01:43 -06:00
Todd C. Miller
d11ffce668 Fix linux_audit setting on non-multiarch Debian. 2015-07-09 11:36:51 -06:00
Todd C. Miller
2460636095 Fix typo that broke the linux_audit dependency on Debian. 2015-07-09 11:06:03 -06:00
Todd C. Miller
2f00f170fc Mention /proc/stat btime fix. 2015-07-09 10:45:33 -06:00
Todd C. Miller
43a57126ea Solaris 2.6 has the prototypes for inet_pton() and inet_ntop() in
resolv.h.
2015-07-09 10:11:25 -06:00
Todd C. Miller
b73d96804b Sprinkle debugging for boottime. 2015-07-09 10:10:34 -06:00
Todd C. Miller
6c9e92aba6 The old Solaris /bin/sh doesn't support POSIX $( .. ) syntax,
use backquotes instead.
2015-07-09 09:34:22 -06:00
Todd C. Miller
2d0699a070 Only use --with-sssd-lib on Debian/Ubuntu w/ multipackage.
Use dpkg-query to determine the name of the audit package
for proper dependencies.
2015-07-08 18:13:39 -06:00
Todd C. Miller
c3b4e4ce3e Update Debian/Ubuntu packages to be more like the vendor ones. One
notable exception is that sudo.ws packages use /var/run, not /var/lib
for timestamp files.
2015-07-08 16:15:53 -06:00
Todd C. Miller
06ad0f6424 Strip newline from /proc/stat btime line to avoid a strtonum() failure.
From Jakub Wilk.
2015-07-08 15:13:14 -06:00
Todd C. Miller
61182c87ea In io_callback() service writes before reads. That way, if both
SUDO_EV_READ and SUDO_EV_WRITE are set and read() returns 0 (EOF)
we don't close the fd before the write() is performed.

If the write() returns EPIPE, ENXIO, EIO or EBADF, clear SUDO_EV_READ
before we close the fd to avoid calling read() on a closed fd.
2015-07-08 10:12:15 -06:00
Todd C. Miller
445e6f2e9a Check sudo_conf_read() return value and exit on fatal error (a
warning was already printed by sudo_conf_read()).
2015-07-07 13:17:50 -06:00
Todd C. Miller
4620bc31c8 Mention double-quoted sudoOption value support. 2015-07-07 11:28:49 -06:00
Todd C. Miller
ea85db3ecd Add support for parsing quoted strings in a sudoOption just like
sudoers Defaults settings.
2015-07-07 10:58:05 -06:00
Todd C. Miller
e3586e2a43 Sync with translationproject.org 2015-07-07 10:34:37 -06:00
Todd C. Miller
d0be015178 Update year. 2015-07-06 16:45:33 -06:00
Todd C. Miller
d4dcc65059 Sync with translationproject.org 2015-07-06 16:44:23 -06:00
Todd C. Miller
854c084956 Fix utmp setup broken by commit be0ca60facf8 2015-07-06 13:56:39 -06:00
Todd C. Miller
ef69b7c734 Sync with translationproject.org 2015-07-03 07:28:00 -06:00
Todd C. Miller
b3353b99d4 regen 2015-07-03 07:12:30 -06:00
Todd C. Miller
701534c63c Fix typo in error message. 2015-07-03 07:06:29 -06:00
Todd C. Miller
7583e8d760 Bug #702 is the AIX timespec issue. 2015-07-02 14:06:16 -06:00
Todd C. Miller
d77941c2be We require POSIX so no need to conditionally include dirent.h.
Add a check for d_namlen and use the result in the NAMLEN macro.
2015-07-02 09:24:48 -06:00
Todd C. Miller
0b241088b3 There's no need to conditionalize the #include <unistd.h>, we require
a POSIX system.
2015-07-02 09:08:28 -06:00
Todd C. Miller
540b09b32c Remove some compatibilty defines that should no longer be needed. 2015-07-02 09:07:15 -06:00
Todd C. Miller
a89dd2f469 Final changes in 1.8.14 2015-06-30 14:29:39 -06:00
Todd C. Miller
8f9aa5af25 Need to include stddef.h to get rsize_t on Mac OS X for sudo_memset_s()
prototype.
2015-06-30 14:11:53 -06:00
Todd C. Miller
5e695d4cd9 Add missing exit value. 2015-06-30 12:19:24 -06:00
Todd C. Miller
662f9ec562 Add missing fcntl.h include. 2015-06-30 12:19:17 -06:00
Todd C. Miller
433c3dca58 Do check for inet_pton before inet_ntop since we may need to record
dependent libraries for inet_pton when linking our getaddrinfo
replacement.
2015-06-30 10:57:42 -06:00
Todd C. Miller
105f199f6b Fix build on compilers w/o __func__ or __FUNCTION__ 2015-06-30 10:41:14 -06:00
Todd C. Miller
44f7ed3b11 Remove sudo_evasprintf_v1, missed during alloc.c removal. 2015-06-30 10:37:06 -06:00
Todd C. Miller
b756b6a112 Add missing fcntl.h include. 2015-06-30 10:32:42 -06:00
Todd C. Miller
d87a0a4aab Add check for inline support. 2015-06-30 10:16:56 -06:00
Todd C. Miller
032729f1b3 Add reallocarray.c license. 2015-06-29 08:16:43 -06:00
Todd C. Miller
2b4e44f338 Fix entry for Joel Pelaez Jorge. 2015-06-27 14:01:09 -06:00
Todd C. Miller
54f9de6cce Add an error flag to the lbuf struct to simplify error checking.
Callers of the lbuf functions now check the error flag to tell if
a memory allocation error ocurred.
2015-06-26 15:58:04 -06:00
Todd C. Miller
2751413464 display_privs() and display_cmnd() may need to return -1 on error. 2015-06-26 10:33:28 -06:00
Todd C. Miller
d3bc17a611 Return -1, not 0 from sudoers when there is an error (as opposed to
a policy denial).
2015-06-25 11:12:36 -06:00
Todd C. Miller
81f94499bf Check restore_perms() return value in all cases, pushing the
return value back up the call stack.
2015-06-25 11:12:36 -06:00
Todd C. Miller
c5ed416a70 Add Joel Pelaez Jorge 2015-06-25 09:16:07 -06:00
Todd C. Miller
ea5ce39c92 When checking whether the PAM prompt matches "Password:", also check
for the untranslated version.  The PAM module might not be using the
localized string even though it exists.  From Joel Pelaez Jorge.
Fixes Bug #701
2015-06-25 09:12:15 -06:00
Todd C. Miller
d84757951f Silence clang analyzer warning on glibc systems where the first
argument to qsort() is marked as non-NULL.
Also change some counters from into to unsigned int and two flags
from int to bool.
2015-06-24 10:32:08 -06:00
Todd C. Miller
aedaac8cca Silence clang analyzer warning on glibc systems where the first
argument to qsort() is marked as non-NULL.
2015-06-23 16:37:01 -06:00