--- embedaddon/sudo/doc/sudo.pod 2012/02/21 16:23:02 1.1 +++ embedaddon/sudo/doc/sudo.pod 2012/05/29 12:26:49 1.1.1.2 @@ -1,4 +1,4 @@ -Copyright (c) 1994-1996, 1998-2005, 2007-2011 +Copyright (c) 1994-1996, 1998-2005, 2007-2012 Todd C. Miller Permission to use, copy, modify, and distribute this software for any @@ -26,24 +26,21 @@ sudo, sudoedit - execute a command as another user =head1 SYNOPSIS -B S<[B<-D> I]> B<-h> | B<-K> | B<-k> | B<-V> +B B<-h> | B<-K> | B<-k> | B<-V> B B<-v> [B<-AknS>] S<[B<-a> I]> -S<[B<-D> I]> S<[B<-g> I|I<#gid>]> S<[B<-p> I]> S<[B<-u> I|I<#uid>]> B B<-l[l]> [B<-AknS>] S<[B<-a> I]> -S<[B<-D> I]> S<[B<-g> I|I<#gid>]> S<[B<-p> I]> S<[B<-U> I]> S<[B<-u> I|I<#uid>]> [I] B [B<-AbEHnPS>] S<[B<-a> I]> S<[B<-C> I]> -S<[B<-D> I]> S<[B<-c> I|I<->]> S<[B<-g> I|I<#gid>]> S<[B<-p> I]> S<[B<-r> I]> S<[B<-t> I]> @@ -54,7 +51,6 @@ B [B<-AnS>] S<[B<-a> I]> S<[B<-C> I]> S<[B<-c> I|I<->]> -S<[B<-D> I]> S<[B<-g> I|I<#gid>]> S<[B<-p> I]> S<[B<-u> I|I<#uid>]> file ... @@ -69,7 +65,7 @@ option was specified). B supports a plugin architecture for security policies and input/output logging. Third parties can develop and distribute -their own policy and I/O logging modules to work seemlessly with +their own policy and I/O logging modules to work seamlessly with the B front end. The default security policy is I, which is configured via the file F<@sysconfdir@/sudoers>, or via LDAP. See the L section for more information. @@ -158,11 +154,6 @@ argument specifies an existing user class, the command as root, or the B command must be run from a shell that is already root. This option is only available on systems with BSD login classes. -=item -D I - -Enable debugging of B plugins and B itself. The I -may be a value from 1 through 9. - =item -E The B<-E> (I I) option indicates to the @@ -416,7 +407,7 @@ command line are subject to the same restrictions as n variables with one important exception. If the I option is set in I, the command to be run has the C tag set or the command matched is C, the user may set variables -that would overwise be forbidden. See L for more information. +that would otherwise be forbidden. See L for more information. =head1 PLUGINS @@ -430,14 +421,17 @@ which corresponds to the following F<@sysconfdir@/sudo # Default @sysconfdir@/sudo.conf file # # Format: - # Plugin plugin_name plugin_path + # Plugin plugin_name plugin_path plugin_options ... # Path askpass /path/to/askpass - # Path noexec /path/to/noexec.so + # 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 @@ -448,8 +442,9 @@ plugin. The I is the name of the C in the plugin shared object. The I may be fully qualified or relative. If not fully qualified it is relative to the F<@prefix@/libexec> directory. Any additional -parameters after the I are ignored. Lines that don't begin -with C or C are silently ignored +parameters after the I are passed as arguments to the plugin's +I function. Lines that don't begin with C, C, +C or C are silently ignored. For more information, see the L manual. @@ -486,6 +481,96 @@ Defaults to F<@noexec_file@>. =back +=head1 DEBUG FLAGS + +B versions 1.8.4 and higher support a flexible debugging +framework that can help track down what B is doing internally +if there is a problem. + +A C line consists of the C keyword, followed by the +name of the program to debug (B, B, B), +the debug file name and a comma-separated list of debug flags. +The debug flag syntax used by B and the I plugin is +I@I but the plugin is free to use a different +format so long as it does not include a command C<,>. + +For instance: + + Debug sudo /var/log/sudo_debug all@warn,plugin@info + +would log all debugging statements at the I level and higher +in addition to those at the I level for the plugin subsystem. + +Currently, only one C entry per program is supported. The +C C entry is shared by the B front end, B +and the plugins. A future release may add support for per-plugin +C lines and/or support for multiple debugging files for a +single program. + +The priorities used by the B front end, in order of decreasing +severity, are: I, I, I, I, I, I, +I and I. Each priority, when specified, also includes +all priorities higher than it. For example, a priority of I +would include debug messages logged at I and higher. + +The following subsystems are used by B: + +=over 10 + +=item I + +matches every subsystem + +=item I + +command line argument processing + +=item I + +user conversation + +=item I + +sudoedit + +=item I + +command execution + +=item I
+ +B main function + +=item I + +network interface handling + +=item I + +communication with the plugin + +=item I + +plugin configuration + +=item I + +pseudo-tty related code + +=item I + +SELinux-specific handling + +=item I + +utility functions + +=item I + +utmp handling + +=back + =head1 RETURN VALUES Upon successful execution of a program, the exit status from B @@ -525,6 +610,20 @@ commands via B to verify that the command does n give the user an effective root shell. For more information, please see the C section in L. +To prevent the disclosure of potentially sensitive information, +B disables core dumps by default while it is executing (they +are re-enabled for the command that is run). To aid in debugging +B crashes, you may wish to re-enable core dumps by setting +"disable_coredump" to false in the F<@sysconfdir@/sudo.conf> file. + + Set disable_coredump false + +Note that by default, most operating systems disable core dumps +from setuid programs, which includes B. To actually get a +B 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. + =head1 ENVIRONMENT B utilizes the following environment variables. The security @@ -607,7 +706,7 @@ is not set =item F<@sysconfdir@/sudo.conf> -B plugin and path configuration +B front end configuration =back @@ -659,9 +758,14 @@ version consists of code written primarily by: Todd C. Miller -See the HISTORY file in the B distribution or visit -http://www.sudo.ws/sudo/history.html for a short history -of B. +See the CONTRIBUTORS file in the B distribution +(http://www.sudo.ws/sudo/contributors.html) for a list of people +who have contributed to B. + +=head1 HISTORY + +See the HISTORY file in the B distribution +(http://www.sudo.ws/sudo/history.html) for a brief history of sudo. =head1 CAVEATS