Todd C. Miller
5d2e9426b2
We cannot (easily) use clock_gettime(CLOCK_MONOTONIC) directly as
...
it may be present but not implemented. Add sudo_gettime_real() and
sudo_gettime_mono() functions to get the real and monotonic times
respectively. Now sudo_gettime_mono() checks the value of
sysconf(_SC_MONOTONIC_CLOCK) before calling clock_gettime(CLOCK_MONOTONIC)
and falls back on sudo_gettime_real() as needed. The Mach version
of sudo_gettime_mono() uses mach_absolute_time().
This should fix problems with timestamp files on systems where
the CLOCK_MONOTONIC is defined but not actually implemented.
2015-02-24 11:19:21 -07:00
Todd C. Miller
49128a79e3
Add regress for mkdtemp and mkstemps from OpenBSD
2015-02-20 14:37:02 -07:00
Todd C. Miller
be8dbeb22e
Avoid using HOST_NAME_MAX directly and use sysconf(_SC_HOST_NAME_MAX)
...
instead.
2015-02-19 20:28:02 -07:00
Todd C. Miller
166db8eeb4
Use weak symbols for sudo_warn_gettext() and sudo_warn_strerror()
...
so distros using "-Wl,--no-undefined" in LDFLAGS don't run into
problems.
2015-02-17 06:42:10 -07:00
Todd C. Miller
cecdd7e728
Russian translation for sudoers from translationproject.org.
2015-02-06 15:28:04 -07:00
Todd C. Miller
02b3fa2fdd
French translation for sudoers from translationproject.org.
2014-11-19 15:20:11 -07:00
Todd C. Miller
f730b28ce0
Adjust regress test now that boolean settings display an error for
...
invalid input.
2014-10-27 16:31:01 -06:00
Todd C. Miller
2be376aae0
Add lib/zlib/zlib.exp
2014-10-27 14:47:48 -06:00
Todd C. Miller
b91a91d289
Move sample.* files to a sudo examples dir
2014-10-24 14:25:12 -06:00
Todd C. Miller
e9914a91b1
The sudoers plugin now defines its own list of debugging subsystem names
...
and defines.
2014-10-22 13:30:52 -06:00
Todd C. Miller
866cfc4fc3
Add support for multiple Debug lines per program. Callers may
...
register arbitrary debug facilities or use built-in defaults. We
now use separate Debug statements for plugins and programs.
2014-10-22 13:23:05 -06:00
Todd C. Miller
a7e724b75d
Change how sudo.conf is parsed. We now do a quick parse and then
...
set the values after the entire file has been parsed. This lets
us init the debug system earlier. Plugin-specific debug flags are
now stored in struct plugin_info and struct plugin_container and
passed to the plugin via one or more debug_flags settings.
2014-10-22 13:20:32 -06:00
Todd C. Miller
bd99dcc028
Add sudo_warn_set_conversation() to specify a conversation function
...
to use for warn/fatal. If no conversation function is specified,
the standard error will be used. We now only need sudo_printf()
for things that use the parser.
2014-10-05 16:41:52 -06:00
Todd C. Miller
5f9e84ea51
Use inet_ntop() instead of inet_ntoa() and include a version for
...
systems that are missing it.
2014-10-02 07:55:08 -06:00
Todd C. Miller
2cc8ac30a1
Add hexchar unit test
2014-09-03 10:31:47 -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
f6fec06037
Add test for getprogname() and symbolic links; bug 654
2014-07-25 09:37:58 -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
9071e95080
Move mksiglist.h and mksigname.h to lib/util where they belong.
2014-07-14 09:46:17 -06:00
Todd C. Miller
18dbc52e4b
Add Solaris audit support; from Gary Winiger at Oracle.
2014-06-27 16:01:40 -06:00
Todd C. Miller
6df6404113
Sync MANIFEST with file name changes.
2014-06-27 15:01:17 -06:00
Todd C. Miller
1ee8afe1b4
update MANIFEST for alloc.h -> sudo_alloc.h change
2014-06-27 11:13:14 -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
7bafa63c15
Don't pollute the namespace with lbuf struct and functions
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
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
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
Todd C. Miller
7e24b8e651
Add Greek PO file for sudoers from translationproject.org
2014-06-04 11:43:39 -06:00
Todd C. Miller
9e5a68627f
Norwegian Bokmaal translation for sudoers from translationproject.com
2014-05-24 07:35:35 -06:00
Todd C. Miller
4eb0122e98
Norwegian Bokmaal translation for sudo from translationproject.com
2014-05-23 13:29:20 -06:00
Todd C. Miller
2e3fbaa2c5
Add trivial sudoedit parsing tests.
2014-05-12 09:52:29 -06:00
Todd C. Miller
3c5353c2be
Catalan translation for sudoers from translationproject.org.
2014-05-12 09:51:47 -06:00
Todd C. Miller
218aa1e598
Move the sha2 code into libreplace and add configure checks for
...
SHA224Update in libc and libmd. Solaris uses "void *" where we use
"unsigned char *" so we need a check for that too. Solaris sha2.h
defines SHA224, SHA256, SHA384, and SHA512 so rename those tokens.
Adapted from changes from Vladimir Marek in bug #641 .
2014-04-09 16:31:13 -06:00
Todd C. Miller
27aff732f1
Fix matching of uids and gids broken in sudo 1.8.9.
2014-04-09 10:22:09 -06:00
Todd C. Miller
967fda0fbc
The atofoo_test and hltq_test tests now display their own test error rate.
...
Display pass/fail count separately for sudo_conf and sudo_parseln tests.
Check stderr output for the sudo_conf test.
2014-03-11 09:16:45 -06:00
Todd C. Miller
ed87af2ae4
Catalan translation for sudo from translationproject.org.
2014-03-06 11:58:08 -07:00
Todd C. Miller
c934882c3e
Czech translation for sudoers from translationproject.org
2014-03-01 07:53:17 -07:00
Todd C. Miller
b41f5c2d3b
Serbian translation for sudoers from translationproject.org.
2014-02-25 17:14:51 -07:00
Todd C. Miller
96d87d55dd
First cut add installing an init.d file for HP-UX and AIX to remove
...
old sudo timestamp files at boot time.
2014-02-16 10:22:43 -07:00
Todd C. Miller
85598f77b2
Use inet_pton() instead of inet_aton() and include a version from
...
BIND for those without it.
2014-02-05 10:00:07 -07:00
Todd C. Miller
26f2dd3b9b
Add regress for atobool(), atoid() and atomode()
2014-02-03 10:47:19 -07:00
Todd C. Miller
7155fc526f
Bring back boot time checking code and zero out time stamp files
...
that predate the boot time. This should help systems w/o /var/run
where the admin has setup rc.d to clear the timestamp directory.
2014-02-03 05:45:27 -07:00
Todd C. Miller
659b1f0e34
Switch to new time stamp file format. Each user now has a single
...
file which may contain multiple records when per-tty time stamps
are in use (the default). The time stamps use a monotonic timer
where available and are once again stored in /var/run/sudo. The
lecture status is now stored separately from the time stamps in a
different directory.
2014-01-30 15:50:40 -07:00
Todd C. Miller
1adeda54ef
Add support for preventing fds from getting clobbered by closefrom().
2013-12-20 11:14:32 -07:00
Todd C. Miller
3e2d818ed9
Move prototypes for functions provided by libcommon that don't have
...
their own header files into sudo_util.h.
2013-12-12 18:29:07 -07:00
Todd C. Miller
d83bfb9fe6
Add atomode() function for parsing a file mode.
2013-12-10 16:56:54 -07:00
Todd C. Miller
f83eac40eb
Add strtonum.c to compat for simpler number parsing.
2013-12-10 14:38:52 -07:00
Todd C. Miller
0d81263e26
Instead of setprogname(), add initprogname() which gets the program
...
name for getprogname() using /proc or pstat() if possible.
2013-12-01 19:12:21 -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