Todd C. Miller
a50555faa2
Remove support for the obsolete malloc.h header.
2015-06-18 20:30:59 -06:00
Todd C. Miller
138aa2ccd1
Remove BROKEN_SYSLOG define which was for obsolete versions of HP-UX.
...
Remove last remnants of 4.2BSD syslog support.
2015-06-18 17:53:49 -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
ac13264b44
Use a common function for resolviong the user's editor in sudoedit
...
and visudo. The find_path() function now returns a dynamically
allocated path instead of using a static string.
2015-06-18 09:51:36 -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
Todd C. Miller
cb63ca701c
Avoid using exiting allocators in the front end.
2015-06-17 17:00:54 -06:00
Todd C. Miller
5ce50a885c
Use non-exiting allocators in libsudo_util.
2015-06-17 17:00:53 -06:00
Todd C. Miller
ec7e467c58
Remove asprintf() return value warnings.
2015-06-17 17:00:25 -06:00
Todd C. Miller
4c7a264f10
Use AC_FUNC_STRNLEN to check for broken strnlen() on AIX.
...
This requires that we use AC_USE_SYSTEM_EXTENSIONS so remove
things from OSDEFS that are enabled by AC_USE_SYSTEM_EXTENSIONS.
2015-06-17 17:00:21 -06:00
Todd C. Miller
f02874fe5b
Remove extraneous semicolons in CHECK_* macros.
2015-06-17 10:25:29 -06:00
Todd C. Miller
07f9814450
Remove remaining SUDO_MAIN remnants.
2015-06-17 10:20:14 -06:00
Todd C. Miller
d004b02fc6
Use non-exiting allocatings in the sudoers plugin.
2015-06-17 06:49:59 -06:00
Todd C. Miller
6da04821d7
Use non-exiting allocators in the sudoers SSSD backend.
2015-06-16 15:00:47 -06:00
Todd C. Miller
5413637ae8
Use non-exiting allocators in the sudoers LDAP backend.
2015-06-16 13:58:45 -06:00
Todd C. Miller
2c63f1b5b2
regen dependencies
2015-06-16 13:17:46 -06:00
Todd C. Miller
23d72149b0
Add missing dependency info for reallocarray.lo in lib/util/Makefile.in
...
and regen configure to match last configure.ac change.
2015-06-15 13:45:12 -06:00
Todd C. Miller
ea34d01010
Use \28 and \29 instead of \( and \) in the ldap query as per RFC
...
2254. Fixes netgroup queries on AIX. From Steven Soulen.
2015-06-15 13:32:48 -06:00
Todd C. Miller
f43f530987
Move pattern length check until after we have initialized the glob_t
...
so we can call globfree() even on error. From Frank Denis.
2015-06-13 08:13:48 -06:00
Todd C. Miller
25917e435c
We need to unlimit RLIMIT_NPROC in sudoers as well as the sudo front
...
end since set_perms() and restore_perms change the read uid and may
fail with EAGAIN on Linux kernels prior to 3.1.
2015-06-12 15:30:06 -06:00
Todd C. Miller
db8aae12e8
Fix underlining of "root" in -u option descriptions. Bug #699
2015-06-08 16:49:09 -06:00
Todd C. Miller
7107ce4d1d
Remove support for converting plugin.so -> plugin.sl on HP-UX when
...
plugin.so can not be found. This was a temporary hack for using
an older (pre 1.8.7) sudoers plugin with a newer sudo front-end.
2015-06-08 13:57:14 -06:00
Todd C. Miller
c0fa0e248d
Add debugging output on memory alloc failure.
...
Add missing checks in event_select.c for reallocarray() failure.
2015-06-05 13:18:48 -06:00
Todd C. Miller
564eb7e7dd
Use non-exiting allocators.
2015-06-05 13:17:56 -06:00
Todd C. Miller
8eff57f070
Bring back VALIDATE_ERROR which will be used in the case of memory
...
allocation errors.
2015-06-04 20:42:42 -06:00
Todd C. Miller
9884df8c9e
If asprintf() or vasprintf() fail, set the dest pointer to NULL
...
like BSD and Solaris do. This appears to be the direction glibc
is going as well.
2015-06-03 11:07:56 -06:00
Todd C. Miller
7a1cf7f539
Use a stack buffer for the validate_env_vars() error message.
2015-05-28 10:28:38 -06:00
Todd C. Miller
1100d91e8f
Fix typo/thinko in static buffer conversion; use vsnprintf() not snprintf()
2015-05-27 16:41:46 -06:00
Todd C. Miller
dee7a6ddaf
Fix old gcc2 variadic macro support.
2015-05-27 16:38:59 -06:00
Todd C. Miller
21f5753b7d
Restore old behavior where visudo prevents you from making the main
...
sudoers file zero length.
2015-05-27 13:34:28 -06:00
Todd C. Miller
9d1c408b73
Non-exiting allocators for log functions. If log_allowed() fails
...
the user may not run the command. We don't try to return early for
log_failure(), log_auth_failure() or log_denial() as we would not
run the command in that case.
2015-05-27 10:55:27 -06:00
Todd C. Miller
4da9e10971
Use non-exiting allocators in the parser (much of it already did).
2015-05-27 10:36:03 -06:00
Todd C. Miller
6b7be032af
Use non-existing allocators in the passwd/group cache functions.
2015-05-27 10:26:49 -06:00
Todd C. Miller
40d72f26e4
Add standalone reallocarray.c from OpenBSD instead of rolling our own.
2015-05-27 10:04:32 -06:00
Todd C. Miller
2bf454b74d
Use non-exiting allocators in the redblack tree and fix the fallout.
...
Also switch to non-exiting allocators in affected code blocks.
2015-05-27 09:51:54 -06:00
Todd C. Miller
46770c9588
The error string returned by alias_add should be const.
2015-05-27 09:48:34 -06:00
Todd C. Miller
c5e4c3055a
Fix typo, efree vs. free.
2015-05-27 09:48:31 -06:00
Todd C. Miller
4131449ffb
Add a few missing sudo_new_key_val() return value checks.
...
Also use non-exiting allocators for consistency.
2015-05-27 09:42:51 -06:00
Todd C. Miller
8c3fd195d2
Add unit tests for strsplit and parse_gid_list.
2015-05-26 20:25:08 -06:00
Todd C. Miller
8d1708434f
Add sudo_strsplit(), similar to strtok_r() but non-destructive and
...
operates on non-C strings (requires a length parameter).
2015-05-26 15:46:41 -06:00
Todd C. Miller
69e62f316e
Use reallocarray() instead of sudo_emallocarray() and return an
...
error on allocation failure.
2015-05-20 10:59:03 -06:00
Todd C. Miller
212ff5d964
In our krb5_get_init_creds_opt_alloc() replacement use malloc()
...
instead of sudo_emalloc() and return KRB5_CC_NOMEM on allocation
failure. Only old versions of Kerberos V will need this.
2015-05-20 10:58:17 -06:00
Todd C. Miller
6741fb5378
Use non-exiting allocators.
2015-05-20 10:39:08 -06:00
Todd C. Miller
f18aa478d3
Use a static buffer for sudo_warn/sudo_fatal messages where possible.
2015-05-26 15:24:54 -06:00
Todd C. Miller
11840308c4
Fix sudo_strnlen() prototype.
2015-05-26 14:14:06 -06:00
Todd C. Miller
82286d8b7b
Add strndup() for those without it. As strndup.c uses strnlen(),
...
use our own if it is missing.
2015-05-26 14:05:26 -06:00
Todd C. Miller
8437e3606b
Add missing sudo_ prefix and include sudo_compat.h.
2015-05-26 14:01:37 -06:00
Todd C. Miller
49d56f323e
Add strnlen() replacement needed for glob.c.
...
Only used if no glob() and no strnlen().
2015-05-26 13:55:18 -06:00