Commit Graph

9288 Commits

Author SHA1 Message Date
Todd C. Miller
ad104a3e47 Fix setting of errno when gotdata() fails. 2018-08-22 10:36:00 -06:00
Todd C. Miller
6e4ec91801 Bugs 846 and 847 2018-08-22 08:23:29 -06:00
Todd C. Miller
5a0c86bb63 We still need to include string.h for AIX (and possibly others)
when we are not using the system memset_r() function and rsize_t
is defined by the system headers.
2018-08-22 08:22:56 -06:00
Todd C. Miller
957f284bba Add --enable-package-build to give configure a hint that we are
building a package.  This can be used to avoid relying on libc
functions that may not be present in all libc versions for a
particular system.  For instance, AIX 7.1 may or may not have
memset_s() and getline() present.
2018-08-22 08:09:46 -06:00
Todd C. Miller
d9dec93277 AIX defines rsize_t in string.h, not stddef.h for use by the
memset_s() prototype.  We use our own memset_s() on AIX since it
is not available on all BOS levels which makes package building
problematic.
2018-08-22 07:43:13 -06:00
Todd C. Miller
9e6c14b091 Fix printing of T_TIMESPEC values. 2018-08-21 17:35:44 -06:00
Todd C. Miller
31e065c6ca Remove unused struct script_buf 2018-08-21 10:30:42 -06:00
Todd C. Miller
8d83bd5c05 Document when the I/O log timing file entry bug was introduced. 2018-08-20 12:49:24 -06:00
Todd C. Miller
afca08c74d sync 2018-08-20 11:24:53 -06:00
Todd C. Miller
df1c062526 HP-UX doesn't suport CLOCK_MONOTONIC but we can use gethrtime() instead. 2018-08-20 10:56:34 -06:00
Todd C. Miller
5cca421867 Close the pty slave in the parent so that when the command and
monitor exit, the pty gets recycled without our having to close
it directly.
2018-08-20 10:04:15 -06:00
Todd C. Miller
6953e7fc79 Move updating of the window size to the monitor process.
This will allow us to close the slave in the main sudo process in
the future so only the command and monitor have it open.
2018-08-20 10:04:14 -06:00
Todd C. Miller
db8a760b0f sudo 1.8.25 2018-08-20 10:04:12 -06:00
Todd C. Miller
3c562facca Fix test output for bug #845 2018-08-20 05:49:57 -06:00
Todd C. Miller
5af2682283 Fix pasto when converting sudoNotAfter; from Miguel Sanders
Bug #845
2018-08-20 05:48:14 -06:00
Todd C. Miller
3f1470ebed Use a monotonic timer that only runs while not suspended for the
iolog timing values and write nsec-precision entries.
2018-08-19 09:55:08 -06:00
Todd C. Miller
b3227d3ed5 Add sudo_gettime_uptime() to measure time while not sleeping. 2018-08-19 09:55:08 -06:00
Todd C. Miller
e74d7e8721 Detect number of CPUs on AIX. 2018-08-18 20:29:39 -06:00
Todd C. Miller
afad4eb94d Fix I/O log timing file on systems without a C99-compatible snprintf().
On those systems we use our own snprintf() that doesn't support
floating point.  We don't actually need floating point in this case
since the we can print seconds and microseconds without using it.
2018-08-18 20:29:30 -06:00
Todd C. Miller
46ab293ce9 Fix for Bug #844 2018-08-18 07:08:20 -06:00
Todd C. Miller
69541be94a Handle the case where O_PATH or O_SEARCH is defined but O_DIRECTORY
is not.  In theory, O_DIRECTORY is redundant when O_SEARCH is
specified but it is legal for O_EXEC and O_SEARCH to have the same
value.  Bug #844
2018-08-18 07:06:54 -06:00
Todd C. Miller
288f3f17a6 sync 2018-08-17 17:38:35 -06:00
Todd C. Miller
92975ee7c7 Fix get_starttime() on HP-UX. 2018-08-17 15:58:17 -06:00
Todd C. Miller
7d014dfacd Avoid a compilation problem on HP-UX 11.31 with gcc and machine/sys/getppdp.h 2018-08-17 13:25:46 -06:00
Todd C. Miller
d7e265939b Detect number of CPUs on HP-UX.
Use MAKE environment variable if set.
2018-08-17 13:27:01 -06:00
Todd C. Miller
9317367e29 Add CHECK_SYMBOLS_LDFLAGS to check_symbols target. Non-ELF HP-UX
executables don't support SHLIB_PATH or LD_LIBRARY_PATH unless ld
is passed the +s flag.  This lets the check_symbols test pass on
systems where the ldap libraries aren't installed in the standard
location.
2018-08-16 21:07:36 -06:00
Todd C. Miller
18ddabfebf For the lint target, don't stop after the first manual that fails lint. 2018-08-15 10:02:40 -06:00
Todd C. Miller
7a929ce135 Add debugging info so we can tell why a timestamp record doesn't match. 2018-08-15 09:19:50 -06:00
Todd C. Miller
c0d60b9dd0 typo 2018-08-13 06:25:44 -06:00
Todd C. Miller
a7b42e9b20 sync with translationproject.org 2018-08-13 06:16:28 -06:00
Todd C. Miller
c5f64b7416 sync 2018-08-08 09:02:37 -06:00
Todd C. Miller
418bf793f7 Fix the return value of sudoers_io_change_winsize() on success.
Otherwise, we only log a single window size change.
2018-08-11 21:29:43 -06:00
Todd C. Miller
d026469289 sync with translationproject.org 2018-08-11 19:57:14 -06:00
Todd C. Miller
0484e3d6a9 Fix ambiguity when talking about Aliases. We can't use User_Alias
in the grammar as both the definition of the Alias as well as its
name.  This adds {User,Runas,Host,Cmnd}_Alias_Spec to help differentiate
between the name of the alias and its definition.  Bug #834
2018-08-07 10:03:05 -06:00
Todd C. Miller
9722b304b6 regen 2018-08-07 09:58:57 -06:00
Todd C. Miller
78190bb9cb Warn if unable to run xgettext or msgfmt. 2018-08-07 06:10:21 -06:00
Todd C. Miller
0053b07ed3 sync with translationproject.org 2018-08-06 13:14:43 -06:00
Todd C. Miller
1e5af35564 Refactor code to convert defaults to tags and do conversion on
output for "sudo -l".

