Todd C. Miller
85598f77b2
Use inet_pton() instead of inet_aton() and include a version from
...
BIND for those without it.
2014-02-05 10:00:07 -07:00
Todd C. Miller
91141e5cc1
Quiet a gcc warning.
2014-02-05 09:55:31 -07:00
Todd C. Miller
fbfe7caba4
Need to include limits.h for USHRT_MAX.
2014-02-05 09:55:30 -07:00
Todd C. Miller
08af9d0516
Use bool for function return values instead of 1 or 0.
2014-02-04 15:18:16 -07:00
Todd C. Miller
249becb1ac
Warn the user if the rundir needs to be cleared in the rc files.
...
Neither AIX not HP-UX clear /var/run (if it even exists).
2014-02-04 15:14:48 -07:00
Todd C. Miller
b1851f6936
Update for sudo 1.8.9p5
2014-02-04 10:24:35 -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
c8984598e8
Document function return values.
2014-02-04 06:13:43 -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
a61abeb364
syscall restarting is broken on Mac OS X when interrupted by a tty
...
signal so restart tcsetattr() by hand. For details, see.
http://openradar.appspot.com/radar?id=6402578615107584
2014-02-03 16:51:51 -07:00
Todd C. Miller
26f2dd3b9b
Add regress for atobool(), atoid() and atomode()
2014-02-03 10:47:19 -07:00
Todd C. Miller
efd31a31ec
Add back boottime.lo
2014-02-03 08:08:54 -07:00
Todd C. Miller
7292e607fc
Mention that rundir and vardir may be the same and what to do if they are.
2014-02-03 06:16:51 -07:00
Todd C. Miller
7155fc526f
Bring back boot time checking code and zero out time stamp files
...
that predate the boot time. This should help systems w/o /var/run
where the admin has setup rc.d to clear the timestamp directory.
2014-02-03 05:45:27 -07:00
Todd C. Miller
b590182abf
Check libraries for inet_pton() if not in libc.
2014-02-03 05:42:39 -07:00
Todd C. Miller
719e58740b
Fix clock_gettime() detection when it lives in librt.
...
Some systems have inet_aton() in libresolv (older Solaris).
2014-02-02 08:34:53 -07:00
Todd C. Miller
4831eeaac2
Avoid duplicate directories if vardir and rundir are the same.
2014-02-02 06:39:05 -07:00
Todd C. Miller
a9a7768d56
regen
2014-02-02 05:23:54 -07:00
Todd C. Miller
5502051ebe
Elaborate on time stamp error message causes.
2014-02-02 05:17:47 -07:00
Todd C. Miller
17ab16824b
Remove the time stamp dir and its contents when uninstalling. We
...
currently leave the lecture status files installed until there is
a better way to detect upgrades.
2014-02-01 06:30:40 -07:00
Todd C. Miller
23c2249531
Update time stamp error messages and regen.
2014-02-01 06:15:14 -07:00
Todd C. Miller
32b897ac67
Restore warning when sudoers is unable to update the time stamp file.
2014-02-01 06:11:29 -07:00
Todd C. Miller
aeb5ceead8
Replace --with-timedir and --with-lecture_dir with --with-rundir
...
and --with-vardir which are the parent directories of the time stamp
and lecture dirs. These directories need to be searchable by
non-root so that the timestampowner setting can function.
2014-02-01 05:57:34 -07:00
Todd C. Miller
fb29e91ef0
Fix use of timestampowner in the new time stamp world order. Parent
...
directories for timestampdir and lecture_dir are now created with
the execute bit set so that we can traverse them as non-root.
2014-02-01 05:47:16 -07:00
Todd C. Miller
a2dc10ece7
Regen Makefiles.
2014-01-31 15:46:25 -07:00
Todd C. Miller
d0f343ba2e
Move ctim_get and mtim_get to sudo_util.h
2014-01-31 15:43:34 -07:00
Todd C. Miller
32b4713d6d
sprinkle some debug printfs and add function header comments
2014-01-31 15:28:41 -07:00
Todd C. Miller
d7257a63e7
Properly handle the case where /var/run/sudo/ts doesn't exist.
2014-01-31 15:02:31 -07:00
Todd C. Miller
b15b03560a
fix typo
2014-01-31 10:12:21 -07:00
Todd C. Miller
f04f6eeb4a
Mention "sudo -K" change.
2014-01-31 10:05:57 -07:00
Todd C. Miller
51cab56795
Upgrade info for 1.8.10
2014-01-31 10:05:49 -07:00
Todd C. Miller
596fc68aca
Warn on ftruncate failure().
2014-01-30 16:24:48 -07:00
Todd C. Miller
63e7aa9942
Fix checking of lecture status.
2014-01-30 16:15:03 -07:00
Todd C. Miller
f4e037a0da
Do not override timedir on Debian.
2014-01-30 16:07:28 -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
Todd C. Miller
659b1f0e34
Switch to new time stamp file format. Each user now has a single
...
file which may contain multiple records when per-tty time stamps
are in use (the default). The time stamps use a monotonic timer
where available and are once again stored in /var/run/sudo. The
lecture status is now stored separately from the time stamps in a
different directory.
2014-01-30 15:50:40 -07:00
Todd C. Miller
db3b776277
When listing a user's privileges, always prompt the user for their
...
own password, regardless of the value of target_pw, root_pw or
runas_pw.
2014-01-29 15:19:45 -07:00
Todd C. Miller
5a636f2ea1
Zero out errstr when there is no error; fixes bug #632
2014-01-30 13:06:29 -07:00
Todd C. Miller
aaecd326e4
Use inet_aton() instead of inet_addr() as it allows us to distinguish
...
between the address (or mask 255.255.255.255) and an error. In the
future we may consider switching to inet_pton() for IPv4 too.
2014-01-26 13:23:09 -07:00
Todd C. Miller
7e008eb677
Fix typo, ULONG_MAX vs. ULLONG_MAX
2014-01-24 16:08:28 -07:00
Todd C. Miller
f6542e90f0
Fix typo in the AIX case.
2014-01-24 09:43:10 -07:00
Todd C. Miller
7e88cc27bf
Size pointer for sudo_parseln() should be size_t not ssize_t.
...
This was already correct for the nsswitch.conf case.
2014-01-24 09:39:11 -07:00
Todd C. Miller
1a42e5f63d
It is now possible to disable network interface probing in sudo.conf
...
by changing the value of the probe_interfaces setting.
2014-01-23 14:52:54 -07:00
Todd C. Miller
4c9650f78f
If inet_addr() returns INADDR_NONE, return false instead of iterating
...
through the interfaces looking for a match that will never happen.
2014-01-22 20:48:49 -07:00
Todd C. Miller
cf6bca1390
Add explicit dependency on sudoers.la to sudo target when sudoers
...
is compiled statically into the sudo binary.
2014-01-22 14:47:27 -07:00
Todd C. Miller
ae6fb933f0
Do not assume localtime(), gmtime() and ctime() always return non-NULL.
2014-01-21 16:32:00 -07:00
Todd C. Miller
5a6db565c1
Update copyright years
2014-01-15 06:19:34 -07:00
Todd C. Miller
5f88e95bc9
Eliminate dead store found by clang checker.
2014-01-15 06:13:23 -07:00
Todd C. Miller
2de0115cb8
Update for sudo 1.8.9p4
2014-01-15 06:01:54 -07:00
Todd C. Miller
8ca711ee15
When relocating fds, update the debug fd if it is set so we are
...
guaranteed to get debugging output.
2014-01-15 06:00:59 -07:00