Rename plugin "args" to "options"

This commit is contained in:
Todd C. Miller
2012-03-15 12:32:31 -04:00
parent 741f57e68c
commit 96f046c1ce
16 changed files with 93 additions and 93 deletions

View File

@@ -205,9 +205,9 @@ set_plugin(const char *entry)
{
struct plugin_info *info;
const char *name, *path, *cp, *ep;
char **args = NULL;
char **options = NULL;
size_t namelen, pathlen;
unsigned int nargs;
unsigned int nopts;
/* Parse Plugin line */
name = entry;
@@ -218,34 +218,34 @@ set_plugin(const char *entry)
while (isblank((unsigned char)*path))
path++;
if ((cp = strpbrk(path, " \t")) != NULL) {
/* Convert extra args to an array. */
/* Convert any options to an array. */
pathlen = (size_t)(cp - path);
while (isblank((unsigned char)*cp))
cp++;
/* Count number of args and allocate array. */
for (ep = cp, nargs = 1; (ep = strpbrk(ep, " \t")) != NULL; nargs++) {
/* Count number of options and allocate array. */
for (ep = cp, nopts = 1; (ep = strpbrk(ep, " \t")) != NULL; nopts++) {
while (isblank((unsigned char)*ep))
ep++;
}
args = emalloc2(nargs + 1, sizeof(*args));
/* Fill in args array, there is at least one element. */
for (nargs = 0; (ep = strpbrk(cp, " \t")) != NULL; ) {
args[nargs++] = estrndup(cp, (size_t)(ep - cp));
options = emalloc2(nopts + 1, sizeof(*options));
/* Fill in options array, there is at least one element. */
for (nopts = 0; (ep = strpbrk(cp, " \t")) != NULL; ) {
options[nopts++] = estrndup(cp, (size_t)(ep - cp));
while (isblank((unsigned char)*ep))
ep++;
cp = ep;
}
args[nargs++] = estrdup(cp);
args[nargs] = NULL;
options[nopts++] = estrdup(cp);
options[nopts] = NULL;
} else {
/* No extra args. */
/* No extra options. */
pathlen = strlen(path);
}
info = emalloc(sizeof(*info));
info->symbol_name = estrndup(name, namelen);
info->path = estrndup(path, pathlen);
info->args = args;
info->options = options;
info->prev = info;
info->next = NULL;
tq_append(&sudo_conf_data.plugins, info);
@@ -353,7 +353,7 @@ done:
info = emalloc(sizeof(*info));
info->symbol_name = "sudoers_policy";
info->path = SUDOERS_PLUGIN;
info->args = NULL;
info->options = NULL;
info->prev = info;
info->next = NULL;
tq_append(&sudo_conf_data.plugins, info);
@@ -362,7 +362,7 @@ done:
info = emalloc(sizeof(*info));
info->symbol_name = "sudoers_io";
info->path = SUDOERS_PLUGIN;
info->args = NULL;
info->options = NULL;
info->prev = info;
info->next = NULL;
tq_append(&sudo_conf_data.plugins, info);

View File

@@ -2,7 +2,7 @@
# Sample /etc/sudo.conf file
#
# Format:
# Plugin plugin_name plugin_path plugin_args ...
# Plugin plugin_name plugin_path plugin_options ...
# Path askpass /path/to/askpass
# Path noexec /path/to/sudo_noexec.so
# Debug sudo /var/log/sudo_debug all@warn
@@ -13,7 +13,7 @@
# The plugin_path is relative to ${prefix}/libexec unless fully qualified.
# The plugin_name corresponds to a global symbol in the plugin
# that contains the plugin interface structure.
# The plugin_args are optional.
# The plugin_options are optional.
#
# The sudoers plugin is used by default if no Plugin lines are present.
Plugin sudoers_policy sudoers.so

View File

@@ -326,7 +326,7 @@ PPLLUUGGIINNSS
# Default /etc/sudo.conf file
#
# Format:
# Plugin plugin_name plugin_path plugin_args ...
# Plugin plugin_name plugin_path plugin_options ...
# Path askpass /path/to/askpass
# Path noexec /path/to/sudo_noexec.so
# Debug sudo /var/log/sudo_debug all@warn
@@ -336,7 +336,7 @@ PPLLUUGGIINNSS
# fully qualified.
# The plugin_name corresponds to a global symbol in the plugin
# that contains the plugin interface structure.
# The plugin_args are optional.
# The plugin_options are optional.
#
Plugin policy_plugin sudoers.so
Plugin io_plugin sudoers.so
@@ -624,4 +624,4 @@ DDIISSCCLLAAIIMMEERR
1.8.5 March 14, 2012 SUDO(1m)
1.8.5 March 15, 2012 SUDO(1m)

View File

@@ -149,7 +149,7 @@
.\" ========================================================================
.\"
.IX Title "SUDO @mansectsu@"
.TH SUDO @mansectsu@ "March 14, 2012" "1.8.5" "MAINTENANCE COMMANDS"
.TH SUDO @mansectsu@ "March 15, 2012" "1.8.5" "MAINTENANCE COMMANDS"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -526,7 +526,7 @@ which corresponds to the following \fI@sysconfdir@/sudo.conf\fR file.
\& # Default @sysconfdir@/sudo.conf file
\& #
\& # Format:
\& # Plugin plugin_name plugin_path plugin_args ...
\& # Plugin plugin_name plugin_path plugin_options ...
\& # Path askpass /path/to/askpass
\& # Path noexec /path/to/sudo_noexec.so
\& # Debug sudo /var/log/sudo_debug all@warn
@@ -536,7 +536,7 @@ which corresponds to the following \fI@sysconfdir@/sudo.conf\fR file.
\& # fully qualified.
\& # The plugin_name corresponds to a global symbol in the plugin
\& # that contains the plugin interface structure.
\& # The plugin_args are optional.
\& # The plugin_options are optional.
\& #
\& Plugin policy_plugin sudoers.so
\& Plugin io_plugin sudoers.so

View File

@@ -421,7 +421,7 @@ which corresponds to the following F<@sysconfdir@/sudo.conf> file.
# Default @sysconfdir@/sudo.conf file
#
# Format:
# Plugin plugin_name plugin_path plugin_args ...
# Plugin plugin_name plugin_path plugin_options ...
# Path askpass /path/to/askpass
# Path noexec /path/to/sudo_noexec.so
# Debug sudo /var/log/sudo_debug all@warn
@@ -431,7 +431,7 @@ which corresponds to the following F<@sysconfdir@/sudo.conf> file.
# fully qualified.
# The plugin_name corresponds to a global symbol in the plugin
# that contains the plugin interface structure.
# The plugin_args are optional.
# The plugin_options are optional.
#
Plugin policy_plugin sudoers.so
Plugin io_plugin sudoers.so

View File

@@ -32,8 +32,8 @@ DDEESSCCRRIIPPTTIIOONN
io_plugin in the plugin shared object. The _p_a_t_h may be fully qualified
or relative. If not fully qualified it is relative to the
_/_u_s_r_/_l_o_c_a_l_/_l_i_b_e_x_e_c directory. Any additional parameters after the _p_a_t_h
are passed as arguments to the plugin's _o_p_e_n function. Lines that
don't begin with Plugin, Path, Debug or Set are silently ignored.
are passed as options to the plugin's _o_p_e_n function. Lines that don't
begin with Plugin, Path, Debug or Set are silently ignored.
The same shared object may contain multiple plugins, each with a
different symbol name. The shared object file must be owned by uid 0
@@ -45,7 +45,7 @@ DDEESSCCRRIIPPTTIIOONN
# Default /etc/sudo.conf file
#
# Format:
# Plugin plugin_name plugin_path optional_args
# Plugin plugin_name plugin_path plugin_options ...
# Path askpass /path/to/askpass
# Path noexec /path/to/sudo_noexec.so
# Debug sudo /var/log/sudo_debug all@warn
@@ -55,7 +55,7 @@ DDEESSCCRRIIPPTTIIOONN
# fully qualified.
# The plugin_name corresponds to a global symbol in the plugin
# that contains the plugin interface structure.
# The plugin_args are optional.
# The plugin_options are optional.
#
Plugin sudoers_policy sudoers.so
Plugin sudoers_io sudoers.so
@@ -74,7 +74,7 @@ DDEESSCCRRIIPPTTIIOONN
int (*open)(unsigned int version, sudo_conv_t conversation,
sudo_printf_t plugin_printf, char * const settings[],
char * const user_info[], char * const user_env[],
char * const plugin_args[]);
char * const plugin_options[]);
void (*close)(int exit_status, int error);
int (*show_version)(int verbose);
int (*check_policy)(int argc, char * const argv[],
@@ -106,7 +106,7 @@ DDEESSCCRRIIPPTTIIOONN
int (*open)(unsigned int version, sudo_conv_t conversation,
sudo_printf_t plugin_printf, char * const settings[],
char * const user_info[], char * const user_env[],
char * const plugin_args[]);
char * const plugin_options[]);
Returns 1 on success, 0 on failure, -1 if a general error occurred,
or -2 if there was a usage error. In the latter case, ssuuddoo will
@@ -319,17 +319,17 @@ DDEESSCCRRIIPPTTIIOONN
equal sign ('=') since the _n_a_m_e field will never include one
itself but the _v_a_l_u_e might.
plugin_args
plugin_options
Any (non-comment) strings immediately after the plugin path are
treated as arguments to the plugin. These arguments are split
on a white space boundary and are passed to the plugin in the
form of a NULL-terminated array of strings. If no arguments
were specified, _p_l_u_g_i_n___a_r_g_s will be the NULL pointer.
were specified, _p_l_u_g_i_n___o_p_t_i_o_n_s will be the NULL pointer.
NOTE: the _p_l_u_g_i_n___a_r_g_s parameter is only available starting with
API version 1.2. A plugin mmuusstt check the API version specified
by the ssuuddoo front end before using _p_l_u_g_i_n___a_r_g_s. Failure to do
so may result in a crash.
NOTE: the _p_l_u_g_i_n___o_p_t_i_o_n_s parameter is only available starting
with API version 1.2. A plugin mmuusstt check the API version
specified by the ssuuddoo front end before using _p_l_u_g_i_n___o_p_t_i_o_n_s.
Failure to do so may result in a crash.
close
void (*close)(int exit_status, int error);
@@ -730,7 +730,7 @@ DDEESSCCRRIIPPTTIIOONN
int (*open)(unsigned int version, sudo_conv_t conversation
sudo_printf_t plugin_printf, char * const settings[],
char * const user_info[], int argc, char * const argv[],
char * const user_env[], char * const plugin_args[]);
char * const user_env[], char * const plugin_options[]);
void (*close)(int exit_status, int error); /* wait status or error */
int (*show_version)(int verbose);
int (*log_ttyin)(const char *buf, unsigned int len);
@@ -777,7 +777,7 @@ DDEESSCCRRIIPPTTIIOONN
int (*open)(unsigned int version, sudo_conv_t conversation
sudo_printf_t plugin_printf, char * const settings[],
char * const user_info[], int argc, char * const argv[],
char * const user_env[], char * const plugin_args[]);
char * const user_env[], char * const plugin_options[]);
The _o_p_e_n function is run before the _l_o_g___i_n_p_u_t, _l_o_g___o_u_t_p_u_t or
_s_h_o_w___v_e_r_s_i_o_n functions are called. It is only called if the
@@ -854,17 +854,17 @@ DDEESSCCRRIIPPTTIIOONN
equal sign ('=') since the _n_a_m_e field will never include one
itself but the _v_a_l_u_e might.
plugin_args
plugin_options
Any (non-comment) strings immediately after the plugin path are
treated as arguments to the plugin. These arguments are split
on a white space boundary and are passed to the plugin in the
form of a NULL-terminated array of strings. If no arguments
were specified, _p_l_u_g_i_n___a_r_g_s will be the NULL pointer.
were specified, _p_l_u_g_i_n___o_p_t_i_o_n_s will be the NULL pointer.
NOTE: the _p_l_u_g_i_n___a_r_g_s parameter is only available starting with
API version 1.2. A plugin mmuusstt check the API version specified
by the ssuuddoo front end before using _p_l_u_g_i_n___a_r_g_s. Failure to do
so may result in a crash.
NOTE: the _p_l_u_g_i_n___o_p_t_i_o_n_s parameter is only available starting
with API version 1.2. A plugin mmuusstt check the API version
specified by the ssuuddoo front end before using _p_l_u_g_i_n___o_p_t_i_o_n_s.
Failure to do so may result in a crash.
close
void (*close)(int exit_status, int error);

