Todd C. Miller
f222a20b13
Add test for negated character class
2016-02-26 11:14:50 -07:00
Todd C. Miller
547a9b7d9c
Fix negation of character classes.
2016-02-26 10:52:55 -07:00
Todd C. Miller
47adf0d3cb
Add declaration of getauthdb() for AIX 5.1
2016-02-20 16:42:34 -07:00
Todd C. Miller
6cbba7d665
Add an administrative domain to the passwd/group cache key for
...
AIX which can have different name <-> ID mappings depending
on whether the database is local, LDAP, etc.
2016-02-01 11:08:58 -07:00
Todd C. Miller
6635f97b33
Fix a warning on AIX.
2016-01-26 14:35:14 -07:00
Todd C. Miller
41a32a1c58
When calling setauthdb(), save the old registry value so we can
...
restore it properly. Previously we were setting the registry to
unrestricted instead of actually restoring it.
2016-01-22 17:04:58 -07:00
Todd C. Miller
5016fa23df
When parsing debug entries, don't make a lower value override a
...
higher one. For example, for "pcomm@debug,all@warn" the "all@warn"
should not set pcomm to "warn" when it is already at "debug".
2016-01-21 07:43:25 -07:00
Todd C. Miller
f4e5b135bb
Update copyright year
2016-01-20 15:40:51 -07:00
Todd C. Miller
399ec8b2b0
Log an error for invalid boolean strings.
2016-01-20 15:34:00 -07:00
Todd C. Miller
12a8becd70
Remove gzopen_w which is only defined on Windows.
2016-01-13 13:40:19 -07:00
Todd C. Miller
f97eba71f0
Add missing sudo_debug_exit_ssize_t_v1 symbol.
2016-01-12 14:28:58 -07:00
Todd C. Miller
0123cf63f1
The Path setting for the plugin directory is "plugin_dir" not "plugin".
2015-12-18 14:03:59 -07:00
Todd C. Miller
55531958de
Allow sudo.conf Path settings to disable path names (by setting the
...
value of NULL).
2015-12-18 12:31:28 -07:00
Todd C. Miller
8b12390abf
Add debug_return_ssize_t
2015-11-01 15:13:28 -07:00
Todd C. Miller
a2979ed809
Remove checks for __sys_siglist and __sys_signame. They are internal
...
to libc and there are no known systems that export those symbols
that do not already export the single underbar or no-underbar versions.
2015-09-10 16:44:57 -06:00
Todd C. Miller
67183d74f4
Remove include/compat/timespec.h. Systems old enough to lack struct
...
timespec are too old to build a modern sudo.
2015-09-09 11:13:22 -06:00
Todd C. Miller
448b18de2b
Set errno to EINVAL if sudo_lock_* is called with a bad type.
2015-09-07 06:06:08 -06:00
Todd C. Miller
0c70df5de9
Implement suspend/resume callbacks for the conversation function.
...
If suspended, close the timestamp file (dropping all locks). On
resume, lock the record before reading the password.
For this to work properly we need to be able to run th callback
when tsetattr() suspends us, not just when the user does. To
accomplish this the term_* functions now return EINTR if SIGTTOU
would be generated. The caller now has to restart the term_*
function (and send itself SIGTTOU) instead of it being done
automatically.
2015-09-07 06:06:08 -06:00
Todd C. Miller
00142c91fa
Lock individual records in the timestamp file instead of the entire
...
file. This will make it possible for multiple sudo processes using
the same tty to serialize their timestamp lookups.
2015-09-07 06:06:08 -06:00
Todd C. Miller
98a15d9879
Add a struct sudo_conv_callback that contains on_suspend and on_resume
...
function pointer args plus a closure pointer and at it to the
conversation function.
2015-09-07 06:06:08 -06:00
Todd C. Miller
1965da8c33
Avoid a potential out of bounds read found by enh while fuzzing
...
with address sanitizer enabled.
2015-07-31 16:10:03 -06:00
Todd C. Miller
e941f97eb4
Replace two "return 0" with debug_return_bool(false).
2015-07-22 19:11:32 -06:00
Todd C. Miller
d4211081c0
Add some debugging printfs when malloc fails and we don't have an
...
explicit call to sudo_warnx().
2015-07-14 15:28:01 -06:00
Todd C. Miller
3c644f5bc0
Return -1 if realloc() fails.
2015-07-14 14:48:04 -06:00
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
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
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
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
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
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
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
d36e46cb6e
Must call round_nfds() with fd+1 since it takes a count not the fd
...
number. In other words, the lowest value is 1, not 0.
2015-06-23 13:49:56 -06:00
Todd C. Miller
d7224ea502
It's safe to rely on C89 semantics for realloc(NULL, size).
2015-06-20 19:27:31 -06:00
Todd C. Miller
4da6468d5a
Remove symbols from the now-removed alloc.c.
2015-06-20 16:56:42 -06:00
Todd C. Miller
4a07b472f0
Only include stddef.h where it is needed.
2015-06-20 05:34:35 -06:00
Todd C. Miller
d8dd6512ce
Better handling of setlocale() returning NULL.
2015-06-19 16:49:02 -06:00
Todd C. Miller
c36415417f
Add function name to "unable to allocate memory" warnings.
2015-06-19 14:51:17 -06:00
Todd C. Miller
dc883f2454
We require ANSI C so stop using the obsolete STDC_HEADERS.
2015-06-19 14:29:27 -06:00
Todd C. Miller
e2328479dd
Use strtok_r() instead of strtok()
2015-06-19 12:35:51 -06:00
Todd C. Miller
4f9cabd005
Remove obsolete memory.h include.
2015-06-18 21:02:57 -06:00
Todd C. Miller
a50555faa2
Remove support for the obsolete malloc.h header.
2015-06-18 20:30:59 -06:00
Todd C. Miller
86fb8e15a8
Use sudo_strsplit() instead of doing the equivalent manually.
2015-06-18 16:14:49 -06:00
Todd C. Miller
db3012645e
Test strsplit behavior with an empty string.
2015-06-18 16:14:20 -06:00
Todd C. Miller
ea744042ed
Allow "make LIBTOOL=/path/to/libtool" to work properly.
2015-06-18 13:06:15 -06:00
Todd C. Miller
a38253b101
Replace use of OSDEFS with config.h defines.
...
Rename DEFS in Makefile.in to CPPDEFS and include in CPPFLAGS.
Bring back _BSD_SOURCE as a config.h define.
Remove obsolescent _REENTRANT define.
2015-06-18 09:33:05 -06:00
Todd C. Miller
4be97a6c4e
Remove now-unused sudo_alloc.h and alloc.c
2015-06-17 17:00:55 -06:00