Todd C. Miller
e797fc643f
Plug memory leak when a particular Path is set more than once.
2016-11-16 13:57:50 -07:00
Todd C. Miller
6dff4ac7fd
Always define _PATH_SUDO_NOEXEC, _PATH_SUDO_SESH, _PATH_SUDO_PLUGIN_DIR,
...
even if only defined to NULL. This means the accessors can always be
present.
Use RTLD_PRELOAD_VAR instead of _PATH_SUDO_NOEXEC to tell when
noexec is available.
Add ENABLE_SUDO_PLUGIN_API and use it instead of _PATH_SUDO_PLUGIN_DIR
to tell when the plugin API is available.
Add sudo_conf_clear_paths() to clear the path values so the
regress tests are not affected by compile-time settings.
2016-11-16 10:13:26 -07:00
Todd C. Miller
8cb9f298bd
Get rid of struct sudo_conf_paths and just use #defined index values
...
to access the path values.
Make all accessors available even when the feature is not enabled.
2016-11-15 15:41:41 -07:00
Todd C. Miller
66af45eb24
Add regress for noexec functionality
2016-11-14 14:21:08 -07:00
Todd C. Miller
7c56179c7d
Use "double quotes" in messages instead of a combination of the
...
accent (grave) mark and apostrophe.
2016-11-02 17:10:17 -06:00
Todd C. Miller
3f022419ae
Be consistent with the naming of the variable used to store the
...
function return value. Previously, some code used "rval", some
used "ret". This standardizes on "ret" and uses "rc" for temporary
return codes.
2016-09-08 16:38:08 -06:00
Todd C. Miller
17ad75d50b
Add a flags option to sudo_parseln() and a flag to only mach comments
...
at the beginning of the line. Use the flag when parsing ldap.conf.
2016-09-01 09:19:20 -06:00
Todd C. Miller
0123cf63f1
The Path setting for the plugin directory is "plugin_dir" not "plugin".
2015-12-18 14:03:59 -07:00
Todd C. Miller
55531958de
Allow sudo.conf Path settings to disable path names (by setting the
...
value of NULL).
2015-12-18 12:31:28 -07:00
Todd C. Miller
0b241088b3
There's no need to conditionalize the #include <unistd.h>, we require
...
a POSIX system.
2015-07-02 09:08:28 -06:00
Todd C. Miller
4a07b472f0
Only include stddef.h where it is needed.
2015-06-20 05:34:35 -06:00
Todd C. Miller
d8dd6512ce
Better handling of setlocale() returning NULL.
2015-06-19 16:49:02 -06:00
Todd C. Miller
c36415417f
Add function name to "unable to allocate memory" warnings.
2015-06-19 14:51:17 -06:00
Todd C. Miller
dc883f2454
We require ANSI C so stop using the obsolete STDC_HEADERS.
2015-06-19 14:29:27 -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
5ce50a885c
Use non-exiting allocators in libsudo_util.
2015-06-17 17:00:53 -06:00
Todd C. Miller
59ab26dbcc
Go back to a 2 args debug_decl and just use the "default" instance,
...
now renamed "active".
2015-02-01 08:24:49 -07:00
Todd C. Miller
1be81d5720
Fix path settings broken in rev 9731.
2014-10-27 16:31:33 -06:00
Todd C. Miller
d5fdd1ea07
Go back to parsing sudo.conf in place for settings and paths and
...
improve debugging info for unsupported entries and parse errors.
2014-10-26 08:33:09 -06:00
Todd C. Miller
6b1b734ffa
Add a flag argument to sudo_conf_read() so we can decide which
...
bits get parsed. This lets us parse Debug statements first and
init the debug subsystem early.
2014-10-26 08:33:08 -06:00
Todd C. Miller
4bf641df69
In the plugin registers with the debug framework at open time, the
...
sudo front-end will now set the default debug instance appropriately
before calling into the plugin. This means the plugin no longer needs
to do the sudo_debug_set_default_instance() dance.
2014-10-24 11:17:48 -06:00
Todd C. Miller
5270ebf1f2
When registering with the debug subsystem, the caller now passes
...
in an arrary of ints that gets filled in with the subsytem IDs to
be used in debug_decl.
2014-10-23 06:36:50 -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
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
36a5767e3e
efree -> sudo_efree for consistency
2014-07-10 15:35:04 -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
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
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
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