2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 01:49:11 +00:00

White space is not allowed between Defaults and '@', ':', '!', '>'.

The EBNF made it appear that this is allowed when it really is not.
This commit is contained in:
Todd C. Miller 2023-03-28 16:02:46 -06:00
parent f0030cf30f
commit 3b55de4e83
2 changed files with 68 additions and 20 deletions

View File

@ -25,7 +25,7 @@
.nr BA @BAMAN@
.nr LC @LCMAN@
.nr PS @PSMAN@
.TH "SUDOERS" "@mansectform@" "January 16, 2023" "Sudo @PACKAGE_VERSION@" "File Formats Manual"
.TH "SUDOERS" "@mansectform@" "March 28, 2023" "Sudo @PACKAGE_VERSION@" "File Formats Manual"
.nh
.if n .ad l
.SH "NAME"
@ -1219,21 +1219,45 @@ Certain configuration options may be changed from their default
values at run-time via one or more
\fIDefault_Entry\fR
lines.
These may affect all users on any host, all users on a specific host, a
specific user, a specific command, or commands being run as a specific user.
These may affect all users on any host
(\(oqDefaults\(cq),
all users on a specific host
(\(oqDefaults@host\(cq),
a specific user
(\(oqDefaults:user\(cq),
a specific command
(\(oqDefaults!cmnd\(cq),
or commands being run as a specific user
(\(oqDefaults>runasuser\(cq).
.PP
White space is not permitted between
\(oqDefaults\(cq
and the
\(oq@\(cq,
\(oq\&:\(cq,
\(oq\&!\(cq,
or
\(oq>\(cq
characters.
While a comma-separated list may be used in place of a single value after the
\(oq@\(cq,
\(oq\&:\(cq,
\(oq\&!\(cq,
or
\(oq>\(cq
character, using an alias instead of a list is often improve readability.
Per-command entries may not include command line arguments.
If you need to specify arguments, define a
\fICmnd_Alias\fR
and reference
that instead.
and reference that instead.
.nf
.sp
.RS 0n
Default_Type ::= 'Defaults' |
'Defaults' '@' Host_List |
'Defaults' ':' User_List |
'Defaults' '!' Cmnd_List |
'Defaults' '>' Runas_List
'Defaults@' Host_List |
'Defaults:' User_List |
'Defaults!' Cmnd_List |
'Defaults>' Runas_List
Default_Entry ::= Default_Type Parameter_List
@ -1379,7 +1403,7 @@ A fully-specified
consists of two
\fIRunas_List\fRs
(as defined above) separated by a colon
(\(oq:\&\(cq)
(\(oq\&:\(cq)
and enclosed in a set of parentheses.
The first
\fIRunas_List\fR

View File

@ -25,7 +25,7 @@
.nr BA @BAMAN@
.nr LC @LCMAN@
.nr PS @PSMAN@
.Dd January 16, 2023
.Dd March 28, 2023
.Dt SUDOERS @mansectform@
.Os Sudo @PACKAGE_VERSION@
.Sh NAME
@ -1169,19 +1169,43 @@ Certain configuration options may be changed from their default
values at run-time via one or more
.Em Default_Entry
lines.
These may affect all users on any host, all users on a specific host, a
specific user, a specific command, or commands being run as a specific user.
These may affect all users on any host
.Pq Sq Defaults ,
all users on a specific host
.Pq Sq Defaults@host ,
a specific user
.Pq Sq Defaults:user ,
a specific command
.Pq Sq Defaults!cmnd ,
or commands being run as a specific user
.Pq Sq Defaults>runasuser .
.Pp
White space is not permitted between
.Sq Defaults
and the
.Ql @ ,
.Ql \&: ,
.Ql \&! ,
or
.Ql >
characters.
While a comma-separated list may be used in place of a single value after the
.Ql @ ,
.Ql \&: ,
.Ql \&! ,
or
.Ql >
character, using an alias instead of a list is often improve readability.
Per-command entries may not include command line arguments.
If you need to specify arguments, define a
.Em Cmnd_Alias
and reference
that instead.
and reference that instead.
.Bd -literal
Default_Type ::= 'Defaults' |
'Defaults' '@' Host_List |
'Defaults' ':' User_List |
'Defaults' '!' Cmnd_List |
'Defaults' '>' Runas_List
'Defaults@' Host_List |
'Defaults:' User_List |
'Defaults!' Cmnd_List |
'Defaults>' Runas_List
Default_Entry ::= Default_Type Parameter_List
@ -1332,7 +1356,7 @@ A fully-specified
consists of two
.Em Runas_List Ns s
(as defined above) separated by a colon
.Pq Ql :\&
.Pq Ql \&:
and enclosed in a set of parentheses.
The first
.Em Runas_List