Todd C. Miller
c2c6616a0c
Move _sudo_printf from src/conversation.c to common/sudo_printf.c.
...
Add sudo_printf function pointer that is initialized to _sudo_printf()
instead of requiring a sudo_conv function pointer everywhere. The
plugin will reset sudo_printf to point to the version passed in via
the plugin open function. Now plugin_error.c can just call sudo_printf
in all cases. The sudoers binaries no longer need their own version
of sudo_printf.
2012-11-25 09:34:33 -05:00
Todd C. Miller
15c69e0e3f
Call gettext() in sudoerserror() in the user's locale and pass the untranslated string to it.
2012-11-25 09:33:58 -05:00
Todd C. Miller
595d3b2651
Display warning/error messages in the user's locale.
2012-11-08 15:37:44 -05:00
Todd C. Miller
7f36643a66
Rename yyerror() to sudoerserror() to match yacc prefix changes.
...
Not really needed due to the #defines that yacc makes but it is
less confusing this way as the lexer calls sudoerserror().
2012-09-17 17:03:17 -04:00
Todd C. Miller
5276ab3a5f
Set yacc prefix to "sudoers" to avoid conflicts other yacc parsers.
2012-09-14 16:19:25 -04:00
Todd C. Miller
e498bab4c1
Don't print an error message in yyerror() if open_sudoers() fails,
...
we've already printed an error message. Also restore the check
for sudoers_warnings in yyerror().
2012-08-23 14:02:02 -04:00
Todd C. Miller
0c8c3c0cd8
Avoid printing the >>> parse error <<< message for testsudoers
...
when the -t flag is specified.
2012-08-23 11:28:44 -04:00
Todd C. Miller
7d255e42cb
Fix some warnings from clang checker-267
2012-08-07 11:01:28 -04:00
Todd C. Miller
355d40aa86
The second argument to init_parser() is now bool.
2012-08-02 15:40:11 -04:00
Todd C. Miller
80597710c1
Fix printing of parse error message to stderr.
2012-08-02 15:37:48 -04:00
Todd C. Miller
e2d210a340
Add support for parsing an empty Runas_List, which only allows the
...
command to be run as the invoking user. This can be used in
conjunction with the Solaris Privilege Set support to grant privileges
without changing the user.
2012-08-02 14:02:54 -04:00
Todd C. Miller
4abd2a6cf4
Merge in Solaris privilege support by Darren Moffat and John Zolnowsky
2012-07-26 13:49:21 -04:00
Todd C. Miller
12422f928c
Quiet a clang-analyzer false positive.
2012-03-27 13:01:45 -04:00
Todd C. Miller
55d1a1a79d
Use ecalloc() when allocating structs.
2012-03-19 11:24:24 -04:00
Todd C. Miller
8d05f0d1b0
Add type param to sudo_secure_path() and add sudo_secure_file()
...
and sudo_secure_dir() wrappers which get by #includedir in sudoers.
2012-02-29 15:50:48 -05:00
Todd C. Miller
0f5eaa17fd
Print a more sensible error if yyparse() returns non-zero but
...
yyerror() was not called.
2012-01-04 15:45:03 -05:00
Todd C. Miller
a1815e17ca
Replace y.tab.c with the correct filename in #line directives.
2012-01-04 15:35:49 -05:00
Todd C. Miller
21a2f95821
Use stdbool.h instead of rolling our own TRUE/FALSE macros.
2011-12-02 11:27:33 -05:00
Todd C. Miller
09beba8259
Revert 003bdb078a15. We need to #include <gram.h> not "gram.h" and
...
<def_data.h> and not "def_data.h" when generating the parser in a
build dir.
2011-11-12 12:18:44 -05:00
Todd C. Miller
bd881c26e8
Keep track of the last token returned. On error, if the last token was
...
COMMENT, decrement sudolineno since the error most likely occurred on
the preceding line. Previously we always uses sudolineno-1 which will
give the wrong line number for errors within a line.
2011-11-05 07:37:14 -04:00
Todd C. Miller
839919566e
Add debug_decl/debug_return (almost) everywhere.
...
Remove old sudo_debug() and convert users to sudo_debug_printf().
2011-10-22 14:40:21 -04:00
Todd C. Miller
de33689ae6
Make "verbose" static; fixes a namespace clash with pam_ssh_agent_auth
...
(and it doesn't need to be extern these days).
2011-09-21 10:15:13 -04:00
Todd C. Miller
b643b190a7
Prepare sudoers module messages for translation.
2011-05-16 16:32:05 -04:00
Todd C. Miller
45b82039be
Move lexer globals initialization into init_lexer.
2011-03-27 09:45:42 -04:00
Todd C. Miller
edfb5cd7a2
Move LEXTRACE macro to toke.h so we can use it in yyerror().
2011-03-21 12:39:06 -04:00
Todd C. Miller
3c0672e2e3
Allow sudoers file name, mode, uid and gid to be specified in the
...
settings list. The sudo front end does not currently set these
but may in the future.
2011-02-23 13:38:52 -05:00
Todd C. Miller
ae2f7638f5
standardize on "return foo;" rather than "return(foo);" or "return (foo);"
2011-01-24 15:15:18 -05:00
Todd C. Miller
f7f8b6867e
Update copyright year to 2011
2011-01-20 16:46:56 -05:00
Todd C. Miller
866ffd0bdb
ANSIfy
2011-01-08 15:15:30 -05:00
Todd C. Miller
39d1167f33
Include config.h before any other includes to make sure we get the
...
right value for _FILE_OFFSET_BITS.
2010-11-09 08:55:55 -05:00
Todd C. Miller
30fe4a067c
Set usrinfo for AIX
...
Set adminstrative domain for the process when looking up user's
password or group info and when preparing for execve().
Include strings.h even if string.h exists since they may define
different things. Fixes warnings on AIX and others.
2010-06-29 13:08:05 -04:00
Todd C. Miller
2dd29bf64d
Break sudoers transcript feature up into log_input and log_output.
2010-05-30 10:31:38 -04:00
Todd C. Miller
d5ae4c7d87
Kill __P in sudoers
2010-03-17 19:56:27 -04:00
Todd C. Miller
d54cedfab7
Use warningx in yyerror() so the conversation function gets used
...
when built as part of sudoers.
2010-03-15 10:44:06 -04:00
Todd C. Miller
9b0205846b
Initial bits of sudoers plugin; still needs work.
2010-03-14 19:58:47 -04:00
Todd C. Miller
e90fa482f9
Rework source layout in preparation for modular sudo.
2010-02-20 09:14:01 -05:00