the config file.
configuration file, _\b/_\be_\bt_\bc_\b/_\bc_\bv_\bt_\bs_\bu_\bd_\bo_\be_\br_\bs_\b._\bc_\bo_\bn_\bf by default. The following
keywords are recognized:
+ d\bde\bef\bfa\bau\bul\blt\bts\bs =\b= _\bd_\be_\bf_\bt_\by_\bp_\be_\bs
+ See the description of the -\b-d\bd command line option.
+
e\bex\bxp\bpa\ban\bnd\bd_\b_a\bal\bli\bia\bas\bse\bes\bs =\b= _\by_\be_\bs | _\bn_\bo
See the description of the -\b-e\be command line option.
s\bsu\bud\bdo\boe\ber\brs\bs_\b_b\bba\bas\bse\be =\b= _\bd_\bn
See the description of the -\b-b\bb command line option.
+ s\bsu\bup\bpp\bpr\bre\bes\bss\bs =\b= _\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs
+ See the description of the -\b-s\bs command line option.
+
Options on the command line will override values from the configuration
file.
file distributed with s\bsu\bud\bdo\bo or https://www.sudo.ws/license.html for
complete details.
-Sudo 1.8.23 March 28, 2018 Sudo 1.8.23
+Sudo 1.8.23 March 30, 2018 Sudo 1.8.23
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.TH "CVTSUDOERS" "1" "March 28, 2018" "Sudo @PACKAGE_VERSION@" "General Commands Manual"
+.TH "CVTSUDOERS" "1" "March 30, 2018" "Sudo @PACKAGE_VERSION@" "General Commands Manual"
.nh
.if n .ad l
.SH "NAME"
by default.
The following keywords are recognized:
.TP 6n
+\fBdefaults =\fR \fIdeftypes\fR
+See the description of the
+\fB\-d\fR
+command line option.
+.TP 6n
\fBexpand_aliases =\fR \fIyes\fR | \fIno\fR
See the description of the
\fB\-e\fR
See the description of the
\fB\-b\fR
command line option.
+.TP 6n
+\fBsuppress =\fR \fIsections\fR
+See the description of the
+\fB\-s\fR
+command line option.
.PP
Options on the command line will override values from the
configuration file.
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd March 28, 2018
+.Dd March 30, 2018
.Dt CVTSUDOERS 1
.Os Sudo @PACKAGE_VERSION@
.Sh NAME
by default.
The following keywords are recognized:
.Bl -tag -width 4n
+.It Sy defaults = Ar deftypes
+See the description of the
+.Fl d
+command line option.
.It Sy expand_aliases = Ar yes | no
See the description of the
.Fl e
See the description of the
.Fl b
command line option.
+.It Sy suppress = Ar sections
+See the description of the
+.Fl s
+command line option.
.El
.Pp
Options on the command line will override values from the
/* handled above */
break;
case 'd':
- conf->defaults = cvtsudoers_parse_defaults(optarg);
- if (conf->defaults == -1)
- usage(1);
+ conf->defstr = optarg;
break;
case 'e':
conf->expand_aliases = true;
}
break;
case 's':
- conf->suppress = cvtsudoers_parse_suppression(optarg);
- if (conf->suppress == -1)
- usage(1);
+ conf->supstr = optarg;
break;
case 'V':
(void) printf(_("%s version %s\n"), getprogname(),
if (!cvtsudoers_parse_filter(conf->filter))
usage(1);
}
+ if (conf->defstr != NULL) {
+ conf->defaults = cvtsudoers_parse_defaults(conf->defstr);
+ if (conf->defaults == -1)
+ usage(1);
+ }
+ if (conf->supstr != NULL) {
+ conf->suppress = cvtsudoers_parse_suppression(conf->supstr);
+ if (conf->suppress == -1)
+ usage(1);
+ }
/* If no base DN specified, check SUDOERS_BASE. */
if (conf->sudoers_base == NULL) {
{ "input_format", CONF_STR, &cvtsudoers_config.input_format },
{ "output_format", CONF_STR, &cvtsudoers_config.output_format },
{ "match", CONF_STR, &cvtsudoers_config.filter },
+ { "defaults", CONF_STR, &cvtsudoers_config.defstr },
+ { "suppress", CONF_STR, &cvtsudoers_config.supstr },
{ "expand_aliases", CONF_BOOL, &cvtsudoers_config.expand_aliases }
};
/* cvtsudoers.conf settings */
struct cvtsudoers_config {
- char *sudoers_base;
- char *input_format;
- char *output_format;
- char *filter;
unsigned int sudo_order;
unsigned int order_increment;
short defaults;
short suppress;
bool expand_aliases;
bool store_options;
+ char *sudoers_base;
+ char *input_format;
+ char *output_format;
+ char *filter;
+ char *defstr;
+ char *supstr;
};
/* Initial config settings for above. */
-#define INITIAL_CONFIG { NULL, NULL, NULL, NULL, 1, 1, CVT_DEFAULTS_ALL, 0, false, true }
+#define INITIAL_CONFIG { 1, 1, CVT_DEFAULTS_ALL, 0, false, true }
#define CONF_BOOL 0
#define CONF_UINT 1