Commit Graph

47 Commits

Author SHA1 Message Date
Todd C. Miller
2b849b2687 Don't allow sudo_ev_loopcont() to override sudo_ev_loopexit() 2014-08-29 09:47:08 -06:00
Todd C. Miller
e9370718f9 Add some internal convenience functions. 2014-08-29 09:44:08 -06:00
Todd C. Miller
2246b1827f Don't recurse infinitely until we blow the stack when the debug
file can't be opened in the front-end.  The conversation-type debug
mode will be removed in the future.
2014-08-18 16:35:58 -06:00
Todd C. Miller
6d8c6ed37a remove unused label 2014-08-15 14:37:07 -06:00
Todd C. Miller
dcd505d0c5 Remove regress .err files in distclean target. 2014-08-08 14:53:14 -06:00
Todd C. Miller
69762d8882 Remove generated files for linker as part of distclean. 2014-08-08 14:49:06 -06:00
Todd C. Miller
76a6dad424 Add --disable-shared-libutil configure option. It may only be used
in conjunction with the --enable-static-sudoers option.
2014-08-08 11:03:24 -06:00
Todd C. Miller
f29880c1c7 If getaddrinfo() is missing libsudoutil may need to pull in networking
libraries.
2014-07-29 13:06:18 -06:00
Todd C. Miller
daf634b728 Only include functions in util.exp that are actually in the library.
Fixes a problem on Solaris where undefined functions that are listed
as exported in the map file result in a link error.
Also make sure we use our glob.c if the system is missing glob().
2014-07-29 10:52:43 -06:00
Todd C. Miller
8c86e5c116 Remove support for getting program name via /proc as pr_fname is
usually filled in after symbolic links have been processed, even
on Solaris.
2014-07-25 14:08:59 -06:00
Todd C. Miller
ceb1f6eae6 Use shlib_enable instead of soext when determining whether to install
the library.
2014-07-25 14:08:50 -06:00
Todd C. Miller
cd56a87590 Avoid potential division by zero 2014-07-25 14:07:39 -06:00
Todd C. Miller
ebbd62eac8 Don't link progname test with libsudo_util, just link in progname.lo
directly since that is all we need.  Avoid a linker issue on darwin.
2014-07-25 14:07:09 -06:00
Todd C. Miller
7421524478 Remove pstat_getproc() path as pst_ucomm on HP-UX will return the
target of a symbolic link and not the name of the link itself.
Avoid using pr_fname on AIX for the same reason.
Bug 654
2014-07-25 09:42:41 -06:00
Todd C. Miller
f6fec06037 Add test for getprogname() and symbolic links; bug 654 2014-07-25 09:37:58 -06:00
Todd C. Miller
536e5f4189 sudo_term_{erase,kill} are regular symbols not functions. 2014-07-23 17:06:33 -06:00
Todd C. Miller
47835ff289 Rename missing.h -> sudo_compat.h 2014-07-22 14:25:16 -06:00
Todd C. Miller
ecaecdc1f4 Merge secure_path.h -> sudo_util.h 2014-07-22 11:37:39 -06:00
Todd C. Miller
844a285391 Version the functions in libsudo_util 2014-07-22 11:26:17 -06:00
Todd C. Miller
127ba1354b Rename gettext.h -> sudo_gettext.h 2014-07-21 14:49:43 -06:00
Todd C. Miller
3687b665cb Rename fatal.h -> sudo_fatal.h 2014-07-21 14:40:18 -06:00
Todd C. Miller
b45727cefa Rename queue.h -> sudo_queue.h to avoid collisions with the system
version.
2014-07-21 14:37:27 -06:00
Todd C. Miller
d7c309f702 Conver sudo_debug_write() to a macro 2014-07-21 09:13:47 -06:00
Todd C. Miller
9071e95080 Move mksiglist.h and mksigname.h to lib/util where they belong. 2014-07-14 09:46:17 -06:00
Todd C. Miller
96d1967ab0 Avoid passing -no-fast-install to libtool as this results in the
build dir being left in the library path of the installed executable.
Instead, we remove the "lt-" prefix from the program name in
initprogname() so that the regress test output is unaffected by
libtool's binary wrapper.
2014-07-14 09:08:50 -06:00
Todd C. Miller
9f3caa5a62 Use sudo_strtoid() now that it is located in the same library. 2014-07-13 07:09:00 -06:00
Todd C. Miller
c10c9cd5e6 Skip leading space (ala strtol) so that we can pick up the sign
even if it is not the first character of the string.
2014-07-13 07:08:12 -06:00
Todd C. Miller
36a5767e3e efree -> sudo_efree for consistency 2014-07-10 15:35:04 -06:00
Todd C. Miller
12c3b456d8 Add sudo_warn_strerror() that wraps strerror() with calls to
setlocale() in sudoers so we always get the error string in the
user's locale.  Also change _warning() to take the error number as
a parameter instead of examining errno.
2014-07-08 09:52:21 -06:00
Todd C. Miller
2bad717548 Avoid a cppcheck warning when NSIG is not defined. 2014-07-03 16:55:01 -06:00
Todd C. Miller
4e1e76a4b1 Use libtool to install/uninstall the plugins and sudo_noexec. 2014-06-29 20:45:36 -06:00
Todd C. Miller
2ab61a1281 Don't build a static libsudo_util.a unless we are linking sudoers
statically.
2014-07-01 14:26:47 -06:00
Todd C. Miller
a8fa112a53 atobool -> sudo_strtobool
atoid-> sudo_strtoid
atomode -> sudo_strtomode
2014-06-27 14:53:54 -06:00
Todd C. Miller
d6948f5a4a Fix regexp damage when renaming erecalloc() -> sudo_erecalloc() 2014-06-27 11:48:07 -06:00
Todd C. Miller
2d61d38c23 Add sudo_ prefix to alloc.c functions and rename alloc.h -> sudo_alloc.h 2014-06-27 10:48:31 -06:00
Todd C. Miller
c4c253847e Remove extra sudo_ prefix from vfatalxnodebug and vfatalx_nodebug. 2014-06-27 10:39:49 -06:00
Todd C. Miller
8e088e65c0 Split fileops.c into parseln.c and locking.c 2014-06-27 09:46:24 -06:00
Todd C. Miller
aecef4aa1d Rename warning/fatal -> sudo_warn/sudo_fatal to avoid namespace
pollution in libsudo_util.so.
2014-06-27 09:30:52 -06:00
Todd C. Miller
d36846a699 Reduce name space pollution in libsudo_util.so 2014-06-26 16:21:19 -06:00
Todd C. Miller
7bafa63c15 Don't pollute the namespace with lbuf struct and functions 2014-06-26 15:51:15 -06:00
Todd C. Miller
6bdee0488c Rename parse_gid_list -> sudo_parse_gids to avoid namespace pollution. 2014-06-26 15:51:15 -06:00
Todd C. Miller
9ba5d82926 Rename fmt_string -> sudo_new_key_val to better describe its function. 2014-06-26 15:51:15 -06:00
Todd C. Miller
f029e3e744 Remove touch() from fileops.c and just call utimes/futimes directly.
Rename lock_file -> sudo_lock_file to avoid namespace pollution
2014-06-26 15:51:15 -06:00
Todd C. Miller
2166a6afe1 Remove use of setjmp/longjmp in the sudoers plugin. We no longer
call fatal() except in the malloc wrappers and due to libsudo_util
there is now a single copy of fatal/fatalx.
2014-06-26 15:51:15 -06:00
Todd C. Miller
088edcb6f5 Add exported libsudo_util functions to util.exp and mark in headers
using __dso_public.
2014-06-26 15:51:15 -06:00
Todd C. Miller
87c2fe5a31 Prefix all libc replacements with sudo_ and #define the real name
to the sudo_ version.  That way we don't pollute the libc namespace.
2014-06-26 15:51:08 -06:00
Todd C. Miller
4d37a4a162 Top level directory reorg
Move src/po -> po
Combine common and compat -> lib/util
Move zlib -> lib/zlib
2014-06-26 15:51:02 -06:00