2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 09:57:41 +00:00

Add group_file, match_local, and passwd_file to cvtsudoers.conf.

Previously, these were only settable via command line options.
This commit is contained in:
Todd C. Miller 2021-12-16 15:42:06 -07:00
parent 537f75dc74
commit 991ef32508
4 changed files with 37 additions and 4 deletions

View File

@ -16,7 +16,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.TH "CVTSUDOERS" "1" "November 23, 2021" "Sudo @PACKAGE_VERSION@" "General Commands Manual"
.TH "CVTSUDOERS" "1" "December 16, 2021" "Sudo @PACKAGE_VERSION@" "General Commands Manual"
.nh
.if n .ad l
.SH "NAME"
@ -460,6 +460,11 @@ See the description of the
\fB\-e\fR
command line option.
.TP 6n
\fBgroup_file =\fR \fIfile\fR
See the description of the
\fB\--group-file\fR
command line option.
.TP 6n
\fBinput_format =\fR \fIldif\fR | \fIsudoers\fR
See the description of the
\fB\-i\fR
@ -470,6 +475,11 @@ See the description of the
\fB\-m\fR
command line option.
.TP 6n
\fBmatch_local =\fR \fIyes\fR | \fIno\fR
See the description of the
\fB\-M\fR
command line option.
.TP 6n
\fBorder_increment =\fR \fIincrement\fR
See the description of the
\fB\-I\fR
@ -490,6 +500,11 @@ See the description of the
\fB\-P\fR
command line option.
.TP 6n
\fBpasswd_file =\fR \fIfile\fR
See the description of the
\fB\--passwd-file\fR
command line option.
.TP 6n
\fBprune_matches =\fR \fIyes\fR | \fIno\fR
See the description of the
\fB\-p\fR

View File

@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd November 23, 2021
.Dd December 16, 2021
.Dt CVTSUDOERS 1
.Os Sudo @PACKAGE_VERSION@
.Sh NAME
@ -402,6 +402,10 @@ command line option.
See the description of the
.Fl e
command line option.
.It Sy group_file = Ar file
See the description of the
.Fl -group-file
command line option.
.It Sy input_format = Ar ldif | sudoers
See the description of the
.Fl i
@ -410,6 +414,10 @@ command line option.
See the description of the
.Fl m
command line option.
.It Sy match_local = Ar yes | no
See the description of the
.Fl M
command line option.
.It Sy order_increment = Ar increment
See the description of the
.Fl I
@ -426,6 +434,10 @@ command line option.
See the description of the
.Fl P
command line option.
.It Sy passwd_file = Ar file
See the description of the
.Fl -passwd-file
command line option.
.It Sy prune_matches = Ar yes | no
See the description of the
.Fl p

View File

@ -488,9 +488,12 @@ static struct cvtsudoers_conf_table cvtsudoers_conf_vars[] = {
{ "input_format", CONF_STR, &cvtsudoers_config.input_format },
{ "output_format", CONF_STR, &cvtsudoers_config.output_format },
{ "match", CONF_STR, &cvtsudoers_config.filter },
{ "match_local", CONF_BOOL, &cvtsudoers_config.match_local },
{ "logfile", CONF_STR, &cvtsudoers_config.logfile },
{ "defaults", CONF_STR, &cvtsudoers_config.defstr },
{ "suppress", CONF_STR, &cvtsudoers_config.supstr },
{ "group_file", CONF_STR, &cvtsudoers_config.group_file },
{ "passwd_file", CONF_STR, &cvtsudoers_config.passwd_file },
{ "expand_aliases", CONF_BOOL, &cvtsudoers_config.expand_aliases },
{ "prune_matches", CONF_BOOL, &cvtsudoers_config.prune_matches }
};

View File

@ -50,9 +50,10 @@ struct cvtsudoers_config {
unsigned int order_max;
short defaults;
short suppress;
bool expand_aliases;
bool store_options;
bool expand_aliases;
bool prune_matches;
bool match_local;
char *sudoers_base;
char *input_format;
char *output_format;
@ -60,10 +61,12 @@ struct cvtsudoers_config {
char *logfile;
char *defstr;
char *supstr;
char *group_file;
char *passwd_file;
};
/* Initial config settings for above. */
#define INITIAL_CONFIG { 1, 1, 0, 0, CVT_DEFAULTS_ALL, 0, false, true, false }
#define INITIAL_CONFIG { 1, 1, 0, 0, CVT_DEFAULTS_ALL, 0, true }
#define CONF_BOOL 0
#define CONF_UINT 1