Remove the short_list (was long_list) global in favor of a verbose
argument.
2018-08-05 07:17:34 -06:00
Todd C. Miller
413b53cda3 Assign short_list true, not 1 now that it is a boolean. 2018-08-04 20:02:00 -06:00
Todd C. Miller
db387a53a6 fix typo 2018-08-04 07:38:47 -06:00
Todd C. Miller
9cc09e4372 Fix a warning on FreeBSD which has a fancier __containerof implementation. 2018-08-03 11:45:01 -06:00
Todd C. Miller
6a692fec31 sync with translationproject.org 2018-08-03 10:14:58 -06:00
Todd C. Miller
f4a5d2b3e2 Regen with aclocal 1.15.1. 2018-08-02 15:32:28 -06:00
Todd C. Miller
608574a219 For ldap/sssd, include defaults in the generate privilege unless
we are listing in short mode (in which case we convert them to tags
if possible).  Fixes a problem where sudoOptions were not being
applied to the command.
2018-08-02 14:45:00 -06:00
Todd C. Miller
171686c422 update_defaults() needs to be able to take a defaults_list for
the ldap/sssd backends which support per-role defaults.
2018-08-02 14:06:36 -06:00
Todd C. Miller
34655148e0 regen 2018-07-31 07:14:26 -06:00
Todd C. Miller
3b57230851 Update 2018-07-30 10:57:55 -06:00
Todd C. Miller
70d519c8ad o Move userspecs, defaults and aliases into a new struct sudoers_parse_tree.
o The parse tree is now passed to the alias, match and defaults functions.
o The nss API has been changed so that the nss parse() function returns
  a pointer to a struct sudoers_parse_tree which will be filled in
  by the getdefs() and query() functions.
2018-07-26 15:12:33 -06:00
Todd C. Miller
86413f95ec Don't need to preallocate 4 x NGROUP_MAX on AIX or BSD/Linux.
For BSD/Linux, getgrouplist(3) will tell us the number of groups if
we don't have enough.  For AIX, we can count the entries in the
group set before allocating the group vector.
2018-07-26 15:12:26 -06:00
Todd C. Miller
394524fd5d Ignore PAM_NEW_AUTHTOK_REQD and PAM_AUTHTOK_EXPIRED errors from
pam_acct_mgmt() if authentication is disabled for the user.
Bug #843
2018-07-26 12:31:29 -06:00