View File

@@ -174,7 +174,7 @@ plugin. The \fIsymbol_name\fR is the name of the \f(CW\*(C`struct policy_plugin
or \f(CW\*(C`struct io_plugin\*(C'\fR in the plugin shared object. The \fIpath\fR
may be fully qualified or relative. If not fully qualified it is
relative to the \fI@prefix@/libexec\fR directory. Any additional
parameters after the \fIpath\fR are passed as arguments to the plugin's
parameters after the \fIpath\fR are passed as options to the plugin's
\&\fIopen\fR function. Lines that don't begin with \f(CW\*(C`Plugin\*(C'\fR, \f(CW\*(C`Path\*(C'\fR,
\&\f(CW\*(C`Debug\*(C'\fR or \f(CW\*(C`Set\*(C'\fR are silently ignored.
.PP
@@ -189,7 +189,7 @@ This limitation does not apply to I/O plugins.
\& # Default @sysconfdir@/sudo.conf file
\& #
\& # Format:
\& # Plugin plugin_name plugin_path optional_args
\& # Plugin plugin_name plugin_path plugin_options ...
\& # Path askpass /path/to/askpass
\& # Path noexec /path/to/sudo_noexec.so
\& # Debug sudo /var/log/sudo_debug all@warn
@@ -199,7 +199,7 @@ This limitation does not apply to I/O plugins.
\& # fully qualified.
\& # The plugin_name corresponds to a global symbol in the plugin
\& # that contains the plugin interface structure.
\& # The plugin_args are optional.
\& # The plugin_options are optional.
\& #
\& Plugin sudoers_policy sudoers.so
\& Plugin sudoers_io sudoers.so
@@ -220,7 +220,7 @@ so that \fBsudo\fR can load it.
\& int (*open)(unsigned int version, sudo_conv_t conversation,
\& sudo_printf_t plugin_printf, char * const settings[],
\& char * const user_info[], char * const user_env[],
\& char * const plugin_args[]);
\& char * const plugin_options[]);
\& void (*close)(int exit_status, int error);
\& int (*show_version)(int verbose);
\& int (*check_policy)(int argc, char * const argv[],
@@ -254,7 +254,7 @@ built against.
\& int (*open)(unsigned int version, sudo_conv_t conversation,
\& sudo_printf_t plugin_printf, char * const settings[],
\& char * const user_info[], char * const user_env[],
\& char * const plugin_args[]);
\& char * const plugin_options[]);
.Ve
.Sp
Returns 1 on success, 0 on failure, \-1 if a general error occurred,
@@ -468,17 +468,17 @@ The user's environment in the form of a \f(CW\*(C`NULL\*(C'\fR\-terminated vecto
When parsing \fIuser_env\fR, the plugin should split on the \fBfirst\fR
equal sign ('=') since the \fIname\fR field will never include one
itself but the \fIvalue\fR might.
.IP "plugin_args" 4
.IX Item "plugin_args"
.IP "plugin_options" 4
.IX Item "plugin_options"
Any (non-comment) strings immediately after the plugin path are
treated as arguments to the plugin. These arguments are split on
a white space boundary and are passed to the plugin in the form of
a \f(CW\*(C`NULL\*(C'\fR\-terminated array of strings. If no arguments were
specified, \fIplugin_args\fR will be the \s-1NULL\s0 pointer.
specified, \fIplugin_options\fR will be the \s-1NULL\s0 pointer.
.Sp
\&\s-1NOTE:\s0 the \fIplugin_args\fR parameter is only available starting with
\&\s-1NOTE:\s0 the \fIplugin_options\fR parameter is only available starting with
\&\s-1API\s0 version 1.2. A plugin \fBmust\fR check the \s-1API\s0 version specified
by the \fBsudo\fR front end before using \fIplugin_args\fR. Failure to
by the \fBsudo\fR front end before using \fIplugin_options\fR. Failure to
do so may result in a crash.
.RE
.RS 4
@@ -909,7 +909,7 @@ version 1.2 or higher, \f(CW\*(C`deregister_hooks\*(C'\fR will not be called.
\& int (*open)(unsigned int version, sudo_conv_t conversation
\& sudo_printf_t plugin_printf, char * const settings[],
\& char * const user_info[], int argc, char * const argv[],
\& char * const user_env[], char * const plugin_args[]);
\& char * const user_env[], char * const plugin_options[]);
\& void (*close)(int exit_status, int error); /* wait status or error */
\& int (*show_version)(int verbose);
\& int (*log_ttyin)(const char *buf, unsigned int len);
@@ -959,7 +959,7 @@ built against.
\& int (*open)(unsigned int version, sudo_conv_t conversation
\& sudo_printf_t plugin_printf, char * const settings[],
\& char * const user_info[], int argc, char * const argv[],
\& char * const user_env[], char * const plugin_args[]);
\& char * const user_env[], char * const plugin_options[]);
.Ve
.Sp
The \fIopen\fR function is run before the \fIlog_input\fR, \fIlog_output\fR
@@ -1034,17 +1034,17 @@ The user's environment in the form of a \f(CW\*(C`NULL\*(C'\fR\-terminated vecto
When parsing \fIuser_env\fR, the plugin should split on the \fBfirst\fR
equal sign ('=') since the \fIname\fR field will never include one
itself but the \fIvalue\fR might.
.IP "plugin_args" 4
.IX Item "plugin_args"
.IP "plugin_options" 4
.IX Item "plugin_options"
Any (non-comment) strings immediately after the plugin path are
treated as arguments to the plugin. These arguments are split on
a white space boundary and are passed to the plugin in the form of
a \f(CW\*(C`NULL\*(C'\fR\-terminated array of strings. If no arguments were
specified, \fIplugin_args\fR will be the \s-1NULL\s0 pointer.
specified, \fIplugin_options\fR will be the \s-1NULL\s0 pointer.
.Sp
\&\s-1NOTE:\s0 the \fIplugin_args\fR parameter is only available starting with
\&\s-1NOTE:\s0 the \fIplugin_options\fR parameter is only available starting with
\&\s-1API\s0 version 1.2. A plugin \fBmust\fR check the \s-1API\s0 version specified
by the \fBsudo\fR front end before using \fIplugin_args\fR. Failure to
by the \fBsudo\fR front end before using \fIplugin_options\fR. Failure to
do so may result in a crash.
.RE
.RS 4

View File

@@ -48,7 +48,7 @@ plugin. The I<symbol_name> is the name of the C<struct policy_plugin>
or C<struct io_plugin> in the plugin shared object. The I<path>
may be fully qualified or relative. If not fully qualified it is
relative to the F<@prefix@/libexec> directory. Any additional
parameters after the I<path> are passed as arguments to the plugin's
parameters after the I<path> are passed as options to the plugin's
I<open> function. Lines that don't begin with C<Plugin>, C<Path>,
C<Debug> or C<Set> are silently ignored.
@@ -62,7 +62,7 @@ This limitation does not apply to I/O plugins.
# Default @sysconfdir@/sudo.conf file
#
# Format:
# Plugin plugin_name plugin_path optional_args
# Plugin plugin_name plugin_path plugin_options ...
# Path askpass /path/to/askpass
# Path noexec /path/to/sudo_noexec.so
# Debug sudo /var/log/sudo_debug all@warn
@@ -72,7 +72,7 @@ This limitation does not apply to I/O plugins.
# fully qualified.
# The plugin_name corresponds to a global symbol in the plugin
# that contains the plugin interface structure.
# The plugin_args are optional.
# The plugin_options are optional.
#
Plugin sudoers_policy sudoers.so
Plugin sudoers_io sudoers.so
@@ -92,7 +92,7 @@ so that B<sudo> can load it.
int (*open)(unsigned int version, sudo_conv_t conversation,
sudo_printf_t plugin_printf, char * const settings[],
char * const user_info[], char * const user_env[],
char * const plugin_args[]);
char * const plugin_options[]);
void (*close)(int exit_status, int error);
int (*show_version)(int verbose);
int (*check_policy)(int argc, char * const argv[],
@@ -129,7 +129,7 @@ built against.
int (*open)(unsigned int version, sudo_conv_t conversation,
sudo_printf_t plugin_printf, char * const settings[],
char * const user_info[], char * const user_env[],
char * const plugin_args[]);
char * const plugin_options[]);
Returns 1 on success, 0 on failure, -1 if a general error occurred,
or -2 if there was a usage error. In the latter case, B<sudo> will
@@ -380,17 +380,17 @@ When parsing I<user_env>, the plugin should split on the B<first>
equal sign ('=') since the I<name> field will never include one
itself but the I<value> might.
=item plugin_args
=item plugin_options
Any (non-comment) strings immediately after the plugin path are
treated as arguments to the plugin. These arguments are split on
a white space boundary and are passed to the plugin in the form of
a C<NULL>-terminated array of strings. If no arguments were
specified, I<plugin_args> will be the NULL pointer.
specified, I<plugin_options> will be the NULL pointer.
NOTE: the I<plugin_args> parameter is only available starting with
NOTE: the I<plugin_options> parameter is only available starting with
API version 1.2. A plugin B<must> check the API version specified
by the B<sudo> front end before using I<plugin_args>. Failure to
by the B<sudo> front end before using I<plugin_options>. Failure to
do so may result in a crash.
=back
@@ -850,7 +850,7 @@ version 1.2 or higher, C<deregister_hooks> will not be called.
int (*open)(unsigned int version, sudo_conv_t conversation
sudo_printf_t plugin_printf, char * const settings[],
char * const user_info[], int argc, char * const argv[],
char * const user_env[], char * const plugin_args[]);
char * const user_env[], char * const plugin_options[]);
void (*close)(int exit_status, int error); /* wait status or error */
int (*show_version)(int verbose);
int (*log_ttyin)(const char *buf, unsigned int len);
@@ -903,7 +903,7 @@ built against.
int (*open)(unsigned int version, sudo_conv_t conversation
sudo_printf_t plugin_printf, char * const settings[],
char * const user_info[], int argc, char * const argv[],
char * const user_env[], char * const plugin_args[]);
char * const user_env[], char * const plugin_options[]);
The I<open> function is run before the I<log_input>, I<log_output>
or I<show_version> functions are called. It is only called if the
@@ -987,17 +987,17 @@ When parsing I<user_env>, the plugin should split on the B<first>
equal sign ('=') since the I<name> field will never include one
itself but the I<value> might.
=item plugin_args
=item plugin_options
Any (non-comment) strings immediately after the plugin path are
treated as arguments to the plugin. These arguments are split on
a white space boundary and are passed to the plugin in the form of
a C<NULL>-terminated array of strings. If no arguments were
specified, I<plugin_args> will be the NULL pointer.
specified, I<plugin_options> will be the NULL pointer.
NOTE: the I<plugin_args> parameter is only available starting with
NOTE: the I<plugin_options> parameter is only available starting with
API version 1.2. A plugin B<must> check the API version specified
by the B<sudo> front end before using I<plugin_args>. Failure to
by the B<sudo> front end before using I<plugin_options>. Failure to
do so may result in a crash.
=back

View File

@@ -1350,7 +1350,7 @@ SSUUDDOO..CCOONNFF
# Default /etc/sudo.conf file
#
# Format:
# Plugin plugin_name plugin_path plugin_args ...
# Plugin plugin_name plugin_path plugin_options ...
# Path askpass /path/to/askpass
# Path noexec /path/to/sudo_noexec.so
# Debug sudo /var/log/sudo_debug all@warn
@@ -1360,7 +1360,7 @@ SSUUDDOO..CCOONNFF
# fully qualified.
# The plugin_name corresponds to a global symbol in the plugin
# that contains the plugin interface structure.
# The plugin_args are optional.
# The plugin_options are optional.
#
Plugin policy_plugin sudoers.so
Plugin io_plugin sudoers.so
@@ -1806,4 +1806,4 @@ DDIISSCCLLAAIIMMEERR
1.8.5 March 14, 2012 SUDOERS(4)
1.8.5 March 15, 2012 SUDOERS(4)

View File

@@ -148,7 +148,7 @@
.\" ========================================================================
.\"
.IX Title "SUDOERS @mansectform@"
.TH SUDOERS @mansectform@ "March 14, 2012" "1.8.5" "MAINTENANCE COMMANDS"
.TH SUDOERS @mansectform@ "March 15, 2012" "1.8.5" "MAINTENANCE COMMANDS"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -1644,7 +1644,7 @@ the following \fI@sysconfdir@/sudo.conf\fR file.
\& # Default @sysconfdir@/sudo.conf file
\& #
\& # Format:
\& # Plugin plugin_name plugin_path plugin_args ...
\& # Plugin plugin_name plugin_path plugin_options ...
\& # Path askpass /path/to/askpass
\& # Path noexec /path/to/sudo_noexec.so
\& # Debug sudo /var/log/sudo_debug all@warn
@@ -1654,7 +1654,7 @@ the following \fI@sysconfdir@/sudo.conf\fR file.
\& # fully qualified.
\& # The plugin_name corresponds to a global symbol in the plugin
\& # that contains the plugin interface structure.
\& # The plugin_args are optional.
\& # The plugin_options are optional.
\& #
\& Plugin policy_plugin sudoers.so
\& Plugin io_plugin sudoers.so

View File

@@ -1606,7 +1606,7 @@ the following F<@sysconfdir@/sudo.conf> file.
# Default @sysconfdir@/sudo.conf file
#
# Format:
# Plugin plugin_name plugin_path plugin_args ...
# Plugin plugin_name plugin_path plugin_options ...
# Path askpass /path/to/askpass
# Path noexec /path/to/sudo_noexec.so
# Debug sudo /var/log/sudo_debug all@warn
@@ -1616,7 +1616,7 @@ the following F<@sysconfdir@/sudo.conf> file.
# fully qualified.
# The plugin_name corresponds to a global symbol in the plugin
# that contains the plugin interface structure.
# The plugin_args are optional.
# The plugin_options are optional.
#
Plugin policy_plugin sudoers.so
Plugin io_plugin sudoers.so

View File

@@ -24,7 +24,7 @@ struct plugin_info {
struct plugin_info *next; /* required */
const char *path;
const char *symbol_name;
char * const * args;
char * const * options;
};
TQ_DECLARE(plugin_info)

View File

@@ -117,7 +117,7 @@ struct policy_plugin {
int (*open)(unsigned int version, sudo_conv_t conversation,
sudo_printf_t sudo_printf, char * const settings[],
char * const user_info[], char * const user_env[],
char * const plugin_args[]);
char * const plugin_plugins[]);
void (*close)(int exit_status, int error); /* wait status or error */
int (*show_version)(int verbose);
int (*check_policy)(int argc, char * const argv[],
@@ -141,7 +141,7 @@ struct io_plugin {
sudo_printf_t sudo_printf, char * const settings[],
char * const user_info[], char * const command_info[],
int argc, char * const argv[], char * const user_env[],
char * const plugin_args[]);
char * const plugin_plugins[]);
void (*close)(int exit_status, int error); /* wait status or error */
int (*show_version)(int verbose);
int (*log_ttyin)(const char *buf, unsigned int len);

View File

@@ -131,7 +131,7 @@ sudo_load_plugins(struct plugin_container *policy_plugin,
}
policy_plugin->handle = handle;
policy_plugin->name = info->symbol_name;
policy_plugin->args = info->args;
policy_plugin->options = info->options;
policy_plugin->u.generic = plugin;
} else if (plugin->type == SUDO_IO_PLUGIN) {
container = emalloc(sizeof(*container));
@@ -139,7 +139,7 @@ sudo_load_plugins(struct plugin_container *policy_plugin,
container->next = NULL;
container->handle = handle;
container->name = info->symbol_name;
container->args = info->args;
container->options = info->options;
container->u.generic = plugin;
tq_append(io_plugins, container);
}

View File

@@ -1065,7 +1065,7 @@ policy_open(struct plugin_container *plugin, char * const settings[],
break;
default:
rval = plugin->u.policy->open(SUDO_API_VERSION, sudo_conversation,
_sudo_printf, settings, user_info, user_env, plugin->args);
_sudo_printf, settings, user_info, user_env, plugin->options);
}
debug_return_bool(rval);
@@ -1180,7 +1180,7 @@ iolog_open(struct plugin_container *plugin, char * const settings[],
default:
rval = plugin->u.io->open(SUDO_API_VERSION, sudo_conversation,
_sudo_printf, settings, user_info, command_info,
argc, argv, user_env, plugin->args);
argc, argv, user_env, plugin->options);
}
debug_return_bool(rval);
}

View File

@@ -84,7 +84,7 @@ struct plugin_container {
struct plugin_container *prev; /* required */
struct plugin_container *next; /* required */
const char *name;
char * const *args;
char * const *options;
void *handle;
union {
struct generic_plugin *generic;