]> granicus.if.org Git - sudo/commitdiff
Clear up confusion wrt sudo's return value.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 1 Apr 2000 21:22:11 +0000 (21:22 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 1 Apr 2000 21:22:11 +0000 (21:22 +0000)
sudo.cat
sudo.man.in
sudo.pod

index 93c05d2df65b0472a74c1cf3da80e0e06e587348..b0c32c8b2b1ddd97b3ac928c868c10106602baf0 100644 (file)
--- a/sudo.cat
+++ b/sudo.cat
@@ -61,7 +61,7 @@ O\bO\bO\bOP\bP\bP\bPT\bT\bT\bTI\bI\bI\bIO\bO\bO\bON\bN\bN\bNS\bS\bS\bS
 
 
 
-26/Mar/2000                   1.6.3                             1
+28/Mar/2000                   1.6.3                             1
 
 
 
@@ -127,7 +127,7 @@ sudo(1m)               MAINTENANCE COMMANDS              sudo(1m)
 
 
 
-26/Mar/2000                   1.6.3                             2
+28/Mar/2000                   1.6.3                             2
 
 
 
@@ -149,18 +149,22 @@ sudo(1m)               MAINTENANCE COMMANDS              sudo(1m)
            conjunction with the -s flag.
 
 R\bR\bR\bRE\bE\bE\bET\bT\bT\bTU\bU\bU\bUR\bR\bR\bRN\bN\bN\bN V\bV\bV\bVA\bA\bA\bAL\bL\bL\bLU\bU\bU\bUE\bE\bE\bES\bS\bS\bS
-       s\bs\bs\bsu\bu\bu\bud\bd\bd\bdo\bo\bo\bo quits with an exit value of 1 if there is a
-       configuration/permission problem or if s\bs\bs\bsu\bu\bu\bud\bd\bd\bdo\bo\bo\bo cannot execute
-       the given command.  In the latter case the error string is
-       printed to stderr.  If s\bs\bs\bsu\bu\bu\bud\bd\bd\bdo\bo\bo\bo cannot _\bs_\bt_\ba_\bt(2) one or more
-       entries in the user's PATH an error is printed on stderr.
-       (If the directory does not exist or if it is not really a
-       directory, the entry is ignored and no error is printed.)
-       This should not happen under normal circumstances.  The
-       most common reason for _\bs_\bt_\ba_\bt(2) to return "permission
-       denied" is if you are running an automounter and one of
-       the directories in your PATH is on a machine that is
-       currently unreachable.
+       Upon successful execution of a program, the return value
+       from s\bs\bs\bsu\bu\bu\bud\bd\bd\bdo\bo\bo\bo will simply be the return value of the program
+       that was executed.
+
+       Otherwise, s\bs\bs\bsu\bu\bu\bud\bd\bd\bdo\bo\bo\bo quits with an exit value of 1 if there is
+       a configuration/permission problem or if s\bs\bs\bsu\bu\bu\bud\bd\bd\bdo\bo\bo\bo cannot
+       execute the given command.  In the latter case the error
+       string is printed to stderr.  If s\bs\bs\bsu\bu\bu\bud\bd\bd\bdo\bo\bo\bo cannot _\bs_\bt_\ba_\bt(2) one
+       or more entries in the user's PATH an error is printed on
+       stderr.  (If the directory does not exist or if it is not
+       really a directory, the entry is ignored and no error is
+       printed.)  This should not happen under normal
+       circumstances.  The most common reason for _\bs_\bt_\ba_\bt(2) to
+       return "permission denied" is if you are running an
+       automounter and one of the directories in your PATH is on
+       a machine that is currently unreachable.
 
 S\bS\bS\bSE\bE\bE\bEC\bC\bC\bCU\bU\bU\bUR\bR\bR\bRI\bI\bI\bIT\bT\bT\bTY\bY\bY\bY N\bN\bN\bNO\bO\bO\bOT\bT\bT\bTE\bE\bE\bES\bS\bS\bS
        s\bs\bs\bsu\bu\bu\bud\bd\bd\bdo\bo\bo\bo tries to be safe when executing external commands.
