From: Todd C. Miller Date: Thu, 15 Mar 2012 16:32:31 +0000 (-0400) Subject: Rename plugin "args" to "options" X-Git-Tag: SUDO_1_8_5~1^2~134 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=96f046c1cee4ad6825fd0a03ef208fe222fa6b47;p=sudo Rename plugin "args" to "options" --- diff --git a/common/sudo_conf.c b/common/sudo_conf.c index dded1a80c..bf34254bc 100644 --- a/common/sudo_conf.c +++ b/common/sudo_conf.c @@ -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); diff --git a/doc/sample.sudo.conf b/doc/sample.sudo.conf index 34be4bd3e..3672bcbad 100644 --- a/doc/sample.sudo.conf +++ b/doc/sample.sudo.conf @@ -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 diff --git a/doc/sudo.cat b/doc/sudo.cat index 6fb8db536..c32092bee 100644 --- a/doc/sudo.cat +++ b/doc/sudo.cat @@ -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) diff --git a/doc/sudo.man.in b/doc/sudo.man.in index e2051c8a1..856164e35 100644 --- a/doc/sudo.man.in +++ b/doc/sudo.man.in @@ -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 diff --git a/doc/sudo.pod b/doc/sudo.pod index 50769f1a3..b9f7578b7 100644 --- a/doc/sudo.pod +++ b/doc/sudo.pod @@ -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 diff --git a/doc/sudo_plugin.cat b/doc/sudo_plugin.cat index 2cdff1bda..6ceba0f2f 100644 --- a/doc/sudo_plugin.cat +++ b/doc/sudo_plugin.cat @@ -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); diff --git a/doc/sudo_plugin.man.in b/doc/sudo_plugin.man.in index 66511f577..2565f5319 100644 --- a/doc/sudo_plugin.man.in +++ b/doc/sudo_plugin.man.in @@ -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 diff --git a/doc/sudo_plugin.pod b/doc/sudo_plugin.pod index c9d831e75..642ad9b6e 100644 --- a/doc/sudo_plugin.pod +++ b/doc/sudo_plugin.pod @@ -48,7 +48,7 @@ plugin. The I is the name of the C or C in the plugin shared object. The I 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 are passed as arguments to the plugin's +parameters after the I are passed as options to the plugin's I function. Lines that don't begin with C, C, C or C 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 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 will @@ -380,17 +380,17 @@ When parsing I, the plugin should split on the B equal sign ('=') since the I field will never include one itself but the I 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-terminated array of strings. If no arguments were -specified, I will be the NULL pointer. +specified, I will be the NULL pointer. -NOTE: the I parameter is only available starting with +NOTE: the I parameter is only available starting with API version 1.2. A plugin B check the API version specified -by the B front end before using I. Failure to +by the B front end before using I. Failure to do so may result in a crash. =back @@ -850,7 +850,7 @@ version 1.2 or higher, C 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 function is run before the I, I or I functions are called. It is only called if the @@ -987,17 +987,17 @@ When parsing I, the plugin should split on the B equal sign ('=') since the I field will never include one itself but the I 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-terminated array of strings. If no arguments were -specified, I will be the NULL pointer. +specified, I will be the NULL pointer. -NOTE: the I parameter is only available starting with +NOTE: the I parameter is only available starting with API version 1.2. A plugin B check the API version specified -by the B front end before using I. Failure to +by the B front end before using I. Failure to do so may result in a crash. =back diff --git a/doc/sudoers.cat b/doc/sudoers.cat index d6e9d45ea..e59a198a8 100644 --- a/doc/sudoers.cat +++ b/doc/sudoers.cat @@ -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) diff --git a/doc/sudoers.man.in b/doc/sudoers.man.in index ef77a69b0..53792d2b2 100644 --- a/doc/sudoers.man.in +++ b/doc/sudoers.man.in @@ -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 diff --git a/doc/sudoers.pod b/doc/sudoers.pod index e807bbfe7..841bf742a 100644 --- a/doc/sudoers.pod +++ b/doc/sudoers.pod @@ -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 diff --git a/include/sudo_conf.h b/include/sudo_conf.h index 9e0ea14bb..c0dcc5a5f 100644 --- a/include/sudo_conf.h +++ b/include/sudo_conf.h @@ -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) diff --git a/include/sudo_plugin.h b/include/sudo_plugin.h index 828b85079..52dee0adf 100644 --- a/include/sudo_plugin.h +++ b/include/sudo_plugin.h @@ -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); diff --git a/src/load_plugins.c b/src/load_plugins.c index d85e08910..45d63a129 100644 --- a/src/load_plugins.c +++ b/src/load_plugins.c @@ -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); } diff --git a/src/sudo.c b/src/sudo.c index d075566ea..6f5d7a7a1 100644 --- a/src/sudo.c +++ b/src/sudo.c @@ -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); } diff --git a/src/sudo_plugin_int.h b/src/sudo_plugin_int.h index 62fe31d02..aff2344fb 100644 --- a/src/sudo_plugin_int.h +++ b/src/sudo_plugin_int.h @@ -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;