Use a 4n indent for code blocks instead of the default 6n.

This commit is contained in:
Todd C. Miller
2022-02-10 13:05:34 -07:00
parent 4e3a48f2d1
commit 7b5f0dfaf7
16 changed files with 154 additions and 154 deletions

View File

@@ -16,7 +16,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\" .\"
.TH "CVTSUDOERS" "1" "January 19, 2022" "Sudo @PACKAGE_VERSION@" "General Commands Manual" .TH "CVTSUDOERS" "1" "February 10, 2022" "Sudo @PACKAGE_VERSION@" "General Commands Manual"
.nh .nh
.if n .ad l .if n .ad l
.SH "NAME" .SH "NAME"
@@ -537,7 +537,7 @@ of my-domain,dc=com, storing the result in
\fIsudoers.ldif\fR: \fIsudoers.ldif\fR:
.nf .nf
.sp .sp
.RS 6n .RS 4n
$ cvtsudoers -b ou=SUDOers,dc=my-domain,dc=com -o sudoers.ldif \e $ cvtsudoers -b ou=SUDOers,dc=my-domain,dc=com -o sudoers.ldif \e
/etc/sudoers /etc/sudoers
.RE .RE
@@ -549,7 +549,7 @@ to JSON format, storing the result in
\fIsudoers.json\fR: \fIsudoers.json\fR:
.nf .nf
.sp .sp
.RS 6n .RS 4n
$ cvtsudoers -f json -o sudoers.json /etc/sudoers $ cvtsudoers -f json -o sudoers.json /etc/sudoers
.RE .RE
.fi .fi
@@ -562,7 +562,7 @@ on host
\fIhastur\fR: \fIhastur\fR:
.nf .nf
.sp .sp
.RS 6n .RS 4n
$ cvtsudoers -f sudoers -m user=ambrose,host=hastur /etc/sudoers $ cvtsudoers -f sudoers -m user=ambrose,host=hastur /etc/sudoers
.RE .RE
.fi .fi
@@ -571,7 +571,7 @@ Same as above, but expand aliases and prune out any non-matching
users and hosts from the expanded entries. users and hosts from the expanded entries.
.nf .nf
.sp .sp
.RS 6n .RS 4n
$ cvtsudoers -ep -f sudoers -m user=ambrose,host=hastur /etc/sudoers $ cvtsudoers -ep -f sudoers -m user=ambrose,host=hastur /etc/sudoers
.RE .RE
.fi .fi
@@ -583,7 +583,7 @@ from LDIF to traditional
format: format:
.nf .nf
.sp .sp
.RS 6n .RS 4n
$ cvtsudoers -i ldif -f sudoers -o sudoers.new sudoers.ldif $ cvtsudoers -i ldif -f sudoers -o sudoers.new sudoers.ldif
.RE .RE
.fi .fi
@@ -596,7 +596,7 @@ and
\(lqplugh\(rq: \(lqplugh\(rq:
.nf .nf
.sp .sp
.RS 6n .RS 4n
$ cvtsudoers -f sudoers -o sudoers.merged sudoers \e $ cvtsudoers -f sudoers -o sudoers.merged sudoers \e
xyzzy:sudoers.xyzzy plugh:sudoers.plugh xyzzy:sudoers.xyzzy plugh:sudoers.plugh
.RE .RE

View File

@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\" .\"
.Dd January 19, 2022 .Dd February 10, 2022
.Dt CVTSUDOERS 1 .Dt CVTSUDOERS 1
.Os Sudo @PACKAGE_VERSION@ .Os Sudo @PACKAGE_VERSION@
.Sh NAME .Sh NAME
@@ -468,7 +468,7 @@ file uses a
.Em sudoers_base .Em sudoers_base
of my-domain,dc=com, storing the result in of my-domain,dc=com, storing the result in
.Pa sudoers.ldif : .Pa sudoers.ldif :
.Bd -literal -offset indent .Bd -literal -offset 4n
$ cvtsudoers -b ou=SUDOers,dc=my-domain,dc=com -o sudoers.ldif \e $ cvtsudoers -b ou=SUDOers,dc=my-domain,dc=com -o sudoers.ldif \e
/etc/sudoers /etc/sudoers
.Ed .Ed
@@ -477,7 +477,7 @@ Convert
.Pa /etc/sudoers .Pa /etc/sudoers
to JSON format, storing the result in to JSON format, storing the result in
.Pa sudoers.json : .Pa sudoers.json :
.Bd -literal -offset indent .Bd -literal -offset 4n
$ cvtsudoers -f json -o sudoers.json /etc/sudoers $ cvtsudoers -f json -o sudoers.json /etc/sudoers
.Ed .Ed
.Pp .Pp
@@ -487,13 +487,13 @@ and display only rules that match user
.Em ambrose .Em ambrose
on host on host
.Em hastur : .Em hastur :
.Bd -literal -offset indent .Bd -literal -offset 4n
$ cvtsudoers -f sudoers -m user=ambrose,host=hastur /etc/sudoers $ cvtsudoers -f sudoers -m user=ambrose,host=hastur /etc/sudoers
.Ed .Ed
.Pp .Pp
Same as above, but expand aliases and prune out any non-matching Same as above, but expand aliases and prune out any non-matching
users and hosts from the expanded entries. users and hosts from the expanded entries.
.Bd -literal -offset indent .Bd -literal -offset 4n
$ cvtsudoers -ep -f sudoers -m user=ambrose,host=hastur /etc/sudoers $ cvtsudoers -ep -f sudoers -m user=ambrose,host=hastur /etc/sudoers
.Ed .Ed
.Pp .Pp
@@ -502,7 +502,7 @@ Convert
from LDIF to traditional from LDIF to traditional
.Em sudoers .Em sudoers
format: format:
.Bd -literal -offset indent .Bd -literal -offset 4n
$ cvtsudoers -i ldif -f sudoers -o sudoers.new sudoers.ldif $ cvtsudoers -i ldif -f sudoers -o sudoers.new sudoers.ldif
.Ed .Ed
.Pp .Pp
@@ -512,7 +512,7 @@ file with two host-specific policy files from the hosts
.Dq xyzzy .Dq xyzzy
and and
.Dq plugh : .Dq plugh :
.Bd -literal -offset indent .Bd -literal -offset 4n
$ cvtsudoers -f sudoers -o sudoers.merged sudoers \e $ cvtsudoers -f sudoers -o sudoers.merged sudoers \e
xyzzy:sudoers.xyzzy plugh:sudoers.plugh xyzzy:sudoers.xyzzy plugh:sudoers.plugh
.Ed .Ed

View File

@@ -17,7 +17,7 @@
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\" .\"
.nr SL @SEMAN@ .nr SL @SEMAN@
.TH "SUDO.CONF" "@mansectform@" "January 20, 2022" "Sudo @PACKAGE_VERSION@" "File Formats Manual" .TH "SUDO.CONF" "@mansectform@" "February 10, 2022" "Sudo @PACKAGE_VERSION@" "File Formats Manual"
.nh .nh
.if n .ad l .if n .ad l
.SH "NAME" .SH "NAME"
@@ -126,7 +126,7 @@ setting, which defaults to
In other words: In other words:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Plugin sudoers_policy sudoers.so Plugin sudoers_policy sudoers.so
.RE .RE
.fi .fi
@@ -134,7 +134,7 @@ Plugin sudoers_policy sudoers.so
is equivalent to: is equivalent to:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Plugin sudoers_policy @plugindir@/sudoers.so Plugin sudoers_policy @plugindir@/sudoers.so
.RE .RE
.fi .fi
@@ -148,7 +148,7 @@ as it does not actually exist in the file system.
For example: For example:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Plugin sudoers_policy sudoers.so Plugin sudoers_policy sudoers.so
.RE .RE
.fi .fi
@@ -163,7 +163,7 @@ function.
For example, to override the compile-time default sudoers file mode: For example, to override the compile-time default sudoers file mode:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Plugin sudoers_policy sudoers.so sudoers_mode=0440 Plugin sudoers_policy sudoers.so sudoers_mode=0440
.RE .RE
.fi .fi
@@ -190,7 +190,7 @@ plugin will be used as the default security policy, for I/O logging
This is equivalent to the following: This is equivalent to the following:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Plugin sudoers_policy sudoers.so Plugin sudoers_policy sudoers.so
Plugin sudoers_io sudoers.so Plugin sudoers_io sudoers.so
Plugin sudoers_audit sudoers.so Plugin sudoers_audit sudoers.so
@@ -228,7 +228,7 @@ keyword, followed by the name of the path to set and its value.
For example: For example:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Path intercept @intercept_file@ Path intercept @intercept_file@
Path noexec @noexec_file@ Path noexec @noexec_file@
Path askpass /usr/X11R6/bin/ssh-askpass Path askpass /usr/X11R6/bin/ssh-askpass
@@ -373,7 +373,7 @@ to false in
as follows: as follows:
.nf .nf
.sp .sp
.RS 16n .RS 14n
Set disable_coredump false Set disable_coredump false
.RE .RE
.fi .fi
@@ -416,7 +416,7 @@ option to true in
as follows: as follows:
.nf .nf
.sp .sp
.RS 16n .RS 14n
Set developer_mode true Set developer_mode true
.RE .RE
.fi .fi
@@ -510,7 +510,7 @@ For example, to cause
to only use the kernel's static list of groups for the user: to only use the kernel's static list of groups for the user:
.nf .nf
.sp .sp
.RS 16n .RS 14n
Set group_source static Set group_source static
.RE .RE
.fi .fi
@@ -551,7 +551,7 @@ If IP-based matching is not required, network interface probing
can be disabled as follows: can be disabled as follows:
.nf .nf
.sp .sp
.RS 16n .RS 14n
Set probe_interfaces false Set probe_interfaces false
.RE .RE
.fi .fi
@@ -587,7 +587,7 @@ as it does not include a comma
Examples: Examples:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Debug sudo /var/log/sudo_debug all@warn,plugin@info Debug sudo /var/log/sudo_debug all@warn,plugin@info
.RE .RE
.fi .fi
@@ -599,7 +599,7 @@ level and higher in addition to those at the
level for the plugin subsystem. level for the plugin subsystem.
.nf .nf
.sp .sp
.RS 6n .RS 4n
Debug sudo_intercept.so /var/log/intercept_debug all@debug Debug sudo_intercept.so /var/log/intercept_debug all@debug
.RE .RE
.fi .fi
@@ -659,7 +659,7 @@ For example, the following trace is for the
function located in src/sudo.c: function located in src/sudo.c:
.nf .nf
.sp .sp
.RS 6n .RS 4n
sudo[123] -> get_user_groups @ src/sudo.c:385 sudo[123] -> get_user_groups @ src/sudo.c:385
sudo[123] <- get_user_groups @ src/sudo.c:429 := groups=10,0,5 sudo[123] <- get_user_groups @ src/sudo.c:429 := groups=10,0,5
.RE .RE

View File

@@ -16,7 +16,7 @@
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\" .\"
.nr SL @SEMAN@ .nr SL @SEMAN@
.Dd January 20, 2022 .Dd February 10, 2022
.Dt SUDO.CONF @mansectform@ .Dt SUDO.CONF @mansectform@
.Os Sudo @PACKAGE_VERSION@ .Os Sudo @PACKAGE_VERSION@
.Sh NAME .Sh NAME
@@ -121,12 +121,12 @@ specified by the
setting, which defaults to setting, which defaults to
.Pa @plugindir@ . .Pa @plugindir@ .
In other words: In other words:
.Bd -literal -offset indent .Bd -literal -offset 4n
Plugin sudoers_policy sudoers.so Plugin sudoers_policy sudoers.so
.Ed .Ed
.Pp .Pp
is equivalent to: is equivalent to:
.Bd -literal -offset indent .Bd -literal -offset 4n
Plugin sudoers_policy @plugindir@/sudoers.so Plugin sudoers_policy @plugindir@/sudoers.so
.Ed .Ed
.Pp .Pp
@@ -137,7 +137,7 @@ binary instead of being installed as a dynamic shared object, the
should be specified without a leading directory, should be specified without a leading directory,
as it does not actually exist in the file system. as it does not actually exist in the file system.
For example: For example:
.Bd -literal -offset indent .Bd -literal -offset 4n
Plugin sudoers_policy sudoers.so Plugin sudoers_policy sudoers.so
.Ed .Ed
.Pp .Pp
@@ -149,7 +149,7 @@ are passed as arguments to the plugin's
.Em open .Em open
function. function.
For example, to override the compile-time default sudoers file mode: For example, to override the compile-time default sudoers file mode:
.Bd -literal -offset indent .Bd -literal -offset 4n
Plugin sudoers_policy sudoers.so sudoers_mode=0440 Plugin sudoers_policy sudoers.so sudoers_mode=0440
.Ed .Ed
.Pp .Pp
@@ -173,7 +173,7 @@ lines, the
plugin will be used as the default security policy, for I/O logging plugin will be used as the default security policy, for I/O logging
(if enabled by the policy), and for auditing. (if enabled by the policy), and for auditing.
This is equivalent to the following: This is equivalent to the following:
.Bd -literal -offset indent .Bd -literal -offset 4n
Plugin sudoers_policy sudoers.so Plugin sudoers_policy sudoers.so
Plugin sudoers_io sudoers.so Plugin sudoers_io sudoers.so
Plugin sudoers_audit sudoers.so Plugin sudoers_audit sudoers.so
@@ -208,7 +208,7 @@ line consists of the
.Li Path .Li Path
keyword, followed by the name of the path to set and its value. keyword, followed by the name of the path to set and its value.
For example: For example:
.Bd -literal -offset indent .Bd -literal -offset 4n
Path intercept @intercept_file@ Path intercept @intercept_file@
Path noexec @noexec_file@ Path noexec @noexec_file@
Path askpass /usr/X11R6/bin/ssh-askpass Path askpass /usr/X11R6/bin/ssh-askpass
@@ -344,7 +344,7 @@ crashes, you may wish to re-enable core dumps by setting
to false in to false in
.Nm .Nm
as follows: as follows:
.Bd -literal -offset indent .Bd -literal -offset 4n
Set disable_coredump false Set disable_coredump false
.Ed .Ed
.Pp .Pp
@@ -384,7 +384,7 @@ To make development of a plugin easier, you can disable that by setting
option to true in option to true in
.Nm sudo.conf .Nm sudo.conf
as follows: as follows:
.Bd -literal -offset indent .Bd -literal -offset 4n
Set developer_mode true Set developer_mode true
.Ed .Ed
.Pp .Pp
@@ -468,7 +468,7 @@ This is the default behavior on systems other than macOS in
For example, to cause For example, to cause
.Nm sudo .Nm sudo
to only use the kernel's static list of groups for the user: to only use the kernel's static list of groups for the user:
.Bd -literal -offset indent .Bd -literal -offset 4n
Set group_source static Set group_source static
.Ed .Ed
.Pp .Pp
@@ -503,7 +503,7 @@ On Linux systems with a large number of virtual interfaces, this may
take a non-negligible amount of time. take a non-negligible amount of time.
If IP-based matching is not required, network interface probing If IP-based matching is not required, network interface probing
can be disabled as follows: can be disabled as follows:
.Bd -literal -offset indent .Bd -literal -offset 4n
Set probe_interfaces false Set probe_interfaces false
.Ed .Ed
.Pp .Pp
@@ -535,7 +535,7 @@ as it does not include a comma
.Pq Ql \&, . .Pq Ql \&, .
.Pp .Pp
Examples: Examples:
.Bd -literal -offset indent .Bd -literal -offset 4n
Debug sudo /var/log/sudo_debug all@warn,plugin@info Debug sudo /var/log/sudo_debug all@warn,plugin@info
.Ed .Ed
.Pp .Pp
@@ -544,7 +544,7 @@ would log all debugging statements at the
level and higher in addition to those at the level and higher in addition to those at the
.Em info .Em info
level for the plugin subsystem. level for the plugin subsystem.
.Bd -literal -offset indent .Bd -literal -offset 4n
Debug sudo_intercept.so /var/log/intercept_debug all@debug Debug sudo_intercept.so /var/log/intercept_debug all@debug
.Ed .Ed
.Pp .Pp
@@ -601,7 +601,7 @@ entered and when it returns.
For example, the following trace is for the For example, the following trace is for the
.Fn get_user_groups .Fn get_user_groups
function located in src/sudo.c: function located in src/sudo.c:
.Bd -literal -offset indent .Bd -literal -offset 4n
sudo[123] -> get_user_groups @ src/sudo.c:385 sudo[123] -> get_user_groups @ src/sudo.c:385
sudo[123] <- get_user_groups @ src/sudo.c:429 := groups=10,0,5 sudo[123] <- get_user_groups @ src/sudo.c:429 := groups=10,0,5
.Ed .Ed

View File

@@ -25,7 +25,7 @@
.nr BA @BAMAN@ .nr BA @BAMAN@
.nr LC @LCMAN@ .nr LC @LCMAN@
.nr PS @PSMAN@ .nr PS @PSMAN@
.TH "SUDO" "@mansectsu@" "January 19, 2022" "Sudo @PACKAGE_VERSION@" "System Manager's Manual" .TH "SUDO" "@mansectsu@" "February 10, 2022" "Sudo @PACKAGE_VERSION@" "System Manager's Manual"
.nh .nh
.if n .ad l .if n .ad l
.SH "NAME" .SH "NAME"
@@ -1103,7 +1103,7 @@ sudo.conf(@mansectform@)
file as follows: file as follows:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Set disable_coredump false Set disable_coredump false
.RE .RE
.fi .fi
@@ -1248,7 +1248,7 @@ policy.
To get a file listing of an unreadable directory: To get a file listing of an unreadable directory:
.nf .nf
.sp .sp
.RS 6n .RS 4n
$ sudo ls /usr/local/protected $ sudo ls /usr/local/protected
.RE .RE
.fi .fi
@@ -1257,7 +1257,7 @@ To list the home directory of user yaz on a machine where the file
system holding ~yaz is not exported as root: system holding ~yaz is not exported as root:
.nf .nf
.sp .sp
.RS 6n .RS 4n
$ sudo -u yaz ls ~yaz $ sudo -u yaz ls ~yaz
.RE .RE
.fi .fi
@@ -1267,7 +1267,7 @@ To edit the
file as user www: file as user www:
.nf .nf
.sp .sp
.RS 6n .RS 4n
$ sudoedit -u www ~www/htdocs/index.html $ sudoedit -u www ~www/htdocs/index.html
.RE .RE
.fi .fi
@@ -1276,7 +1276,7 @@ To view system logs only accessible to root and users in the adm
group: group:
.nf .nf
.sp .sp
.RS 6n .RS 4n
$ sudo -g adm more /var/log/syslog $ sudo -g adm more /var/log/syslog
.RE .RE
.fi .fi
@@ -1284,7 +1284,7 @@ $ sudo -g adm more /var/log/syslog
To run an editor as jim with a different primary group: To run an editor as jim with a different primary group:
.nf .nf
.sp .sp
.RS 6n .RS 4n
$ sudoedit -u jim -g audio ~jim/sound.txt $ sudoedit -u jim -g audio ~jim/sound.txt
.RE .RE
.fi .fi
@@ -1292,7 +1292,7 @@ $ sudoedit -u jim -g audio ~jim/sound.txt
To shut down a machine: To shut down a machine:
.nf .nf
.sp .sp
.RS 6n .RS 4n
$ sudo shutdown -r +15 "quick reboot" $ sudo shutdown -r +15 "quick reboot"
.RE .RE
.fi .fi
@@ -1303,7 +1303,7 @@ Note that this runs the commands in a sub-shell to make the
and file redirection work. and file redirection work.
.nf .nf
.sp .sp
.RS 6n .RS 4n
$ sudo sh -c "cd /home ; du -s * | sort -rn > USAGE" $ sudo sh -c "cd /home ; du -s * | sort -rn > USAGE"
.RE .RE
.fi .fi
@@ -1488,7 +1488,7 @@ It is not meaningful to run the
command directly via sudo, e.g., command directly via sudo, e.g.,
.nf .nf
.sp .sp
.RS 6n .RS 4n
$ sudo cd /usr/local/protected $ sudo cd /usr/local/protected
.RE .RE
.fi .fi

View File

@@ -24,7 +24,7 @@
.nr BA @BAMAN@ .nr BA @BAMAN@
.nr LC @LCMAN@ .nr LC @LCMAN@
.nr PS @PSMAN@ .nr PS @PSMAN@
.Dd January 19, 2022 .Dd February 10, 2022
.Dt SUDO @mansectsu@ .Dt SUDO @mansectsu@
.Os Sudo @PACKAGE_VERSION@ .Os Sudo @PACKAGE_VERSION@
.Sh NAME .Sh NAME
@@ -1042,7 +1042,7 @@ crashes, you may wish to re-enable core dumps by setting
to false in the to false in the
.Xr sudo.conf @mansectform@ .Xr sudo.conf @mansectform@
file as follows: file as follows:
.Bd -literal -offset indent .Bd -literal -offset 4n
Set disable_coredump false Set disable_coredump false
.Ed .Ed
.Pp .Pp
@@ -1171,36 +1171,36 @@ Note: the following examples assume a properly configured security
policy. policy.
.Pp .Pp
To get a file listing of an unreadable directory: To get a file listing of an unreadable directory:
.Bd -literal -offset indent .Bd -literal -offset 4n
$ sudo ls /usr/local/protected $ sudo ls /usr/local/protected
.Ed .Ed
.Pp .Pp
To list the home directory of user yaz on a machine where the file To list the home directory of user yaz on a machine where the file
system holding ~yaz is not exported as root: system holding ~yaz is not exported as root:
.Bd -literal -offset indent .Bd -literal -offset 4n
$ sudo -u yaz ls ~yaz $ sudo -u yaz ls ~yaz
.Ed .Ed
.Pp .Pp
To edit the To edit the
.Pa index.html .Pa index.html
file as user www: file as user www:
.Bd -literal -offset indent .Bd -literal -offset 4n
$ sudoedit -u www ~www/htdocs/index.html $ sudoedit -u www ~www/htdocs/index.html
.Ed .Ed
.Pp .Pp
To view system logs only accessible to root and users in the adm To view system logs only accessible to root and users in the adm
group: group:
.Bd -literal -offset indent .Bd -literal -offset 4n
$ sudo -g adm more /var/log/syslog $ sudo -g adm more /var/log/syslog
.Ed .Ed
.Pp .Pp
To run an editor as jim with a different primary group: To run an editor as jim with a different primary group:
.Bd -literal -offset indent .Bd -literal -offset 4n
$ sudoedit -u jim -g audio ~jim/sound.txt $ sudoedit -u jim -g audio ~jim/sound.txt
.Ed .Ed
.Pp .Pp
To shut down a machine: To shut down a machine:
.Bd -literal -offset indent .Bd -literal -offset 4n
$ sudo shutdown -r +15 "quick reboot" $ sudo shutdown -r +15 "quick reboot"
.Ed .Ed
.Pp .Pp
@@ -1208,7 +1208,7 @@ To make a usage listing of the directories in the /home partition.
Note that this runs the commands in a sub-shell to make the Note that this runs the commands in a sub-shell to make the
.Li cd .Li cd
and file redirection work. and file redirection work.
.Bd -literal -offset indent .Bd -literal -offset 4n
$ sudo sh -c "cd /home ; du -s * | sort -rn > USAGE" $ sudo sh -c "cd /home ; du -s * | sort -rn > USAGE"
.Ed .Ed
.Sh DIAGNOSTICS .Sh DIAGNOSTICS
@@ -1376,7 +1376,7 @@ functionality.
It is not meaningful to run the It is not meaningful to run the
.Li cd .Li cd
command directly via sudo, e.g., command directly via sudo, e.g.,
.Bd -literal -offset indent .Bd -literal -offset 4n
$ sudo cd /usr/local/protected $ sudo cd /usr/local/protected
.Ed .Ed
.Pp .Pp

View File

@@ -2,7 +2,7 @@
.\" .\"
.\" SPDX-License-Identifier: ISC .\" SPDX-License-Identifier: ISC
.\" .\"
.\" Copyright (c) 2019-2021 Todd C. Miller <Todd.Miller@sudo.ws> .\" Copyright (c) 2019-2022 Todd C. Miller <Todd.Miller@sudo.ws>
.\" .\"
.\" Permission to use, copy, modify, and distribute this software for any .\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above .\" purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +16,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\" .\"
.TH "SUDO_LOGSRVD" "@mansectsu@" "September 17, 2021" "Sudo @PACKAGE_VERSION@" "System Manager's Manual" .TH "SUDO_LOGSRVD" "@mansectsu@" "February 10, 2022" "Sudo @PACKAGE_VERSION@" "System Manager's Manual"
.nh .nh
.if n .ad l .if n .ad l
.SH "NAME" .SH "NAME"
@@ -171,7 +171,7 @@ We'll create a new directory hierarchy in
for this purpose. for this purpose.
.nf .nf
.sp .sp
.RS 6n .RS 4n
# mkdir /etc/ssl/sudo # mkdir /etc/ssl/sudo
# cd /etc/ssl/sudo # cd /etc/ssl/sudo
# mkdir certs csr newcerts private # mkdir certs csr newcerts private
@@ -192,7 +192,7 @@ You will need to adjust the example below if it has a different location on
your system. your system.
.nf .nf
.sp .sp
.RS 6n .RS 4n
# cp /etc/ssl/openssl.cnf . # cp /etc/ssl/openssl.cnf .
.RE .RE
.fi .fi
@@ -207,7 +207,7 @@ sections.
Those sections should include the following settings: Those sections should include the following settings:
.nf .nf
.sp .sp
.RS 6n .RS 4n
[ ca ] [ ca ]
default_ca = CA_default default_ca = CA_default
@@ -233,7 +233,7 @@ a private key and a certificate for the root of the CA.
First, create the private key and protect it with a pass phrase: First, create the private key and protect it with a pass phrase:
.nf .nf
.sp .sp
.RS 6n .RS 4n
# openssl genrsa -aes256 -out private/cakey.pem 4096 # openssl genrsa -aes256 -out private/cakey.pem 4096
# chmod 400 private/cakey.pem # chmod 400 private/cakey.pem
.RE .RE
@@ -243,7 +243,7 @@ Next, generate the root certificate, using appropriate values for
the site-specific fields: the site-specific fields:
.nf .nf
.sp .sp
.RS 6n .RS 4n
# openssl req -config openssl.cnf -key private/cakey.pem \e # openssl req -config openssl.cnf -key private/cakey.pem \e
-new -x509 -days 7300 -sha256 -extensions v3_ca \e -new -x509 -days 7300 -sha256 -extensions v3_ca \e
-out cacert.pem -out cacert.pem
@@ -272,7 +272,7 @@ Email Address []:
Finally, verify the root certificate: Finally, verify the root certificate:
.nf .nf
.sp .sp
.RS 6n .RS 4n
# openssl x509 -noout -text -in cacert.pem # openssl x509 -noout -text -in cacert.pem
.RE .RE
.fi .fi
@@ -290,7 +290,7 @@ CSRs with the root CA.
First, generate the private key without a pass phrase. First, generate the private key without a pass phrase.
.nf .nf
.sp .sp
.RS 6n .RS 4n
# openssl genrsa -out private/logsrvd_key.pem 2048 # openssl genrsa -out private/logsrvd_key.pem 2048
# chmod 400 private/logsrvd_key.pem # chmod 400 private/logsrvd_key.pem
.RE .RE
@@ -302,7 +302,7 @@ The common name should be either the server's IP address or a fully
qualified domain name. qualified domain name.
.nf .nf
.sp .sp
.RS 6n .RS 4n
# openssl req -config openssl.cnf -key private/logsrvd_key.pem -new \e # openssl req -config openssl.cnf -key private/logsrvd_key.pem -new \e
-sha256 -out csr/logsrvd_csr.pem -sha256 -out csr/logsrvd_csr.pem
@@ -333,7 +333,7 @@ An optional company name []:
Now sign the CSR that was just created: Now sign the CSR that was just created:
.nf .nf
.sp .sp
.RS 6n .RS 4n
# openssl ca -config openssl.cnf -days 375 -notext -md sha256 \e # openssl ca -config openssl.cnf -days 375 -notext -md sha256 \e
-in csr/logsrvd_csr.pem -out certs/logsrvd_cert.pem -in csr/logsrvd_csr.pem -out certs/logsrvd_cert.pem
@@ -374,7 +374,7 @@ Data Base Updated
Finally, verify the new certificate: Finally, verify the new certificate:
.nf .nf
.sp .sp
.RS 6n .RS 4n
# openssl verify -CAfile cacert.pem certs/logsrvd_cert.pem # openssl verify -CAfile cacert.pem certs/logsrvd_cert.pem
certs/logsrvd_cert.pem: OK certs/logsrvd_cert.pem: OK
.RE .RE
@@ -399,7 +399,7 @@ for TLS requires the following settings, assuming the same path
names used earlier: names used earlier:
.nf .nf
.sp .sp
.RS 6n .RS 4n
# Listen on port 30344 for TLS connections to any address. # Listen on port 30344 for TLS connections to any address.
listen_address = *:30344(tls) listen_address = *:30344(tls)

View File

@@ -1,7 +1,7 @@
.\" .\"
.\" SPDX-License-Identifier: ISC .\" SPDX-License-Identifier: ISC
.\" .\"
.\" Copyright (c) 2019-2021 Todd C. Miller <Todd.Miller@sudo.ws> .\" Copyright (c) 2019-2022 Todd C. Miller <Todd.Miller@sudo.ws>
.\" .\"
.\" Permission to use, copy, modify, and distribute this software for any .\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above .\" purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\" .\"
.Dd September 17, 2021 .Dd February 10, 2022
.Dt SUDO_LOGSRVD @mansectsu@ .Dt SUDO_LOGSRVD @mansectsu@
.Os Sudo @PACKAGE_VERSION@ .Os Sudo @PACKAGE_VERSION@
.Sh NAME .Sh NAME
@@ -159,7 +159,7 @@ files for the CA.
We'll create a new directory hierarchy in We'll create a new directory hierarchy in
.Pa /etc/ssl/sudo .Pa /etc/ssl/sudo
for this purpose. for this purpose.
.Bd -literal -offset indent .Bd -literal -offset 4n
# mkdir /etc/ssl/sudo # mkdir /etc/ssl/sudo
# cd /etc/ssl/sudo # cd /etc/ssl/sudo
# mkdir certs csr newcerts private # mkdir certs csr newcerts private
@@ -177,7 +177,7 @@ The path to openssl.cnf is system-dependent but
is the most common location. is the most common location.
You will need to adjust the example below if it has a different location on You will need to adjust the example below if it has a different location on
your system. your system.
.Bd -literal -offset indent .Bd -literal -offset 4n
# cp /etc/ssl/openssl.cnf . # cp /etc/ssl/openssl.cnf .
.Ed .Ed
.Pp .Pp
@@ -189,7 +189,7 @@ and
.Dq CA_default .Dq CA_default
sections. sections.
Those sections should include the following settings: Those sections should include the following settings:
.Bd -literal -offset indent .Bd -literal -offset 4n
[ ca ] [ ca ]
default_ca = CA_default default_ca = CA_default
@@ -212,14 +212,14 @@ setting.
In order to create and sign our own certificates, we need to create In order to create and sign our own certificates, we need to create
a private key and a certificate for the root of the CA. a private key and a certificate for the root of the CA.
First, create the private key and protect it with a pass phrase: First, create the private key and protect it with a pass phrase:
.Bd -literal -offset indent .Bd -literal -offset 4n
# openssl genrsa -aes256 -out private/cakey.pem 4096 # openssl genrsa -aes256 -out private/cakey.pem 4096
# chmod 400 private/cakey.pem # chmod 400 private/cakey.pem
.Ed .Ed
.Pp .Pp
Next, generate the root certificate, using appropriate values for Next, generate the root certificate, using appropriate values for
the site-specific fields: the site-specific fields:
.Bd -literal -offset indent .Bd -literal -offset 4n
# openssl req -config openssl.cnf -key private/cakey.pem \e # openssl req -config openssl.cnf -key private/cakey.pem \e
-new -x509 -days 7300 -sha256 -extensions v3_ca \e -new -x509 -days 7300 -sha256 -extensions v3_ca \e
-out cacert.pem -out cacert.pem
@@ -245,7 +245,7 @@ Email Address []:
.Ed .Ed
.Pp .Pp
Finally, verify the root certificate: Finally, verify the root certificate:
.Bd -literal -offset indent .Bd -literal -offset 4n
# openssl x509 -noout -text -in cacert.pem # openssl x509 -noout -text -in cacert.pem
.Ed .Ed
.Ss Creating and signing certificates .Ss Creating and signing certificates
@@ -260,7 +260,7 @@ In this example we'll skip this part for simplicity's sake and sign the
CSRs with the root CA. CSRs with the root CA.
.Pp .Pp
First, generate the private key without a pass phrase. First, generate the private key without a pass phrase.
.Bd -literal -offset indent .Bd -literal -offset 4n
# openssl genrsa -out private/logsrvd_key.pem 2048 # openssl genrsa -out private/logsrvd_key.pem 2048
# chmod 400 private/logsrvd_key.pem # chmod 400 private/logsrvd_key.pem
.Ed .Ed
@@ -269,7 +269,7 @@ Next, create a certificate signing request (CSR) for the server's certificate.
The organization name must match the name given in the root certificate. The organization name must match the name given in the root certificate.
The common name should be either the server's IP address or a fully The common name should be either the server's IP address or a fully
qualified domain name. qualified domain name.
.Bd -literal -offset indent .Bd -literal -offset 4n
# openssl req -config openssl.cnf -key private/logsrvd_key.pem -new \e # openssl req -config openssl.cnf -key private/logsrvd_key.pem -new \e
-sha256 -out csr/logsrvd_csr.pem -sha256 -out csr/logsrvd_csr.pem
@@ -297,7 +297,7 @@ An optional company name []:
.Ed .Ed
.Pp .Pp
Now sign the CSR that was just created: Now sign the CSR that was just created:
.Bd -literal -offset indent .Bd -literal -offset 4n
# openssl ca -config openssl.cnf -days 375 -notext -md sha256 \e # openssl ca -config openssl.cnf -days 375 -notext -md sha256 \e
-in csr/logsrvd_csr.pem -out certs/logsrvd_cert.pem -in csr/logsrvd_csr.pem -out certs/logsrvd_cert.pem
@@ -335,7 +335,7 @@ Data Base Updated
.Ed .Ed
.Pp .Pp
Finally, verify the new certificate: Finally, verify the new certificate:
.Bd -literal -offset indent .Bd -literal -offset 4n
# openssl verify -CAfile cacert.pem certs/logsrvd_cert.pem # openssl verify -CAfile cacert.pem certs/logsrvd_cert.pem
certs/logsrvd_cert.pem: OK certs/logsrvd_cert.pem: OK
.Ed .Ed
@@ -357,7 +357,7 @@ Configuring
.Nm .Nm
for TLS requires the following settings, assuming the same path for TLS requires the following settings, assuming the same path
names used earlier: names used earlier:
.Bd -literal -offset indent .Bd -literal -offset 4n
# Listen on port 30344 for TLS connections to any address. # Listen on port 30344 for TLS connections to any address.
listen_address = *:30344(tls) listen_address = *:30344(tls)

View File

@@ -17,7 +17,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\" .\"
.TH "SUDO_PLUGIN_PYTHON" "5" "January 20, 2022" "Sudo @PACKAGE_VERSION@" "File Formats Manual" .TH "SUDO_PLUGIN_PYTHON" "5" "February 10, 2022" "Sudo @PACKAGE_VERSION@" "File Formats Manual"
.nh .nh
.if n .ad l .if n .ad l
.SH "NAME" .SH "NAME"
@@ -74,7 +74,7 @@ constructor yourself.
For example: For example:
.nf .nf
.sp .sp
.RS 6n .RS 4n
import sudo import sudo
class MySudoPlugin(sudo.Plugin): class MySudoPlugin(sudo.Plugin):
@@ -137,7 +137,7 @@ result code the plugin can also provide a message describing the problem.
This can be done by raising one of the special exceptions: This can be done by raising one of the special exceptions:
.nf .nf
.sp .sp
.RS 6n .RS 4n
raise sudo.PluginError("Message") raise sudo.PluginError("Message")
raise sudo.PluginReject("Message") raise sudo.PluginReject("Message")
.RE .RE
@@ -161,7 +161,7 @@ Example usage in
sudo.conf(@mansectform@): sudo.conf(@mansectform@):
.nf .nf
.sp .sp
.RS 6n .RS 4n
Plugin python_policy python_plugin.so ModulePath=<path> ClassName=<class> Plugin python_policy python_plugin.so ModulePath=<path> ClassName=<class>
Plugin python_io python_plugin.so ModulePath=<path> ClassName=<class> Plugin python_io python_plugin.so ModulePath=<path> ClassName=<class>
Plugin python_audit python_plugin.so ModulePath=<path> ClassName=<class> Plugin python_audit python_plugin.so ModulePath=<path> ClassName=<class>
@@ -174,7 +174,7 @@ Example group provider plugin usage in the
file: file:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Defaults group_plugin="python_plugin.so ModulePath=<path> ClassName=<class>" Defaults group_plugin="python_plugin.so ModulePath=<path> ClassName=<class>"
.RE .RE
.fi .fi
@@ -198,7 +198,7 @@ sudo.conf(@mansectform@).
For example: For example:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Plugin python_policy python_plugin.so ModulePath=<path> ClassName=<class> Plugin python_policy python_plugin.so ModulePath=<path> ClassName=<class>
.RE .RE
.fi .fi
@@ -300,7 +300,7 @@ convenience function can be used to convert them to a dictionary.
This function should return a result code or a tuple in the following format: This function should return a result code or a tuple in the following format:
.nf .nf
.sp .sp
.RS 12n .RS 10n
return (rc, command_info_out, argv_out, user_env_out) return (rc, command_info_out, argv_out, user_env_out)
.RE .RE
.fi .fi
@@ -567,7 +567,7 @@ sudo.conf(@mansectform@).
For example: For example:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Plugin python_io python_plugin.so ModulePath=<path> ClassName=<class> Plugin python_io python_plugin.so ModulePath=<path> ClassName=<class>
.RE .RE
.fi .fi
@@ -843,7 +843,7 @@ To try it, register it by adding the following lines to
\fI@sysconfdir@/sudo.conf\fR: \fI@sysconfdir@/sudo.conf\fR:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Plugin python_io python_plugin.so \e Plugin python_io python_plugin.so \e
ModulePath=@prefix@/share/doc/sudo/examples/example_io_plugin.py \e ModulePath=@prefix@/share/doc/sudo/examples/example_io_plugin.py \e
ClassName=SudoIOPlugin ClassName=SudoIOPlugin
@@ -855,7 +855,7 @@ sudo.conf(@mansectform@).
For example: For example:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Plugin python_audit python_plugin.so ModulePath=<path> ClassName=<class> Plugin python_audit python_plugin.so ModulePath=<path> ClassName=<class>
.RE .RE
.fi .fi
@@ -1159,7 +1159,7 @@ To try it, register it by adding the following lines to
\fI@sysconfdir@/sudo.conf\fR: \fI@sysconfdir@/sudo.conf\fR:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Plugin python_audit python_plugin.so \e Plugin python_audit python_plugin.so \e
ModulePath=@prefix@/share/doc/sudo/examples/example_audit_plugin.py \e ModulePath=@prefix@/share/doc/sudo/examples/example_audit_plugin.py \e
ClassName=SudoAuditPlugin ClassName=SudoAuditPlugin
@@ -1173,7 +1173,7 @@ sudo.conf(@mansectform@).
For example: For example:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Plugin python_approval python_plugin.so ModulePath=<path> ClassName=<class> Plugin python_approval python_plugin.so ModulePath=<path> ClassName=<class>
.RE .RE
.fi .fi
@@ -1269,7 +1269,7 @@ It can reject execution of the command by returning sudo.RC.REJECT or
raising the special exception: raising the special exception:
.nf .nf
.sp .sp
.RS 12n .RS 10n
raise sudo.PluginReject("some message") raise sudo.PluginReject("some message")
.RE .RE
.fi .fi
@@ -1300,7 +1300,7 @@ To try it, register it by adding the following lines to
\fI@sysconfdir@/sudo.conf\fR: \fI@sysconfdir@/sudo.conf\fR:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Plugin python_approval python_plugin.so \e Plugin python_approval python_plugin.so \e
ModulePath=@prefix@/share/doc/sudo/examples/example_approval_plugin.py \e ModulePath=@prefix@/share/doc/sudo/examples/example_approval_plugin.py \e
ClassName=BusinessHoursApprovalPlugin ClassName=BusinessHoursApprovalPlugin
@@ -1316,7 +1316,7 @@ file.
For example: For example:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Defaults group_plugin="python_plugin.so ModulePath=<path> ClassName=<class>" Defaults group_plugin="python_plugin.so ModulePath=<path> ClassName=<class>"
.RE .RE
.fi .fi
@@ -1397,7 +1397,7 @@ To try it, register it in the
file by adding the following lines: file by adding the following lines:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Defaults group_plugin="python_plugin.so \e Defaults group_plugin="python_plugin.so \e
ModulePath=@prefix@/share/doc/sudo/examples/example_group_plugin.py \e ModulePath=@prefix@/share/doc/sudo/examples/example_group_plugin.py \e
ClassName=SudoGroupPlugin" ClassName=SudoGroupPlugin"
@@ -1416,7 +1416,7 @@ user.
For example: For example:
.nf .nf
.sp .sp
.RS 6n .RS 4n
%:mygroup ALL=(ALL) NOPASSWD: ALL %:mygroup ALL=(ALL) NOPASSWD: ALL
.RE .RE
.fi .fi
@@ -1556,7 +1556,7 @@ To try it, register it by adding the following lines to
\fI@sysconfdir@/sudo.conf\fR: \fI@sysconfdir@/sudo.conf\fR:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Plugin python_io python_plugin.so \e Plugin python_io python_plugin.so \e
ModulePath=@prefix@/share/doc/sudo/examples/example_conversation.py \e ModulePath=@prefix@/share/doc/sudo/examples/example_conversation.py \e
ClassName=ReasonLoggerIOPlugin ClassName=ReasonLoggerIOPlugin
@@ -1617,7 +1617,7 @@ For example, to store debug output in
use a line like the following: use a line like the following:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Debug python_plugin.so /var/log/sudo_python_debug \e Debug python_plugin.so /var/log/sudo_python_debug \e
plugin@trace,c_calls@trace plugin@trace,c_calls@trace
.RE .RE
@@ -1632,7 +1632,7 @@ For example to just see the debug output of
calls, use: calls, use:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Debug python_plugin.so /var/log/sudo_python_debug plugin@trace Debug python_plugin.so /var/log/sudo_python_debug plugin@trace
.RE .RE
.fi .fi
@@ -1735,7 +1735,7 @@ To try it, register it by adding the following lines to
\fI@sysconfdir@/sudo.conf\fR: \fI@sysconfdir@/sudo.conf\fR:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Plugin python_io python_plugin.so \e Plugin python_io python_plugin.so \e
ModulePath=@prefix@/share/doc/sudo/examples/example_debugging.py \e ModulePath=@prefix@/share/doc/sudo/examples/example_debugging.py \e
ClassName=DebugDemoPlugin ClassName=DebugDemoPlugin

View File

@@ -16,7 +16,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\" .\"
.Dd January 20, 2022 .Dd February 10, 2022
.Dt SUDO_PLUGIN_PYTHON @mansectform@ .Dt SUDO_PLUGIN_PYTHON @mansectform@
.Os Sudo @PACKAGE_VERSION@ .Os Sudo @PACKAGE_VERSION@
.Sh NAME .Sh NAME
@@ -64,7 +64,7 @@ This is intended as a convenience to allow you to avoid writing the
constructor yourself. constructor yourself.
.Pp .Pp
For example: For example:
.Bd -literal -offset indent .Bd -literal -offset 4n
import sudo import sudo
class MySudoPlugin(sudo.Plugin): class MySudoPlugin(sudo.Plugin):
@@ -115,7 +115,7 @@ or
.Dv sudo.RC.REJECT .Dv sudo.RC.REJECT
result code the plugin can also provide a message describing the problem. result code the plugin can also provide a message describing the problem.
This can be done by raising one of the special exceptions: This can be done by raising one of the special exceptions:
.Bd -literal -offset indent .Bd -literal -offset 4n
raise sudo.PluginError("Message") raise sudo.PluginError("Message")
raise sudo.PluginReject("Message") raise sudo.PluginReject("Message")
.Ed .Ed
@@ -136,7 +136,7 @@ plugin it is loading as arguments.
.Pp .Pp
Example usage in Example usage in
.Xr sudo.conf @mansectform@ : .Xr sudo.conf @mansectform@ :
.Bd -literal -offset indent .Bd -literal -offset 4n
Plugin python_policy python_plugin.so ModulePath=<path> ClassName=<class> Plugin python_policy python_plugin.so ModulePath=<path> ClassName=<class>
Plugin python_io python_plugin.so ModulePath=<path> ClassName=<class> Plugin python_io python_plugin.so ModulePath=<path> ClassName=<class>
Plugin python_audit python_plugin.so ModulePath=<path> ClassName=<class> Plugin python_audit python_plugin.so ModulePath=<path> ClassName=<class>
@@ -146,7 +146,7 @@ Plugin python_approval python_plugin.so ModulePath=<path> ClassName=<class>
Example group provider plugin usage in the Example group provider plugin usage in the
.Em sudoers .Em sudoers
file: file:
.Bd -literal -offset indent .Bd -literal -offset 4n
Defaults group_plugin="python_plugin.so ModulePath=<path> ClassName=<class>" Defaults group_plugin="python_plugin.so ModulePath=<path> ClassName=<class>"
.Ed .Ed
.Pp .Pp
@@ -167,7 +167,7 @@ will result in an error.
Policy plugins must be registered in Policy plugins must be registered in
.Xr sudo.conf @mansectform@ . .Xr sudo.conf @mansectform@ .
For example: For example:
.Bd -literal -offset indent .Bd -literal -offset 4n
Plugin python_policy python_plugin.so ModulePath=<path> ClassName=<class> Plugin python_policy python_plugin.so ModulePath=<path> ClassName=<class>
.Ed .Ed
.Pp .Pp
@@ -255,7 +255,7 @@ convenience function can be used to convert them to a dictionary.
.El .El
.Pp .Pp
This function should return a result code or a tuple in the following format: This function should return a result code or a tuple in the following format:
.Bd -literal -offset indent .Bd -literal -offset 4n
return (rc, command_info_out, argv_out, user_env_out) return (rc, command_info_out, argv_out, user_env_out)
.Ed .Ed
.Pp .Pp
@@ -460,7 +460,7 @@ in addition to another policy plugin, such as
I/O plugins must be registered in I/O plugins must be registered in
.Xr sudo.conf @mansectform@ . .Xr sudo.conf @mansectform@ .
For example: For example:
.Bd -literal -offset indent .Bd -literal -offset 4n
Plugin python_io python_plugin.so ModulePath=<path> ClassName=<class> Plugin python_io python_plugin.so ModulePath=<path> ClassName=<class>
.Ed .Ed
.Pp .Pp
@@ -681,7 +681,7 @@ system call, otherwise 0.
Sudo ships a Python I/O plugin example. Sudo ships a Python I/O plugin example.
To try it, register it by adding the following lines to To try it, register it by adding the following lines to
.Pa @sysconfdir@/sudo.conf : .Pa @sysconfdir@/sudo.conf :
.Bd -literal -offset indent .Bd -literal -offset 4n
Plugin python_io python_plugin.so \e Plugin python_io python_plugin.so \e
ModulePath=@prefix@/share/doc/sudo/examples/example_io_plugin.py \e ModulePath=@prefix@/share/doc/sudo/examples/example_io_plugin.py \e
ClassName=SudoIOPlugin ClassName=SudoIOPlugin
@@ -690,7 +690,7 @@ Plugin python_io python_plugin.so \e
Audit plugins must be registered in Audit plugins must be registered in
.Xr sudo.conf @mansectform@ . .Xr sudo.conf @mansectform@ .
For example: For example:
.Bd -literal -offset indent .Bd -literal -offset 4n
Plugin python_audit python_plugin.so ModulePath=<path> ClassName=<class> Plugin python_audit python_plugin.so ModulePath=<path> ClassName=<class>
.Ed .Ed
.Pp .Pp
@@ -928,7 +928,7 @@ manual for possible values.
Sudo ships a Python Audit plugin example. Sudo ships a Python Audit plugin example.
To try it, register it by adding the following lines to To try it, register it by adding the following lines to
.Pa @sysconfdir@/sudo.conf : .Pa @sysconfdir@/sudo.conf :
.Bd -literal -offset indent .Bd -literal -offset 4n
Plugin python_audit python_plugin.so \e Plugin python_audit python_plugin.so \e
ModulePath=@prefix@/share/doc/sudo/examples/example_audit_plugin.py \e ModulePath=@prefix@/share/doc/sudo/examples/example_audit_plugin.py \e
ClassName=SudoAuditPlugin ClassName=SudoAuditPlugin
@@ -939,7 +939,7 @@ It will log the plugin accept / reject / error results to the output.
Approval plugins must be registered in Approval plugins must be registered in
.Xr sudo.conf @mansectform@ . .Xr sudo.conf @mansectform@ .
For example: For example:
.Bd -literal -offset indent .Bd -literal -offset 4n
Plugin python_approval python_plugin.so ModulePath=<path> ClassName=<class> Plugin python_approval python_plugin.so ModulePath=<path> ClassName=<class>
.Ed .Ed
.Pp .Pp
@@ -1010,7 +1010,7 @@ check(self, command_info: Tuple[str, ...], run_argv: Tuple[str, ...],
This function is called after policy plugin's check_policy has succeeded. This function is called after policy plugin's check_policy has succeeded.
It can reject execution of the command by returning sudo.RC.REJECT or It can reject execution of the command by returning sudo.RC.REJECT or
raising the special exception: raising the special exception:
.Bd -literal -offset indent .Bd -literal -offset 4n
raise sudo.PluginReject("some message") raise sudo.PluginReject("some message")
.Ed .Ed
.Pp .Pp
@@ -1034,7 +1034,7 @@ The environment the command will be run with.
Sudo ships a Python Approval plugin example. Sudo ships a Python Approval plugin example.
To try it, register it by adding the following lines to To try it, register it by adding the following lines to
.Pa @sysconfdir@/sudo.conf : .Pa @sysconfdir@/sudo.conf :
.Bd -literal -offset indent .Bd -literal -offset 4n
Plugin python_approval python_plugin.so \e Plugin python_approval python_plugin.so \e
ModulePath=@prefix@/share/doc/sudo/examples/example_approval_plugin.py \e ModulePath=@prefix@/share/doc/sudo/examples/example_approval_plugin.py \e
ClassName=BusinessHoursApprovalPlugin ClassName=BusinessHoursApprovalPlugin
@@ -1047,7 +1047,7 @@ A group provider plugin is registered in the
.Xr sudoers @mansectform@ .Xr sudoers @mansectform@
file. file.
For example: For example:
.Bd -literal -offset indent .Bd -literal -offset 4n
Defaults group_plugin="python_plugin.so ModulePath=<path> ClassName=<class>" Defaults group_plugin="python_plugin.so ModulePath=<path> ClassName=<class>"
.Ed .Ed
.Pp .Pp
@@ -1111,7 +1111,7 @@ Sudo ships a Python group plugin example.
To try it, register it in the To try it, register it in the
.Em sudoers .Em sudoers
file by adding the following lines: file by adding the following lines:
.Bd -literal -offset indent .Bd -literal -offset 4n
Defaults group_plugin="python_plugin.so \e Defaults group_plugin="python_plugin.so \e
ModulePath=@prefix@/share/doc/sudo/examples/example_group_plugin.py \e ModulePath=@prefix@/share/doc/sudo/examples/example_group_plugin.py \e
ClassName=SudoGroupPlugin" ClassName=SudoGroupPlugin"
@@ -1127,7 +1127,7 @@ If you add a rule that uses this group, it will affect the
.Em test .Em test
user. user.
For example: For example:
.Bd -literal -offset indent .Bd -literal -offset 4n
%:mygroup ALL=(ALL) NOPASSWD: ALL %:mygroup ALL=(ALL) NOPASSWD: ALL
.Ed .Ed
.Pp .Pp
@@ -1247,7 +1247,7 @@ or the user interrupted the conversation by pressing control-C.
Sudo ships with an example plugin demonstrating the Python conversation API. Sudo ships with an example plugin demonstrating the Python conversation API.
To try it, register it by adding the following lines to To try it, register it by adding the following lines to
.Pa @sysconfdir@/sudo.conf : .Pa @sysconfdir@/sudo.conf :
.Bd -literal -offset indent .Bd -literal -offset 4n
Plugin python_io python_plugin.so \e Plugin python_io python_plugin.so \e
ModulePath=@prefix@/share/doc/sudo/examples/example_conversation.py \e ModulePath=@prefix@/share/doc/sudo/examples/example_conversation.py \e
ClassName=ReasonLoggerIOPlugin ClassName=ReasonLoggerIOPlugin
@@ -1302,7 +1302,7 @@ with the program set to
For example, to store debug output in For example, to store debug output in
.Pa /var/log/sudo_python_debug , .Pa /var/log/sudo_python_debug ,
use a line like the following: use a line like the following:
.Bd -literal -offset indent .Bd -literal -offset 4n
Debug python_plugin.so /var/log/sudo_python_debug \e Debug python_plugin.so /var/log/sudo_python_debug \e
plugin@trace,c_calls@trace plugin@trace,c_calls@trace
.Ed .Ed
@@ -1314,7 +1314,7 @@ strings, separated by commas
For example to just see the debug output of For example to just see the debug output of
.Fn sudo.debug .Fn sudo.debug
calls, use: calls, use:
.Bd -literal -offset indent .Bd -literal -offset 4n
Debug python_plugin.so /var/log/sudo_python_debug plugin@trace Debug python_plugin.so /var/log/sudo_python_debug plugin@trace
.Ed .Ed
.Pp .Pp
@@ -1396,7 +1396,7 @@ for the sudo debug system.
Sudo ships an example debug plugin by default. Sudo ships an example debug plugin by default.
To try it, register it by adding the following lines to To try it, register it by adding the following lines to
.Pa @sysconfdir@/sudo.conf : .Pa @sysconfdir@/sudo.conf :
.Bd -literal -offset indent .Bd -literal -offset 4n
Plugin python_io python_plugin.so \e Plugin python_io python_plugin.so \e
ModulePath=@prefix@/share/doc/sudo/examples/example_debugging.py \e ModulePath=@prefix@/share/doc/sudo/examples/example_debugging.py \e
ClassName=DebugDemoPlugin ClassName=DebugDemoPlugin

View File

@@ -25,7 +25,7 @@
.nr BA @BAMAN@ .nr BA @BAMAN@
.nr LC @LCMAN@ .nr LC @LCMAN@
.nr PS @PSMAN@ .nr PS @PSMAN@
.TH "SUDOERS" "@mansectform@" "February 8, 2022" "Sudo @PACKAGE_VERSION@" "File Formats Manual" .TH "SUDOERS" "@mansectform@" "February 10, 2022" "Sudo @PACKAGE_VERSION@" "File Formats Manual"
.nh .nh
.if n .ad l .if n .ad l
.SH "NAME" .SH "NAME"
@@ -71,7 +71,7 @@ to use the
plugin, the following configuration can be used. plugin, the following configuration can be used.
.nf .nf
.sp .sp
.RS 6n .RS 4n
Plugin sudoers_audit sudoers.so Plugin sudoers_audit sudoers.so
Plugin sudoers_policy sudoers.so Plugin sudoers_policy sudoers.so
Plugin sudoers_io sudoers.so Plugin sudoers_io sudoers.so
@@ -104,7 +104,7 @@ Multiple arguments may be specified, separated by white space.
For example: For example:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Plugin sudoers_audit sudoers.so sudoers_mode=0400 error_recovery=false Plugin sudoers_audit sudoers.so sudoers_mode=0400 error_recovery=false
.RE .RE
.fi .fi
@@ -6772,7 +6772,7 @@ For example, to allow user operator to edit the
file on any machine: file on any machine:
.nf .nf
.sp .sp
.RS 6n .RS 4n
operator ALL = sudoedit /etc/motd operator ALL = sudoedit /etc/motd
.RE .RE
.fi .fi
@@ -6782,7 +6782,7 @@ The operator user then runs
as follows: as follows:
.nf .nf
.sp .sp
.RS 6n .RS 4n
$ sudoedit /etc/motd $ sudoedit /etc/motd
.RE .RE
.fi .fi

View File

@@ -24,7 +24,7 @@
.nr BA @BAMAN@ .nr BA @BAMAN@
.nr LC @LCMAN@ .nr LC @LCMAN@
.nr PS @PSMAN@ .nr PS @PSMAN@
.Dd February 8, 2022 .Dd February 10, 2022
.Dt SUDOERS @mansectform@ .Dt SUDOERS @mansectform@
.Os Sudo @PACKAGE_VERSION@ .Os Sudo @PACKAGE_VERSION@
.Sh NAME .Sh NAME
@@ -68,7 +68,7 @@ To explicitly configure
to use the to use the
.Nm .Nm
plugin, the following configuration can be used. plugin, the following configuration can be used.
.Bd -literal -offset indent .Bd -literal -offset 4n
Plugin sudoers_audit sudoers.so Plugin sudoers_audit sudoers.so
Plugin sudoers_policy sudoers.so Plugin sudoers_policy sudoers.so
Plugin sudoers_io sudoers.so Plugin sudoers_io sudoers.so
@@ -98,7 +98,7 @@ For older versions, it is the
plugin. plugin.
Multiple arguments may be specified, separated by white space. Multiple arguments may be specified, separated by white space.
For example: For example:
.Bd -literal -offset indent .Bd -literal -offset 4n
Plugin sudoers_audit sudoers.so sudoers_mode=0400 error_recovery=false Plugin sudoers_audit sudoers.so sudoers_mode=0400 error_recovery=false
.Ed .Ed
.Pp .Pp
@@ -6260,14 +6260,14 @@ option in
For example, to allow user operator to edit the For example, to allow user operator to edit the
.Dq message of the day .Dq message of the day
file on any machine: file on any machine:
.Bd -literal -offset indent .Bd -literal -offset 4n
operator ALL = sudoedit /etc/motd operator ALL = sudoedit /etc/motd
.Ed .Ed
.Pp .Pp
The operator user then runs The operator user then runs
.Nm sudoedit .Nm sudoedit
as follows: as follows:
.Bd -literal -offset indent .Bd -literal -offset 4n
$ sudoedit /etc/motd $ sudoedit /etc/motd
.Ed .Ed
.Pp .Pp

View File

@@ -16,7 +16,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\" .\"
.TH "SUDOREPLAY" "@mansectsu@" "January 19, 2022" "Sudo @PACKAGE_VERSION@" "System Manager's Manual" .TH "SUDOREPLAY" "@mansectsu@" "February 10, 2022" "Sudo @PACKAGE_VERSION@" "System Manager's Manual"
.nh .nh
.if n .ad l .if n .ad l
.SH "NAME" .SH "NAME"
@@ -453,7 +453,7 @@ List sessions run by user
\fImillert\fR: \fImillert\fR:
.nf .nf
.sp .sp
.RS 6n .RS 4n
# sudoreplay -l user millert # sudoreplay -l user millert
.RE .RE
.fi .fi
@@ -463,7 +463,7 @@ List sessions run by user
with a command containing the string vi: with a command containing the string vi:
.nf .nf
.sp .sp
.RS 6n .RS 4n
# sudoreplay -l user bob command vi # sudoreplay -l user bob command vi
.RE .RE
.fi .fi
@@ -473,7 +473,7 @@ List sessions run by user
that match a regular expression: that match a regular expression:
.nf .nf
.sp .sp
.RS 6n .RS 4n
# sudoreplay -l user jeff command '/bin/[a-z]*sh' # sudoreplay -l user jeff command '/bin/[a-z]*sh'
.RE .RE
.fi .fi
@@ -481,7 +481,7 @@ that match a regular expression:
List sessions run by jeff or bob on the console: List sessions run by jeff or bob on the console:
.nf .nf
.sp .sp
.RS 6n .RS 4n
# sudoreplay -l ( user jeff or user bob ) tty console # sudoreplay -l ( user jeff or user bob ) tty console
.RE .RE
.fi .fi

View File

@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\" .\"
.Dd January 19, 2022 .Dd February 10, 2022
.Dt SUDOREPLAY @mansectsu@ .Dt SUDOREPLAY @mansectsu@
.Os Sudo @PACKAGE_VERSION@ .Os Sudo @PACKAGE_VERSION@
.Sh NAME .Sh NAME
@@ -406,26 +406,26 @@ was used as part of a pipeline for a particular command.
.Sh EXAMPLES .Sh EXAMPLES
List sessions run by user List sessions run by user
.Em millert : .Em millert :
.Bd -literal -offset indent .Bd -literal -offset 4n
# sudoreplay -l user millert # sudoreplay -l user millert
.Ed .Ed
.Pp .Pp
List sessions run by user List sessions run by user
.Em bob .Em bob
with a command containing the string vi: with a command containing the string vi:
.Bd -literal -offset indent .Bd -literal -offset 4n
# sudoreplay -l user bob command vi # sudoreplay -l user bob command vi
.Ed .Ed
.Pp .Pp
List sessions run by user List sessions run by user
.Em jeff .Em jeff
that match a regular expression: that match a regular expression:
.Bd -literal -offset indent .Bd -literal -offset 4n
# sudoreplay -l user jeff command '/bin/[a-z]*sh' # sudoreplay -l user jeff command '/bin/[a-z]*sh'
.Ed .Ed
.Pp .Pp
List sessions run by jeff or bob on the console: List sessions run by jeff or bob on the console:
.Bd -literal -offset indent .Bd -literal -offset 4n
# sudoreplay -l ( user jeff or user bob ) tty console # sudoreplay -l ( user jeff or user bob ) tty console
.Ed .Ed
.Sh SEE ALSO .Sh SEE ALSO

View File

@@ -21,7 +21,7 @@
.\" Agency (DARPA) and Air Force Research Laboratory, Air Force .\" Agency (DARPA) and Air Force Research Laboratory, Air Force
.\" Materiel Command, USAF, under agreement number F39502-99-1-0512. .\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
.\" .\"
.TH "VISUDO" "@mansectsu@" "January 20, 2022" "Sudo @PACKAGE_VERSION@" "System Manager's Manual" .TH "VISUDO" "@mansectsu@" "February 10, 2022" "Sudo @PACKAGE_VERSION@" "System Manager's Manual"
.nh .nh
.if n .ad l .if n .ad l
.SH "NAME" .SH "NAME"
@@ -312,7 +312,7 @@ Multiple arguments may be specified, separated by white space.
For example: For example:
.nf .nf
.sp .sp
.RS 6n .RS 4n
Plugin sudoers_policy sudoers.so sudoers_mode=0400 Plugin sudoers_policy sudoers.so sudoers_mode=0400
.RE .RE
.fi .fi

View File

@@ -20,7 +20,7 @@
.\" Agency (DARPA) and Air Force Research Laboratory, Air Force .\" Agency (DARPA) and Air Force Research Laboratory, Air Force
.\" Materiel Command, USAF, under agreement number F39502-99-1-0512. .\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
.\" .\"
.Dd January 20, 2022 .Dd February 10, 2022
.Dt VISUDO @mansectsu@ .Dt VISUDO @mansectsu@
.Os Sudo @PACKAGE_VERSION@ .Os Sudo @PACKAGE_VERSION@
.Sh NAME .Sh NAME
@@ -302,7 +302,7 @@ These arguments, if present, should be listed after the path to the plugin
.Pa sudoers.so ) . .Pa sudoers.so ) .
Multiple arguments may be specified, separated by white space. Multiple arguments may be specified, separated by white space.
For example: For example:
.Bd -literal -offset indent .Bd -literal -offset 4n
Plugin sudoers_policy sudoers.so sudoers_mode=0400 Plugin sudoers_policy sudoers.so sudoers_mode=0400
.Ed .Ed
.Pp .Pp