@@ -186,14 +190,10 @@ S\bS\bS\bSE\bE\bE\bEC\bC\bC\bCU\bU\bU\bUR\bR\bR\bRI\bI\bI\bIT\bT\bT\bTY\bY\bY\bY N\bN\bN\bNO\bO\bO\bOT\bT\bT\bTE\b
        option that disables this behavior or link s\bs\bs\bsu\bu\bu\bud\bd\bd\bdo\bo\bo\bo
        statically.
 
-       s\bs\bs\bsu\bu\bu\bud\bd\bd\bdo\bo\bo\bo will check the ownership of its timestamp directory
-       (_\b/_\bv_\ba_\br_\b/_\br_\bu_\bn_\b/_\bs_\bu_\bd_\bo by default) and ignore the directory's
-       contents if it is not owned by root and only writable by
-       root.  On systems that allow non-root users to give away
 
 
 
-26/Mar/2000                   1.6.3                             3
+28/Mar/2000                   1.6.3                             3
 
 
 
@@ -202,6 +202,10 @@ S\bS\bS\bSE\bE\bE\bEC\bC\bC\bCU\bU\bU\bUR\bR\bR\bRI\bI\bI\bIT\bT\bT\bTY\bY\bY\bY N\bN\bN\bNO\bO\bO\bOT\bT\bT\bTE\b
 sudo(1m)               MAINTENANCE COMMANDS              sudo(1m)
 
 
+       s\bs\bs\bsu\bu\bu\bud\bd\bd\bdo\bo\bo\bo will check the ownership of its timestamp directory
+       (_\b/_\bv_\ba_\br_\b/_\br_\bu_\bn_\b/_\bs_\bu_\bd_\bo by default) and ignore the directory's
+       contents if it is not owned by root and only writable by
+       root.  On systems that allow non-root users to give away
        files via _\bc_\bh_\bo_\bw_\bn(2), if the timestamp directory is located
        in a directory writable by anyone (eg: _\b/_\bt_\bm_\bp), it is
        possible for a user to create the timestamp directory
@@ -253,13 +257,9 @@ E\bE\bE\bEX\bX\bX\bXA\bA\bA\bAM\bM\bM\bMP\bP\bP\bPL\bL\bL\bLE\bE\bE\bES\bS\bS\bS
         % sudo sh -c "cd /home ; du -s * | sort -rn > USAGE"
 
 
-E\bE\bE\bEN\bN\bN\bNV\bV\bV\bVI\bI\bI\bIR\bR\bR\bRO\bO\bO\bON\bN\bN\bNM\bM\bM\bME\bE\bE\bEN\bN\bN\bNT\bT\bT\bT
-       s\bs\bs\bsu\bu\bu\bud\bd\bd\bdo\bo\bo\bo utilizes the following environment variables:
-
-
 
 
-26/Mar/2000                   1.6.3                             4
+28/Mar/2000                   1.6.3                             4
 
 
 
@@ -268,6 +268,9 @@ E\bE\bE\bEN\bN\bN\bNV\bV\bV\bVI\bI\bI\bIR\bR\bR\bRO\bO\bO\bON\bN\bN\bNM\bM\bM\bME\bE\bE\bEN\bN\bN\bNT\bT\bT\bT
 sudo(1m)               MAINTENANCE COMMANDS              sudo(1m)
 
 
