Commit Graph

8073 Commits

Author SHA1 Message Date
Todd C. Miller
04128f5985 Get rid of SUDO_MAIN. Modern compilers don't warn about mixing
extern and auto declarations unless they conflict.
2015-05-21 11:26:44 -06:00
Todd C. Miller
05a01d4c5d Avoid using a leading underbar in defines as they are reserved in
ISO C.
2015-05-21 11:13:20 -06:00
Todd C. Miller
1298ea9107 Add target for "make splint". A few files need extra guards to avoid
errors on systems where they would not otherwise be compiled.
No warnings from splint.
2015-05-21 11:07:13 -06:00
Todd C. Miller
a40cf3e288 There should be no need to check for tzset() as it is POSIX. 2015-05-18 13:42:06 -06:00
Todd C. Miller
f1491fe137 Add sudo_reallocarrary to util.exp.in if reallocarray is not found. 2015-05-18 13:39:21 -06:00
Todd C. Miller
5c03b6b455 NLS now works on Mac OS X properly. 2015-05-15 15:50:00 -06:00
Todd C. Miller
0b1e027b12 Force flat namespace on darwin to make the getenv() hooking work
as it does on ELF.
2015-05-15 15:48:24 -06:00
Todd C. Miller
cbcaaa299a No need to cast malloc() return value. 2015-05-14 10:47:09 -06:00
Todd C. Miller
c75eb5bf0d Use reallocarray where possible. 2015-05-14 10:21:58 -06:00
Todd C. Miller
3595807f4e Add reallocarray() for those without it. 2015-05-14 10:13:18 -06:00
Todd C. Miller
0d418df037 The getenv() hook still doesn't work on Mac OS X. 2015-05-13 11:06:50 -06:00
Todd C. Miller
80cb630bc0 In sudo_warn_gettext_v1() call dgettext() not gettext() to make
sure the domain is set correctly.  The sudoers plugin uses its own
text domain.
2015-05-12 15:58:05 -06:00
Todd C. Miller
336b99ade2 man pages should explicitly depend on config.status since it is
used to substitute in variables/settings.
2015-05-11 17:01:41 -06:00
Todd C. Miller
c525c5ca7a regen 2015-05-11 16:52:58 -06:00
Todd C. Miller
051bf0d55c Sudo 1.8.14 2015-05-11 16:51:27 -06:00
Todd C. Miller
8bc70a635c Instead of trying to make weak functions work on all platforms,
just use a registration function for a plugin-specific setlocale
function.  The sudoers version just wraps sudoers_setlocale().
2015-05-11 14:51:32 -06:00
Todd C. Miller
fc7143760b Fix indentation of -a flag help line. 2015-05-11 13:34:41 -06:00
Todd C. Miller
6ab5994152 Fix compilation when HAVE_DECL_SIG2STR_MAX is not defined. 2015-05-11 13:26:16 -06:00
Todd C. Miller
0c77de559e Add lint target to run "mandoc -Tlint" over the manuals. 2015-05-11 10:22:05 -06:00
Todd C. Miller
4ae1bdf9c3 HAVE_DECL_SIG2STR_MAX is always defined so use a !HAVE_DECL_SIG2STR_MAX
check instead of #ifndef.
2015-05-08 17:31:31 -06:00
Todd C. Miller
166ee6879b Sync tty_present() with sudoers version. 2015-05-07 11:20:49 -06:00
Todd C. Miller
253008e62b sudo_check_plugin() returns bool. 2015-05-07 11:05:05 -06:00
Todd C. Miller
c80b9c9457 In usergr_matches() matched should be bool but we have to take care
to handle group_plugin_query() returning a value other than 0/1.
2015-05-07 10:56:12 -06:00
Todd C. Miller
d16434f977 sudo_ldap_check_non_unix_group() returns bool, not int. 2015-05-07 10:43:26 -06:00
Todd C. Miller
eea4e1afd9 Convert two debug_return_int to debug_return_bool. 2015-05-07 10:40:46 -06:00
Todd C. Miller
caf5d45e0f Previously, debug_return_bool was the same as debug_return_int
except that it logged true/false for 1/0.  However, this appears
to trigger a bug in some compilers.  To avoid this, debug_return_bool
now uses bool, not int.  Callers that were passing it an int have
been converted to use debug_return_int instead.
2015-05-07 10:33:23 -06:00
Todd C. Miller
9c9ff3dc4b get_pty() should return bool 2015-05-07 09:43:19 -06:00
Todd C. Miller
d2624ffa96 Make tty_present static to tgetpass.c 2015-05-07 09:42:48 -06:00
Todd C. Miller
5647736ef5 Add configure check for SIG2STR_MAX, which may be missing on UnixWare. 2015-05-07 07:34:50 -06:00
Todd C. Miller
e1b67e6177 Need to quote $GCC as it may include arguments. From Tim Rice. 2015-05-07 07:17:00 -06:00
Todd C. Miller
ff806216fa Add missing m4/ax_sys_weak_alias.m4 2015-05-07 07:16:11 -06:00
Todd C. Miller
f5f5e17cb6 There's no point in building i386 binaries for Mac OS X 10.7 and higher. 2015-04-28 14:54:44 -06:00
Todd C. Miller
ff89dde116 Sync with translationproject.org 2015-04-27 14:12:11 -06:00
Todd C. Miller
8930db0e09 Only fall back on AUE_DARWIN_sudo if au_preselect() fails. 2015-04-26 07:55:33 -06:00
Todd C. Miller
8a18383644 Work around a problem on Mac OS X 10.10 which defines AUE_sudo but
where au_preselect() only accepts AUE_DARWIN_sudo (the old value).
2015-04-25 19:44:52 -06:00
Todd C. Miller
3715ab57dd Don't use dlsym() to find the libc getenv() since this may allocate
memory on some systems (glibc) which leads to a hang if malloc()
calls getenv() (jemalloc).
2015-04-22 13:38:02 -06:00
Todd C. Miller
41f3666a12 Defer conversation initialization until right before plugins
are initialized.
2015-04-22 13:30:58 -06:00
Todd C. Miller
6f8af4d26d Split variable declaration out of debug_decl into debug_decl_vars()
so we can use it in main() when we know sudo_debug_enter() cannot
succeed.
2015-04-22 13:30:58 -06:00
Todd C. Miller
e98778b2a2 When creating a passwd struct from a uid that is not in the passwd
database, set pw_gid to the user's gid instead of whatever the user
specified via the -g flag (or 0 if no -g).
2015-04-16 13:19:04 -06:00
Todd C. Miller
3de14196c8 Add some ldap_err2string() debugging when the LDAP search fails.
Adapted from a diff from Steven Soulen.
2015-04-14 09:50:40 -06:00
Todd C. Miller
db74048989 Sync with translationproject.org 2015-04-13 14:04:49 -06:00
Todd C. Miller
28b64d296d Add David Michael and Andrey Klyachkin. 2015-04-10 09:07:02 -06:00
Todd C. Miller
02aa57c169 Sync tmpfiles.d/sudo.conf with init.d/sudo.conf.in 2015-04-10 09:03:15 -06:00
Todd C. Miller
9240018ce4 Avoid struct assignment when stashing mtime since AIX at least uses
a struct st_timespec that differs from struct timespec.
From Andrey Klyachkin.
2015-04-10 07:43:54 -06:00
Todd C. Miller
68339fa9c1 Work around a bug in pp that caused a warning when exampledir is a
subdir of docdir.
2015-04-09 18:14:38 -06:00
Todd C. Miller
a79f3790ee Add sys/types.h 2015-04-09 11:01:41 -06:00
Todd C. Miller
eeca3b0ca4 Include sys/types.h instead of unistd.h to get uid_t and gid_t.
Add missing include of sys/types.h to a few places.
2015-04-09 10:58:04 -06:00
Todd C. Miller
7e1c2fa00c Remove unintended commit 2015-04-08 15:29:59 -06:00
Todd C. Miller
cfe7a4cb33 Add tmpfiles.d/sudo.conf template. 2015-04-08 07:14:33 -06:00
Todd C. Miller
fa3552fa76 Create template tmpfiles.d/sudo.conf for installation instead of
creating one via echo commands in the Makefile.

Add --enable-tmpfiles.d configure option to enable/disable use of
tmpfiles.d and override the default directory.

Use --disable-tmpfiles.d in mkpkg so we no longer need to ignore
tmpfiles.d/sudo.conf in sudo.pp.
2015-04-07 15:35:01 -06:00