Document double escaping of backslashes. Bug #961.
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
.nr BA @BAMAN@
|
||||
.nr LC @LCMAN@
|
||||
.nr PS @PSMAN@
|
||||
.TH "SUDOERS" "@mansectform@" "February 16, 2020" "Sudo @PACKAGE_VERSION@" "File Formats Manual"
|
||||
.TH "SUDOERS" "@mansectform@" "March 3, 2020" "Sudo @PACKAGE_VERSION@" "File Formats Manual"
|
||||
.nh
|
||||
.if n .ad l
|
||||
.SH "NAME"
|
||||
@@ -1111,6 +1111,21 @@ when they contain multiple words.
|
||||
Special characters may be escaped with a backslash
|
||||
(\(oq\e\(cq).
|
||||
.PP
|
||||
To include a literal backslash character in a command line argument
|
||||
you must escape the backslash twice.
|
||||
For example, to match
|
||||
\(oq\en\(cq
|
||||
as part of a command line argument, you must use
|
||||
\(oq\e\e\e\en\(cq
|
||||
in the
|
||||
\fIsudoers\fR
|
||||
file.
|
||||
This is due to there being two levels of escaping, one in the
|
||||
\fIsudoers\fR
|
||||
parser itself and another when command line arguments are matched by the
|
||||
fnmatch(3)
|
||||
function.
|
||||
.PP
|
||||
Lists have two additional assignment operators,
|
||||
\fR+=\fR
|
||||
and
|
||||
|
@@ -24,7 +24,7 @@
|
||||
.nr BA @BAMAN@
|
||||
.nr LC @LCMAN@
|
||||
.nr PS @PSMAN@
|
||||
.Dd February 16, 2020
|
||||
.Dd March 3, 2020
|
||||
.Dt SUDOERS @mansectform@
|
||||
.Os Sudo @PACKAGE_VERSION@
|
||||
.Sh NAME
|
||||
@@ -1065,6 +1065,21 @@ when they contain multiple words.
|
||||
Special characters may be escaped with a backslash
|
||||
.Pq Ql \e .
|
||||
.Pp
|
||||
To include a literal backslash character in a command line argument
|
||||
you must escape the backslash twice.
|
||||
For example, to match
|
||||
.Ql \en
|
||||
as part of a command line argument, you must use
|
||||
.Ql \e\e\e\en
|
||||
in the
|
||||
.Em sudoers
|
||||
file.
|
||||
This is due to there being two levels of escaping, one in the
|
||||
.Em sudoers
|
||||
parser itself and another when command line arguments are matched by the
|
||||
.Xr fnmatch 3
|
||||
function.
|
||||
.Pp
|
||||
Lists have two additional assignment operators,
|
||||
.Li +=
|
||||
and
|
||||
|
Reference in New Issue
Block a user