Commit Graph

7105 Commits

Author SHA1 Message Date
Todd C. Miller
4247c1741b Do not add LIBDL to SUDO_LIBS or SUDOERS_LIBS in configure, do it
in Makefile.in so we can make it last.  Fixes a linking problem on
Ubuntu precise.
2013-11-26 07:15:55 -07:00
Todd C. Miller
94ad47ff98 Do not rely on NULL being defined for getaddrinfo() test.
Fixes the check on HP-UX 11.23.
2013-11-25 09:54:04 -07:00
Todd C. Miller
58a0540b96 Regen for sudo 1.8.9b1 2013-11-24 16:37:32 -07:00
Todd C. Miller
853384124d Sync with translationproject.org 2013-11-24 16:31:40 -07:00
Todd C. Miller
12f3bdf60e Add wrapper functions for dlopen() et al so that we can support
statically compiling in the sudoers plugin but still allow other
plugins to be loaded.  The new --enable-static-sudoers configure
option will cause the sudoers plugin to be compiled statically into
the sudo binary.  This does not prevent other plugins from being
loaded as per sudo.conf.
2013-11-22 16:35:15 -07:00
Todd C. Miller
0fb17059a6 Handle non-unix groups correctly. Get rid of runasuser and runasgroup
types and use username and usergroup instead.  The fact that the user
or group is inside a Runas_List doesn't affect its underlying type.
2013-11-21 09:45:55 -07:00
Todd C. Miller
bf700fdd58 Simplify Defaults list option object. The name and value strings
are superfluous.
2013-11-20 14:35:35 -07:00
Todd C. Miller
6270991362 Back out unintended change. 2013-11-20 12:21:34 -07:00
Todd C. Miller
6a1d1e1483 Add dedicated test for getaddrinfo(). Tru64 UNIX contains two
versions of getaddrinfo and we must include netdb.h to get the
proper definition.
2013-11-20 12:04:47 -07:00
Todd C. Miller
ba40be9dd2 Define RTLD_GLOBAL for older systems without it. Bug #621 2013-11-20 07:22:10 -07:00
Todd C. Miller
192cbbb490 Rename snprintf replacement rpl_snprintf since we may now replace
the libc version and #define rpl_snprintf snprintf in missing.h so
we get our version when needed.  This is consistent with how we
replace glob and fnmatch.
2013-11-19 16:06:08 -07:00
Todd C. Miller
4075ee77cf libcommon tests need locale_stub.lo to link. 2013-11-19 11:00:41 -07:00
Todd C. Miller
42b1e4a9c4 Add check for C99 compliant (v)snprintf function. 2013-11-19 10:40:25 -07:00
Todd C. Miller
0a47860ef7 Include unistd.h in sig2str.c for Tru64 as it defines SIGRTMIN and
SIGRTMAX in terms of sysconf(), which is prototyped in unistd.h.
Bug #621; from Daniel Richard G.
2013-11-19 09:48:01 -07:00
Todd C. Miller
054a94e6c9 Add definition of U_ for --disable-nsl
Don't define warning_gettext if --disable-nsl
Bug #621; from Daniel Richard G.
2013-11-19 09:45:13 -07:00
Todd C. Miller
0a7ebf8b23 When merging Defaults entries we need to check the type of the
next entry and not just assume it is the same as the previous one.
2013-11-18 16:59:02 -07:00
Todd C. Miller
f16ce9714d runasgroups not runasgroup in the Cmnd_Spec. 2013-11-18 16:28:10 -07:00
Todd C. Miller
a1b1c80b26 Fix some syntax errors and change how lists are handled. 2013-11-18 12:00:44 -07:00
Todd C. Miller
3dab6bd8e9 Allow sudo to compile without variadic macro support in cpp.
Debugging support will be limited (no file info from warnings.)
From Daniel Richard G.; Bug #621
2013-11-18 09:10:09 -07:00
Todd C. Miller
96eb2c4f8f Add warning_gettext() wrapper function that changes to the user locale,
then calls gettext().
Add U_ macro that calls warning_gettext() instead of gettext().
Rename warning2()/error2() back to warning_nodebug()/error_nodebug().
2013-11-18 08:59:57 -07:00
Todd C. Miller
99b7351de0 Fix some #if vs. #ifdef and remove an extraneous semicolon.
Bug #624; from Daniel Richard G.
2013-11-17 16:15:36 -07:00
Todd C. Miller
6c71ad5c15 Add debug_return_const_str and debug_return_const_ptr for returning
a const string or pointer.  Using const for the normal versions
produces warnings with the Tru64 compiler.
2013-11-17 16:11:39 -07:00
Todd C. Miller
bf65cc041e Fixes for building under Tru64; from Daniel Richard G.
Bug #624
2013-11-17 14:16:13 -07:00
Todd C. Miller
7017c904c1 log_{fatal,warning} now logs to the debug file itself.
log_{fatal,warning} now calls warningx2() after setting the
locale itself instead of using the wrapper macros.
This removes the only use of warningx(ngettext(...)).
2013-11-16 09:21:43 -07:00
Todd C. Miller
942f732a50 Add -Wpointer-arith to --enable-warnings 2013-11-15 15:33:46 -07:00
Todd C. Miller
e684f6a096 Fix more instances of #include directives where the '#' was not in
column 1.  From Daniel Richard G. (bug #622)
2013-11-15 15:16:47 -07:00
Todd C. Miller
6d8b078e2b Add support to visudo to export sudoers in JSON format. 2013-11-15 15:11:55 -07:00
Todd C. Miller
bba91c008b Remove unused digest field from struct cmndspec, the digest really
lives in struct sudo_command.
2013-11-13 16:17:16 -07:00
Todd C. Miller
362080220e Regen with autoconf 2.69 2013-11-13 15:02:19 -07:00
Todd C. Miller
e31b2ba6a8 Rename configure.in -> configure.ac 2013-11-13 15:00:28 -07:00
Todd C. Miller
97b60e3eb2 From Daniel Richard G. (bug #622)
Add an autogen.sh script that rebuilds the autoconf world.
    Move old aclocal.m4 contents to m4/sudo.m4.
    New (generayed) aclocal.m4 contains the m4_include directives.
    Some tests had #include directives where the '#' was not in column 1.
    Updated obsolete macro usage via autoupdate.
2013-11-13 14:45:47 -07:00
Todd C. Miller
bb45f8e84d Very old systems (pre XPG 4.2) may not support MSG_WAITALL. The
likelihood of receiving a partial message is quite low so this is
not a big deal.
2013-11-12 15:14:58 -07:00
Todd C. Miller
142fff6db3 HP-UX may require _XOPEN_SOURCE_EXTENDED to be defined for MSG_WAITALL
to be visible.
2013-11-12 15:13:54 -07:00
Todd C. Miller
69f7ed79c2 Add regress test for bug #623 2013-11-12 09:50:36 -07:00
Todd C. Miller
a3aa40b0fe Cope with a comment on the last line of the file with no newline.
Bug #623
2013-11-12 09:36:39 -07:00
Todd C. Miller
9d9d8e852b Include arpa/inet.h for HP-UX; from Daniel Richard G. 2013-11-12 08:53:33 -07:00
Todd C. Miller
89c162ec63 Add missing $(mansrcdir) to visudo.mdoc and visudo.man.
From Daniel Richard G.
2013-11-12 08:51:25 -07:00
Todd C. Miller
237ae0b773 In v{warning,fatal}x?() make a new copy of ap for the debug functions.
It is not legal to use ap twice without reinitializing it.
Noticed by Daniel Richard G.
2013-11-11 16:00:07 -07:00
Todd C. Miller
31e83c3e7a Remove errant warning_restore_locale() call. 2013-11-11 15:24:28 -07:00
Todd C. Miller
702ec173de Move va_copy compat macro to missing.h 2013-11-11 14:35:10 -07:00
Todd C. Miller
87e1ae76af Uniquify header dependencies so we don't end up with duplicates
when a header file includes other headers.  The header dependencies
are sorted so the generated order is stable.
2013-11-11 13:53:06 -07:00
Todd C. Miller
88a57822ea Add getaddrinfo.lo to LTLIBOBJS for systems that need it.
From Daniel Richard G.
2013-11-11 12:53:44 -07:00
Todd C. Miller
906eba927e Fix pasto 2013-11-11 12:47:29 -07:00
Todd C. Miller
a69ed4a2d5 Fix typo. 2013-11-07 14:46:28 -07:00
Todd C. Miller
e8dac0e4ab regen 2013-11-04 10:30:12 -07:00
Todd C. Miller
8e503a229f Fix warnings from -Wold-style-definition 2013-11-04 06:26:37 -07:00
Todd C. Miller
3b65249bd4 Add -Wold-style-definition to --enable-warnings 2013-11-04 06:21:01 -07:00
Todd C. Miller
b616a0431f Extra debugging for ready fds. 2013-11-04 06:06:38 -07:00
Todd C. Miller
60d58f3a64 When deleting an event, check ev->events to determine whether to
remove from readfds or writefds instead of blinding removing from
both.  Also fix highfd adjustment.
2013-11-04 06:06:01 -07:00
Todd C. Miller
0eb38a228a Only check an fd that is >= 0. Timeout-only events may have a
negative fd.
2013-11-02 10:13:54 -06:00