Imported Upstream version 1.8.7
[debian/sudo] / doc / sudo.man.in
index 914941c9e889c7ace57af667ed9b0d62732ce17d..5c6f032b79908159b8762da0b116644d437fd334 100644 (file)
@@ -1,7 +1,7 @@
 .\" DO NOT EDIT THIS FILE, IT IS NOT THE MASTER!
 .\" IT IS GENERATED AUTOMATICALLY FROM sudo.mdoc.in
 .\"
-.\" Copyright (c) 1994-1996, 1998-2005, 2007-2012
+.\" Copyright (c) 1994-1996, 1998-2005, 2007-2013
 .\"    Todd C. Miller <Todd.Miller@courtesan.com>
 .\"
 .\" Permission to use, copy, modify, and distribute this software for any
@@ -21,7 +21,7 @@
 .\" Agency (DARPA) and Air Force Research Laboratory, Air Force
 .\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
 .\"
-.TH "SUDO" "@mansectsu@" "July 10, 2012" "Sudo @PACKAGE_VERSION@" "System Manager's Manual"
+.TH "SUDO" "@mansectsu@" "March 13, 2013" "Sudo @PACKAGE_VERSION@" "System Manager's Manual"
 .nh
 .if n .ad l
 .SH "NAME"
@@ -99,7 +99,7 @@ which is configured via the file
 \fI@sysconfdir@/sudoers\fR,
 or via LDAP.
 See the
-\fIPLUGINS\fR
+\fIPlugins\fR
 section for more information.
 .PP
 The security policy determines what privileges, if any, a user has
@@ -162,7 +162,7 @@ If the
 environment variable is set, it specifies the path to the helper
 program.
 Otherwise, if
-\fI@sysconfdir@/sudo.conf\fR
+sudo.conf(@mansectform@)
 contains a line specifying the askpass program, that value will be
 used.
 For example:
@@ -694,7 +694,7 @@ for more information.
 When
 \fBsudo\fR
 executes a command, the security policy specifies the execution
-envionment for the command.
+environment for the command.
 Typically, the real and effective uid and gid are set to
 match those of the target user, as specified in the password database,
 and the group vector is initialized based on the group database
@@ -747,8 +747,9 @@ system call in the child process.
 The main
 \fBsudo\fR
 process waits until the command has completed, then passes the
-command's exit status to the security policy's close method and exits.
-If an I/O logging plugin is configured, a new  pseudo-terminal
+command's exit status to the security policy's close function and exits.
+If an I/O logging plugin is configured or if the security policy
+explicitly requests it, a new  pseudo-terminal
 (``pty'')
 is created and a second
 \fBsudo\fR
@@ -759,6 +760,12 @@ and resume the command.
 Without it, the command would be in what POSIX terms an
 ``orphaned process group''
 and it would not receive any job control signals.
+As a special case, if the policy plugin does not define a close
+function and no pty is required,
+\fBsudo\fR
+will execute the command directly instead of calling
+fork(2)
+first.
 .SS "Signal handling"
 Because the command is run as a child of the
 \fBsudo\fR
@@ -796,7 +803,7 @@ reboot(@mansectsu@)
 command sends
 \fRSIGTERM\fR
 to all non-system processes other than itself before rebooting
-the systyem.
+the system.
 This prevents
 \fBsudo\fR
 from relaying the
@@ -823,244 +830,36 @@ are run using the
 family of functions instead of
 \fBsystem\fR()
 (which interposes a shell between the command and the calling process).
-.SH "PLUGINS"
+.PP
+If no I/O logging plugins are loaded and the policy plugin has not
+defined a
+\fBclose\fR()
+function, set a command timeout or required that the command be
+run in a new pty,
+\fBsudo\fR
+may execute the command directly instead of running it as a child process.
+.SS "Plugins"
 Plugins are dynamically loaded based on the contents of the
-\fI@sysconfdir@/sudo.conf\fR
+sudo.conf(@mansectform@)
 file.
 If no
