Commit Graph

9409 Commits

Author SHA1 Message Date
Todd C. Miller
4782b22a47 Move ldif -> sudoers conversion code into parse_ldif.c 2018-08-26 20:02:49 -06:00
Todd C. Miller
52d54997ee Move string list functions to their own file. 2018-08-26 19:48:14 -06:00
Todd C. Miller
5fea22e514 sync 2018-08-26 19:31:20 -06:00
Todd C. Miller
63f7aa8fcf Backward ABI compatibility for even functions that use a timeval. 2018-08-25 21:02:07 -06:00
Todd C. Miller
6b76f9dbd3 Use a monotonic timer for the event subsystem. 2018-08-25 21:02:06 -06:00
Todd C. Miller
04d1f56d90 Use struct timespec, not struct timeval in the event subsystem.
Use ppoll() or pselect() if avaialble which use timespec.
2018-08-25 21:02:05 -06:00
Todd C. Miller
1f248504af sync 2018-08-24 11:34:31 -06:00
Todd C. Miller
5d1dddc467 Eliminate most use of parsed_sudoers in cvtsudoers 2018-08-24 10:27:00 -06:00
Todd C. Miller
b2e3adccf3 Make alias_apply() take 3 arguments, the first being a pointer to the
struct sudoers_parse_tree.
2018-08-24 09:52:53 -06:00
Todd C. Miller
4b3c8a73a0 Handle systems where root's gid is not 0. 2018-08-23 16:21:28 -06:00
Todd C. Miller
2960e3963d Add missing files from last commit. 2018-08-23 15:50:17 -06:00
Todd C. Miller
aaad554cda Add regress test for I/O log plugin endpoints 2018-08-23 15:35:02 -06:00
Todd C. Miller
0d36ea9325 We cannot reuse last_time for the I/O log info file now that it is
a monotonic timer.  Just call time(3) in write_info_log() directly.
2018-08-23 13:50:00 -06:00
Todd C. Miller
59e5e379be Move the loop to free the monitor_messages list into free_exec_closure_pty() 2018-08-23 11:10:57 -06:00
Todd C. Miller
93fc7cf6da regen 2018-08-23 08:09:42 -06:00
Todd C. Miller
fe965c3a31 Fix typo in last commit. 2018-08-22 19:15:26 -06:00
Todd C. Miller
d876602dbf Do not assume all Linux has linux/random.h.
Add missing sys/syscall.h include
2018-08-22 15:12:11 -06:00
Todd C. Miller
fe58062547 Cast uid/gid to unsigned int before printing. 2018-08-22 12:58:24 -06:00
Todd C. Miller
10198ef6f3 Only include stdarg.h if we need it. 2018-08-22 12:36:28 -06:00
Todd C. Miller
aaefdd7575 Include stddef.h for offsetof() definition. 2018-08-22 10:27:33 -06:00
Todd C. Miller
dcf168e702 fix compiler warnings on Solaris 11 2018-08-22 10:40:11 -06:00
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