+E\bE\bE\bEN\bN\bN\bNV\bV\bV\bVI\bI\bI\bIR\bR\bR\bRO\bO\bO\bON\bN\bN\bNM\bM\bM\bME\bE\bE\bEN\bN\bN\bNT\bT\bT\bT
+       s\bs\bs\bsu\bu\bu\bud\bd\bd\bdo\bo\bo\bo utilizes the following environment variables:
+
         PATH                   Set to a sane value if SECURE_PATH is set
         SHELL                  Used to determine shell to run with -s option
         USER                   Set to the target user (root unless the -u option
@@ -319,13 +322,10 @@ C\bC\bC\bCA\bA\bA\bAV\bV\bV\bVE\bE\bE\bEA\bA\bA\bAT\bT\bT\bTS\bS\bS\bS
        shell regardless of any '!'  elements in the user
        specification.
 
-       Running shell scripts via s\bs\bs\bsu\bu\bu\bud\bd\bd\bdo\bo\bo\bo can expose the same kernel
-       bugs that make setuid shell scripts unsafe on some
-       operating systems (if your OS supports the /dev/fd/
 
 
 
-26/Mar/2000                   1.6.3                             5
+28/Mar/2000                   1.6.3                             5
 
 
 
@@ -334,6 +334,9 @@ C\bC\bC\bCA\bA\bA\bAV\bV\bV\bVE\bE\bE\bEA\bA\bA\bAT\bT\bT\bTS\bS\bS\bS
 sudo(1m)               MAINTENANCE COMMANDS              sudo(1m)
 
 
+       Running shell scripts via s\bs\bs\bsu\bu\bu\bud\bd\bd\bdo\bo\bo\bo can expose the same kernel
+       bugs that make setuid shell scripts unsafe on some
+       operating systems (if your OS supports the /dev/fd/
        directory, setuid shell scripts are generally safe).
 
 S\bS\bS\bSE\bE\bE\bEE\bE\bE\bE A\bA\bA\bAL\bL\bL\bLS\bS\bS\bSO\bO\bO\bO
@@ -388,9 +391,6 @@ S\bS\bS\bSE\bE\bE\bEE\bE\bE\bE A\bA\bA\bAL\bL\bL\bLS\bS\bS\bSO\bO\bO\bO
 
 
 
-
-
-
-26/Mar/2000                   1.6.3                             6
+28/Mar/2000                   1.6.3                             6
 
 
index 2f1f24cf06bf06b666b6f25e54aae92958980809..ae38e71e10aec86f3603558cbba9dbb2da5a9b97 100644 (file)
@@ -2,8 +2,8 @@
 ''' $RCSfile$$Revision$$Date$
 '''
 ''' $Log$
-''' Revision 1.3  2000/03/27 03:26:23  millert
-''' Use @mansectsu@ and @mansectform@ in the man page bodies as well.
+''' Revision 1.4  2000/04/01 21:22:11  millert
+''' Clear up confusion wrt sudo's return value.
 '''
 '''
 .de Sh
@@ -96,7 +96,7 @@
 .nr % 0
 .rr F
 .\}
-.TH sudo @mansectsu@ "1.6.3" "26/Mar/2000" "MAINTENANCE COMMANDS"
+.TH sudo @mansectsu@ "1.6.3" "28/Mar/2000" "MAINTENANCE COMMANDS"
 .UC
 .if n .hy 0
 .if n .na
@@ -294,7 +294,10 @@ standard input instead of the terminal device.
 The \f(CW--\fR flag indicates that \fBsudo\fR should stop processing command
 line arguments.  It is most useful in conjunction with the \f(CW-s\fR flag.
 .SH "RETURN VALUES"
-\fBsudo\fR quits with an exit value of 1 if there is a
+Upon successful execution of a program, the return value from \fBsudo\fR
+will simply be the return value of the program that was executed.
+.PP
+Otherwise, \fBsudo\fR quits with an exit value of 1 if there is a
 configuration/permission problem or if \fBsudo\fR cannot execute the
 given command.  In the latter case the error string is printed to
 stderr.  If \fBsudo\fR cannot \fIstat\fR\|(2) one or more entries in the user's
index 7e51ded11df62fc22d367cfa64ccc7d354066dd7..1ad9deed1f6aad5ba8e415e6a5fc192a863bc76d 100644 (file)
--- a/sudo.pod
+++ b/sudo.pod
@@ -182,7 +182,10 @@ line arguments.  It is most useful in conjunction with the C<-s> flag.
 
 =head1 RETURN VALUES
 
-B<sudo> quits with an exit value of 1 if there is a
+Upon successful execution of a program, the return value from B<sudo>
+will simply be the return value of the program that was executed.
+
+Otherwise, B<sudo> quits with an exit value of 1 if there is a
 configuration/permission problem or if B<sudo> cannot execute the
 given command.  In the latter case the error string is printed to
 stderr.  If B<sudo> cannot stat(2) one or more entries in the user's