-\fI@sysconfdir@/sudo.conf\fR
+sudo.conf(@mansectform@)
 file is present, or it contains no
 \fRPlugin\fR
 lines,
 \fBsudo\fR
 will use the traditional
 \fIsudoers\fR
-security policy and I/O logging, which corresponds to the following
+security policy and I/O logging.
+See the
+sudo.conf(@mansectform@)
+manual for details of the
 \fI@sysconfdir@/sudo.conf\fR
-file.
-.nf
-.sp
-.RS 0n
-#
-# Default @sysconfdir@/sudo.conf file
-#
-# Format:
-#   Plugin plugin_name plugin_path plugin_options ...
-#   Path askpass /path/to/askpass
-#   Path noexec /path/to/sudo_noexec.so
-#   Debug sudo /var/log/sudo_debug all@warn
-#   Set disable_coredump true
-#
-# The plugin_path is relative to @prefix@/libexec unless
-#   fully qualified.
-# The plugin_name corresponds to a global symbol in the plugin
-#   that contains the plugin interface structure.
-# The plugin_options are optional.
-#
-Plugin policy_plugin sudoers.so
-Plugin io_plugin sudoers.so
-.RE
-.fi
-.PP
-A
-\fRPlugin\fR
-line consists of the
-\fRPlugin\fR
-keyword, followed by the
-\fIsymbol_name\fR
-and the
-\fIpath\fR
-to the shared object containing the plugin.
-The
-\fIsymbol_name\fR
-is the name of the
-\fRstruct policy_plugin\fR
-or
-\fRstruct io_plugin\fR
-in the plugin shared object.
-The
-\fIpath\fR
-may be fully qualified or relative.
-If not fully qualified it is relative to the
-\fI@prefix@/libexec\fR
-directory.
-Any additional parameters after the
-\fIpath\fR
-are passed as arguments to the plugin's
-\fIopen\fR
-function.
-Lines that don't begin with
-\fRPlugin\fR,
-\fRPath\fR,
-\fRDebug\fR,
-or
-\fRSet\fR
-are silently ignored.
-.PP
-For more information, see the
+file and the
 sudo_plugin(@mansectsu@)
-manual.
-.SH "PATHS"
-A
-\fRPath\fR
-line consists of the
-\fRPath\fR
-keyword, followed by the name of the path to set and its value.
-E.g.
-.nf
-.sp
-.RS 6n
-Path noexec @noexec_file@
-Path askpass /usr/X11R6/bin/ssh-askpass
-.RE
-.fi
-.PP
-The following plugin-agnostic paths may be set in the
-\fI@sysconfdir@/sudo.conf\fR
-file:
-.TP 10n
-askpass
-The fully qualified path to a helper program used to read the user's
-password when no terminal is available.
-This may be the case when
-\fBsudo\fR
-is executed from a graphical (as opposed to text-based) application.
-The program specified by
-\fIaskpass\fR
-should display the argument passed to it as the prompt and write
-the user's password to the standard output.
-The value of
-\fIaskpass\fR
-may be overridden by the
-\fRSUDO_ASKPASS\fR
-environment variable.
-.TP 10n
-noexec
-The fully-qualified path to a shared library containing dummy
-versions of the
-\fBexecv\fR(),
-\fBexecve\fR()
-and
-\fBfexecve\fR()
-library functions that just return an error.
-This is used to implement the
-\fInoexec\fR
-functionality on systems that support
-\fRLD_PRELOAD\fR
-or its equivalent.
-Defaults to
-\fI@noexec_file@\fR.
-.SH "DEBUG FLAGS"
-\fBsudo\fR
-versions 1.8.4 and higher support a flexible debugging framework
-that can help track down what
+manual for more information about the
 \fBsudo\fR
