Todd C. Miller
1c3965f534
Separate sudo.conf parsing from plugin loading and move the parse
...
functions into the common lib so that visudo, etc. can use them.
2011-12-20 08:50:07 -05:00
Todd C. Miller
ab887a6fb0
No longer pass debug_file to plugin, plugins must now use CONV_DEBUG_MSG
2011-11-30 14:56:41 -05: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
53e3ad11b5
New debug framework for sudo and plugins using /etc/sudo.conf that
...
also supports function call tracing.
2011-10-22 14:00:52 -04:00
Todd C. Miller
8255ed69b9
Go back to escaping the command args for "sudo -i" and "sudo -s"
...
before calling the plugin. Otherwise, spaces in the command args
are not treated properly. The sudoers plugin will unescape non-spaces
to make matching easier.
2011-07-29 10:10:40 -04:00
Todd C. Miller
bd36d4f2ab
Add primitive format string support to the lbuf code to make translations
...
simpler.
2011-05-20 15:25:03 -04:00
Todd C. Miller
67cc4ff025
Translate help / usage strings.
2011-05-19 16:07:14 -04:00
Todd C. Miller
c865a462cc
Prepare sudo front end messages for translation.
2011-05-06 17:47:51 -04:00
Todd C. Miller
71fa43ec47
Better error message about invalid -C argument
2011-03-22 10:19:32 -04:00
Todd C. Miller
33516ed826
user_shell -> run_shell to avoid confusion with the user's SHELL variable.
2011-03-18 10:23:35 -04:00
Todd C. Miller
53da5e8cdf
Update copyright years.
2011-03-11 15:34:35 -05:00
Todd C. Miller
cde2cb00f0
Add "user_shell" boolean as a way to indicate to the plugin that
...
the -s flag was given.
2011-03-11 15:02:13 -05:00
Todd C. Miller
59515a4a6d
add help text to sudo, visudo and sudoreplay for the -h option
2011-02-21 11:33:36 -05:00
Todd C. Miller
2d88a09883
remove bogus XXX
2011-02-07 10:51:14 -05:00
Todd C. Miller
fc38481663
Perform command escaping for "sudo -s" and "sudo -i" after validating
...
sudoers so the sudoers entries don't need to have all the backslashes.
2011-01-25 09:53:57 -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
1009d7a3e6
Query local network interfaces in the main sudo driver and pass to
...
the plugin as "network_addrs" in the settings list.
2010-09-08 14:20:11 -04: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
46355186bb
Quote any non-alphanumeric characters other than '_' or '-' when passing
...
a command to be run via the shell for the -s and -i options.
2010-06-16 15:27:40 -04:00
Todd C. Miller
4fb8a83e6f
Fix -A flag when askpass is specified in sudo.conf or if sudo doesn't need
...
to read a password.
2010-06-15 15:11:10 -04:00
Todd C. Miller
f64bb67c6c
Clean up some XXXs
2010-06-15 15:01:11 -04:00
Todd C. Miller
b72a530fd0
Update copyright year
2010-06-14 12:19:49 -04:00
Todd C. Miller
eec336115a
Move askpass path specification from sudoers to sudo.conf.
2010-06-09 17:40:44 -04:00
Todd C. Miller
73b630fa97
Completely remove the -L flag from the sudo front end.
2010-05-28 17:37:36 -04:00
Todd C. Miller
0487aee6b4
Bring back closefrom settings.
2010-05-24 15:40:36 -04:00
Todd C. Miller
fa717176b2
Remove check_sudoedit function pointer in struct sudo_policy.
...
Instead, sudo will set sudoedit=true in the settings array.
The plugin should check for this and modify argv_out as appropriate
in check_policy.
2010-05-17 10:25:27 -04:00
Todd C. Miller
e336dac874
Attempt to fix building on systems that only have setuid.
2010-05-14 16:35:03 -04:00
Todd C. Miller
fdd28d411f
Work in progress support for sudoedit. The actual interface used by the
...
plugin for sudoedit is likely to change.
2010-05-13 14:09:21 -04:00
Todd C. Miller
bc813db528
Add a "noninteractive" boolean to the settings passed in to the plugin's
...
open function that is set when the user specifies the -n flag.
2010-04-14 08:41:53 -04:00
Todd C. Miller
f19be6da31
Handle plugin's open function returning -2 (usage error).
2010-04-13 09:36:43 -04:00
Todd C. Miller
7ce802792e
NULL-terminate env_add
2010-04-12 07:56:32 -04:00
Todd C. Miller
e17f1e5cbd
Delay calling the I/O plugin open function until the policy plugin
...
returns success.
2010-03-28 08:41:06 -04:00
Todd C. Miller
4b36657781
Pass in preserve_groups when the -P flag is specified as per the design
2010-03-22 08:11:06 -04:00
Todd C. Miller
6b180d24da
Fix the -s and -i flags and add support for the "implied_shell"
...
option. If the user does not specify a command, sudo will now pass
in the path to the user's shell and set impied_shell=true. The
plugin can them either check the command normally or return -2 to
cause sudo to print a usage message and exit.
2010-03-21 08:54:06 -04:00
Todd C. Miller
eec5235d19
Rewrite compat/getprogname.c and add setprogname().
...
The progname is now passed to the plugin via the settings array.
2010-03-19 07:52:31 -04:00
Todd C. Miller
b4f4afdf69
Pass in output function to lbuf_init() instead of writing to stdout.
...
A side effect is that the usage info can now go to stderr as it should.
2010-03-18 06:42:17 -04:00
Todd C. Miller
038ec569de
Use number of tty columns that is passed in user_info instead of
...
getting it directly in the lbuf code.
2010-03-17 21:25:32 -04:00
Todd C. Miller
36701e1233
Allow -k to be specified with a command.
2010-03-15 19:40:15 -04:00
Todd C. Miller
cc23068c2a
Don't use emalloc() in fmt_string(); we want to be able to use it from
...
a plugin.
2010-03-06 14:29:04 -05:00
Todd C. Miller
5ff6832e16
Simplify conversion of command line args to name=value pairs.
2010-03-05 17:14:19 -05:00
Todd C. Miller
a1b7526e33
Fix a mismatch between sudo_settings and settings_pairs that causes
...
some settings to get the wrong values.
2010-03-05 14:38:42 -05:00
Todd C. Miller
07bf968c4d
Document -D level command line flag which maps to the debug_level setting.
2010-02-24 07:48:53 -05:00
Todd C. Miller
abb431b363
Wire up debug_level
2010-02-20 13:25:10 -05:00
Todd C. Miller
b6a4cf7233
Modular sudo front-end which loads policy and I/O plugins that do
...
most the actual work. Currently relies on dynamic loading using
dlopen(). See doc/plugin.pod for the plugin API.
2010-02-20 09:41:49 -05:00