Todd C. Miller
58ffab1dfa
There's no need to escape forward slashes in JSON output. While
...
it is legal to escape a forward slash, it is not required.
2016-05-23 11:29:17 -06:00
Todd C. Miller
eb4510597b
Don't try to fflush(export_fp) or ferror(export_fp) if export_fp
...
is NULL, which can happen on the error path.
2016-05-16 14:16:08 -06:00
Todd C. Miller
578af5af4d
Use ferror() after fflush() to check the error status of the stdio
...
stream we wrote to.
2016-05-14 18:48:20 -06:00
Todd C. Miller
c0a3c6bb9d
Avoid calling fclose(NULL) on error in export_sudoers().
...
Coverity CID 104091.
2016-05-05 15:14:57 -06:00
Todd C. Miller
3354d27a17
Do not follow symbolic links in sudoedit by default. This behavior
...
can be controlled by the sudoedit_follow Defaults flag as well as
the FOLLOW/NOFOLLOW tags.
2015-08-06 13:20:01 -06: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
dc883f2454
We require ANSI C so stop using the obsolete STDC_HEADERS.
2015-06-19 14:29:27 -06:00
Todd C. Miller
45548cf049
Add support for MAIL and NOMAIL command tags to toggle mail sending
...
behavior on a per-command (or Cmnd_Alias) basis.
2015-02-19 10:02:20 -07: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
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
e7de8f66ff
Use correct gettext macro with sudo_warnx()
2014-09-16 14:01:02 -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
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
372e30851f
In -x mode, require that the input and output files be different.
...
This won't currently catch collisions between the output file
and an include file.
2014-05-13 14:18:06 -06:00
Todd C. Miller
0030bfe7d5
Fix handling of '!' operator when converting sudoers. We now add
...
a "negated" boolean flag to objects that have the '!' operator.
2014-03-04 16:18:35 -07:00
Todd C. Miller
58341a8bfc
When exporting sudoers in JSON format, use the same type of Options
...
object for both Defaults and Cmnd_Specs.
2014-02-24 09:31:14 -07:00
Todd C. Miller
0a6ec9615b
Fix indentation of Defaults entries. The initial indent should be
...
outside the loop iterating over the entries.
2014-02-12 15:00:04 -07:00
Todd C. Miller
12a1b672c0
We must include gettext.h before missing.h as it includes system
...
headers. Also add missing DEFAULT_TEXT_DOMAIN defines in sudoers
audit code that does not include sudoers.h.
2014-02-11 09:40:59 -07:00
Todd C. Miller
5f88e95bc9
Eliminate dead store found by clang checker.
2014-01-15 06:13:23 -07:00
Todd C. Miller
4b5ad37b47
Close export_fp in the error path too, but do not close stdout.
2014-01-08 16:29:18 -07:00
Todd C. Miller
65012dd661
Use a switch to map digest type to name instead of an array of
...
strings.
2013-12-16 17:00:17 -07:00
Todd C. Miller
68f6e23b07
Change visudo -x to take a file name argument, which may be '-' to
...
write the exported sudoers file to stdout.
2013-12-16 14:32:42 -07:00
Todd C. Miller
b2c456341a
Move symbol extern defs into sudoers.h
2013-12-16 14:18:42 -07:00
Todd C. Miller
acdff2d998
Use atoid() when parsing user/group IDs and print them as unsigned int.
2013-12-06 14:10:03 -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
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
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
6d8b078e2b
Add support to visudo to export sudoers in JSON format.
2013-11-15 15:11:55 -07:00