-is doing internally if there is a problem.
-.PP
-A
-\fRDebug\fR
-line consists of the
-\fRDebug\fR
-keyword, followed by the name of the program to debug
-(\fBsudo\fR, \fBvisudo\fR, \fBsudoreplay\fR),
-the debug file name and a comma-separated list of debug flags.
-The debug flag syntax used by
-\fBsudo\fR
-and the
-\fIsudoers\fR
-plugin is
-\fIsubsystem\fR@\fIpriority\fR
-but the plugin is free to use a different format so long as it does
-not include a comma
-(`\&,').
-.PP
-For instance:
-.nf
-.sp
-.RS 6n
-Debug sudo /var/log/sudo_debug all@warn,plugin@info
-.RE
-.fi
-.PP
-would log all debugging statements at the
-\fIwarn\fR
-level and higher in addition to those at the
-\fIinfo\fR
-level for the plugin subsystem.
-.PP
-Currently, only one
-\fRDebug\fR
-entry per program is supported.
-The
-\fBsudo\fR
-\fRDebug\fR
-entry is shared by the
-\fBsudo\fR
-front end,
-\fBsudoedit\fR
-and the plugins.
-A future release may add support for per-plugin
-\fRDebug\fR
-lines and/or support for multiple debugging files for a single
-program.
-.PP
-The priorities used by the
-\fBsudo\fR
-front end, in order of decreasing severity, are:
-\fIcrit\fR, \fIerr\fR, \fIwarn\fR, \fInotice\fR, \fIdiag\fR, \fIinfo\fR, \fItrace\fR
-and
-\fIdebug\fR.
-Each priority, when specified, also includes all priorities higher
-than it.
-For example, a priority of
-\fInotice\fR
-would include debug messages logged at
-\fInotice\fR
-and higher.
-.PP
-The following subsystems are used by the
-\fBsudo\fR
-front-end:
-.TP 12n
-\fIall\fR
-matches every subsystem
-.TP 12n
-\fIargs\fR
-command line argument processing
-.TP 12n
-\fIconv\fR
-user conversation
-.TP 12n
-\fIedit\fR
-sudoedit
-.TP 12n
-\fIexec\fR
-command execution
-.TP 12n
-\fImain\fR
-\fBsudo\fR
-main function
-.TP 12n
-\fInetif\fR
-network interface handling
-.TP 12n
-\fIpcomm\fR
-communication with the plugin
-.TP 12n
-\fIplugin\fR
-plugin configuration
-.TP 12n
-\fIpty\fR
-pseudo-tty related code
-.TP 12n
-\fIselinux\fR
-SELinux-specific handling
-.TP 12n
-\fIutil\fR
-utility functions
-.TP 12n
-\fIutmp\fR
-utmp handling
+plugin architecture.
 .SH "EXIT VALUE"
 Upon successful execution of a program, the exit status from
 \fIsudo\fR
@@ -1142,7 +941,7 @@ To aid in debugging
 crashes, you may wish to re-enable core dumps by setting
 ``disable_coredump''
 to false in the
-\fI@sysconfdir@/sudo.conf\fR
+sudo.conf(@mansectform@)
 file as follows:
 .nf
 .sp
@@ -1151,14 +950,9 @@ Set disable_coredump false
 .RE
 .fi
 .PP
-Note that by default, most operating systems disable core dumps
-from setuid programs, which includes
-\fBsudo\fR.
-To actually get a
-\fBsudo\fR
-core file you may need to enable core dumps for setuid processes.
-On BSD and Linux systems this is accomplished via the sysctl command,
-on Solaris the coreadm command can be used.
+See the
+sudo.conf(@mansectform@)
+manual for more information.
 .SH "ENVIRONMENT"
 \fBsudo\fR
 utilizes the following environment variables.
@@ -1323,11 +1117,11 @@ $ sudo sh -c "cd /home ; du -s * | sort -rn > USAGE"
 .RE
 .fi
 .SH "SEE ALSO"
-grep(1),
 su(1),
 stat(2),
 login_cap(3),
 passwd(@mansectform@),
+sudo.conf(@mansectform@),
 sudoers(@mansectform@),
 sudo_plugin(@mansectsu@),
 sudoreplay(@mansectsu@),