]> granicus.if.org Git - sudo/commitdiff
o /etc/stmp -> /etc/sudoers.tmp since solaris uses stmp as shadow temp file
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 6 Aug 1999 09:37:03 +0000 (09:37 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 6 Aug 1999 09:37:03 +0000 (09:37 +0000)
o _PATH_SUDO_SUDOERS -> _PATH_SUDOERS and _PATH_SUDO_STMP -> _PATH_SUDOERS_TMP

Makefile.in
TROUBLESHOOTING
parse.c
pathnames.h.in
sudo.c
visudo.c
visudo.cat
visudo.html
visudo.man
visudo.pod

index 0c00c937cdfbc07b4f6c5aa6ff3677f4edda41d7..575cc6d57a165626035d98c618ae7a406b692efc 100644 (file)
@@ -100,7 +100,7 @@ sudoers_gid = @SUDOERS_GID@
 sudoers_mode = @SUDOERS_MODE@
 
 # Pass in paths and uid/gid + OS dependent defined
-DEFS = @OSDEFS@ -D_PATH_SUDO_SUDOERS=\"$(sudoersdir)/sudoers\" -D_PATH_SUDO_STMP=\"$(sudoersdir)/stmp\" -DSUDOERS_UID=$(sudoers_uid) -DSUDOERS_GID=$(sudoers_gid) -DSUDOERS_MODE=$(sudoers_mode)
+DEFS = @OSDEFS@ -D_PATH_SUDOERS=\"$(sudoersdir)/sudoers\" -D_PATH_SUDOERS_TMP=\"$(sudoersdir)/sudoers.tmp\" -DSUDOERS_UID=$(sudoers_uid) -DSUDOERS_GID=$(sudoers_gid) -DSUDOERS_MODE=$(sudoers_mode)
 
 #### End of system configuration section. ####
 
index daab4032c88c82355b2ad835a224c7a05e5cefa2..1f68b4569f8db07244323761fae52c38152ea2d7 100644 (file)
@@ -121,7 +121,7 @@ A) You probably didn't install the gcc-fixed include files.
 Q) When I run "visudo" it says "sudoers file busy, try again later."
    and doesn't do anything.
 A) You have a stale sudoers temporary file.  The default location is
-   /etc/stmp.  If you delete this file visudo will be happy again,
+   /etc/sudoers.tmp.  If you delete this file visudo will be happy again,
    but make sure to check that no one else is running visudo at
    the time.
 
diff --git a/parse.c b/parse.c
index 005958b5ed7e005b8a47fdead9968e1c3ddfbb78..b05c6844cc362e9d2565be5cedfc59879d1618d8 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -119,7 +119,7 @@ sudoers_lookup(check_cmnd)
     /* Become sudoers file owner */
     set_perms(PERM_SUDOERS, 0);
 
-    /* We opened _PATH_SUDO_SUDOERS in check_sudoers() so just rewind it. */
+    /* We opened _PATH_SUDOERS in check_sudoers() so just rewind it. */
     rewind(sudoers_fp);
     yyin = sudoers_fp;
     yyout = stdout;
index 009eff9cf77dd4414393b10c6d0fef0dd3d96c0e..30e0f71b992b16ba7f369b9a96195a8130820440 100644 (file)
 #endif /* _PATH_TTY */
 
 /*
- * NOTE: _PATH_SUDO_SUDOERS is usually overriden by the Makefile.
+ * NOTE: _PATH_SUDOERS is usually overriden by the Makefile.
  */
-#ifndef _PATH_SUDO_SUDOERS
-#define _PATH_SUDO_SUDOERS     "/etc/sudoers"
-#endif /* _PATH_SUDO_SUDOERS */
+#ifndef _PATH_SUDOERS
+#define _PATH_SUDOERS          "/etc/sudoers"
+#endif /* _PATH_SUDOERS */
 
 /*
- * NOTE:  _PATH_SUDO_STMP is usually overriden by the Makefile.
- *        _PATH_SUDO_STMP *MUST* be on the same partition
- *        as _PATH_SUDO_SUDOERS!
+ * NOTE:  _PATH_SUDOERS_TMP is usually overriden by the Makefile.
+ *        _PATH_SUDOERS_TMP *MUST* be on the same partition
+ *        as _PATH_SUDOERS!
  */
-#ifndef _PATH_SUDO_STMP
-#define _PATH_SUDO_STMP                "/etc/stmp"
-#endif /* _PATH_SUDO_STMP */
+#ifndef _PATH_SUDOERS_TMP
+#define _PATH_SUDOERS_TMP      "/etc/sudoers.tmp"
+#endif /* _PATH_SUDOERS_TMP */
 
 /*
  * The following paths are controlled via the configure script.
diff --git a/sudo.c b/sudo.c
index 0e100d0618413243b91c569a046136638bbe9e02..435aa47c40e7afda9837462a7d6c5c76a6905c24 100644 (file)
--- a/sudo.c
+++ b/sudo.c
@@ -251,7 +251,7 @@ main(argc, argv)
 
     set_perms(PERM_USER, sudo_mode);
 
-    check_sudoers();   /* check mode/owner on _PATH_SUDO_SUDOERS */
+    check_sudoers();   /* check mode/owner on _PATH_SUDOERS */
 
     if (sudo_mode == MODE_KILL || sudo_mode == MODE_INVALIDATE) {
        remove_timestamp((sudo_mode == MODE_KILL));
@@ -359,7 +359,7 @@ main(argc, argv)
 #endif /* DONT_LEAK_PATH_INFO */
 
        case VALIDATE_ERROR:
-           log_error(0, "parse error in %s around line %d", _PATH_SUDO_SUDOERS,
+           log_error(0, "parse error in %s around line %d", _PATH_SUDOERS,
                errorlineno);
            break;
 
@@ -765,26 +765,26 @@ check_sudoers()
      * Only works if filesystem is readable/writable by root.
      */
     set_perms(PERM_ROOT, 0);
-    if ((rootstat = lstat(_PATH_SUDO_SUDOERS, &statbuf)) == 0 &&
+    if ((rootstat = lstat(_PATH_SUDOERS, &statbuf)) == 0 &&
        SUDOERS_UID == statbuf.st_uid && SUDOERS_MODE != 0400 &&
        (statbuf.st_mode & 0007777) == 0400) {
 
-       if (chmod(_PATH_SUDO_SUDOERS, SUDOERS_MODE) == 0) {
+       if (chmod(_PATH_SUDOERS, SUDOERS_MODE) == 0) {
            (void) fprintf(stderr, "%s: fixed mode on %s\n",
-               Argv[0], _PATH_SUDO_SUDOERS);
+               Argv[0], _PATH_SUDOERS);
            if (statbuf.st_gid != SUDOERS_GID) {
-               if (!chown(_PATH_SUDO_SUDOERS,(uid_t) -1,SUDOERS_GID)) {
+               if (!chown(_PATH_SUDOERS,(uid_t) -1,SUDOERS_GID)) {
                    (void) fprintf(stderr, "%s: set group on %s\n",
-                       Argv[0], _PATH_SUDO_SUDOERS);
+                       Argv[0], _PATH_SUDOERS);
                    statbuf.st_gid = SUDOERS_GID;
                } else {
                    (void) fprintf(stderr,"%s: Unable to set group on %s: %s\n",
-                       Argv[0], _PATH_SUDO_SUDOERS, strerror(errno));
+                       Argv[0], _PATH_SUDOERS, strerror(errno));
                }
            }
        } else {
            (void) fprintf(stderr, "%s: Unable to fix mode on %s: %s\n",
-               Argv[0], _PATH_SUDO_SUDOERS, strerror(errno));
+               Argv[0], _PATH_SUDOERS, strerror(errno));
        }
     }
 
@@ -795,24 +795,24 @@ check_sudoers()
      */
     set_perms(PERM_SUDOERS, 0);
 
-    if (rootstat != 0 && lstat(_PATH_SUDO_SUDOERS, &statbuf) != 0)
-       log_error(USE_ERRNO, "can't stat %s", _PATH_SUDO_SUDOERS);
+    if (rootstat != 0 && lstat(_PATH_SUDOERS, &statbuf) != 0)
+       log_error(USE_ERRNO, "can't stat %s", _PATH_SUDOERS);
     else if (!S_ISREG(statbuf.st_mode))
-       log_error(0, "%s is not a regular file", _PATH_SUDO_SUDOERS);
+       log_error(0, "%s is not a regular file", _PATH_SUDOERS);
     else if ((statbuf.st_mode & 07777) != SUDOERS_MODE)
-       log_error(0, "%s is mode 0%o, should be 0%o", _PATH_SUDO_SUDOERS,
+       log_error(0, "%s is mode 0%o, should be 0%o", _PATH_SUDOERS,
            (statbuf.st_mode & 07777), SUDOERS_MODE);
     else if (statbuf.st_uid != SUDOERS_UID)
-       log_error(0, "%s is owned by uid %ld, should be %d", _PATH_SUDO_SUDOERS,
+       log_error(0, "%s is owned by uid %ld, should be %d", _PATH_SUDOERS,
            (long) statbuf.st_uid, SUDOERS_UID);
     else if (statbuf.st_gid != SUDOERS_GID)
-       log_error(0, "%s is owned by gid %ld, should be %d", _PATH_SUDO_SUDOERS,
+       log_error(0, "%s is owned by gid %ld, should be %d", _PATH_SUDOERS,
            (long) statbuf.st_gid, SUDOERS_GID);
     else {
        /* Solaris sometimes returns EAGAIN so try 10 times */
        for (i = 0; i < 10 ; i++) {
            errno = 0;
-           if ((sudoers_fp = fopen(_PATH_SUDO_SUDOERS, "r")) == NULL ||
+           if ((sudoers_fp = fopen(_PATH_SUDOERS, "r")) == NULL ||
                fread(&c, sizeof(c), 1, sudoers_fp) != 1) {
                sudoers_fp = NULL;
                if (errno != EAGAIN && errno != EWOULDBLOCK)
@@ -822,7 +822,7 @@ check_sudoers()
            sleep(1);
        }
        if (sudoers_fp == NULL)
-           log_error(USE_ERRNO, "can't open %s", _PATH_SUDO_SUDOERS);
+           log_error(USE_ERRNO, "can't open %s", _PATH_SUDOERS);
     }
 
     set_perms(PERM_ROOT, 0);
index 6f50c17d29f059ab1caff93d552386a92d693b37..491e4e85a5f6f37e3ce94187fb2ceb7b0858322a 100644 (file)
--- a/visudo.c
+++ b/visudo.c
@@ -108,8 +108,8 @@ extern int errorlineno;
 char **Argv;
 char **NewArgv = NULL;
 int NewArgc = 0;
-char *sudoers = _PATH_SUDO_SUDOERS;
-char *stmp = _PATH_SUDO_STMP;
+char *sudoers = _PATH_SUDOERS;
+char *stmp = _PATH_SUDOERS_TMP;
 struct sudo_user sudo_user;
 int parse_error = FALSE;
 
index 7a44e38714bc76b6b52e22c7ce9e87ad648da626..662fafafa8bbebd767bc91fa9ddc5b0ea150fc0a 100644 (file)
@@ -46,10 +46,10 @@ O\bO\bO\bOP\bP\bP\bPT\bT\bT\bTI\bI\bI\bIO\bO\bO\bON\bN\bN\bNS\bS\bS\bS
 E\bE\bE\bER\bR\bR\bRR\bR\bR\bRO\bO\bO\bOR\bR\bR\bRS\bS\bS\bS
        sudoers file busy, try again later.
            Either someone is currently editing the _\bs_\bu_\bd_\bo_\be_\br_\bs file
-           or there is a stale sudoers lock file (/etc/stmp by
-           default) that you need to delete.
+           or there is a stale sudoers lock file
+           (/etc/sudoers.tmp by default) that you need to delete.
 
-       /etc/stmp: Permission denied
+       /etc/sudoers.tmp: Permission denied
            You didn't run v\bv\bv\bvi\bi\bi\bis\bs\bs\bsu\bu\bu\bud\bd\bd\bdo\bo\bo\bo as root.
 
        Can't find you in the passwd database
@@ -57,11 +57,11 @@ E\bE\bE\bER\bR\bR\bRR\bR\bR\bRO\bO\bO\bOR\bR\bR\bRS\bS\bS\bS
 
 F\bF\bF\bFI\bI\bI\bIL\bL\bL\bLE\bE\bE\bES\bS\bS\bS
         /etc/sudoers           List of who can run what
-        /etc/stmp              Lock file for visudo
+        /etc/sudoers.tmp       Lock file for visudo
 
 
 
-1/Aug/1999                     1.6                              1
+6/Aug/1999                     1.6                              1
 
 
 
@@ -127,7 +127,7 @@ S\bS\bS\bSE\bE\bE\bEE\bE\bE\bE A\bA\bA\bAL\bL\bL\bLS\bS\bS\bSO\bO\bO\bO
 
 
 
-1/Aug/1999                     1.6                              2
+6/Aug/1999                     1.6                              2
 
 
 
@@ -193,6 +193,6 @@ VISUDO(8)              MAINTENANCE COMMANDS             VISUDO(8)
 
 
 
-1/Aug/1999                     1.6                              3
+6/Aug/1999                     1.6                              3
 
 
index 7fbc652630d42ca92b9b6eae08a60dd05bfd54d2..f8673ae7f75f88145f085c5cff288f822205322b 100644 (file)
@@ -77,10 +77,10 @@ The <CODE>-V</CODE> (version) option causes <STRONG>visudo</STRONG> to print the
 <DL>
 <DT><STRONG><A NAME="item_sudoers">sudoers file busy, try again later.</A></STRONG><DD>
 <P>
-Either someone is currently editing the <EM>sudoers</EM> file or there is a stale sudoers lock file (/etc/stmp by default) that you
-need to delete.
+Either someone is currently editing the <EM>sudoers</EM> file or there is a stale sudoers lock file (/etc/sudoers.tmp by default)
+that you need to delete.
 
-<DT><STRONG><A NAME="item__etc_stmp_">/etc/stmp: Permission denied</A></STRONG><DD>
+<DT><STRONG><A NAME="item__etc_sudoers_tmp_">/etc/sudoers.tmp: Permission denied</A></STRONG><DD>
 <P>
 You didn't run <STRONG>visudo</STRONG> as root.
 
@@ -90,17 +90,17 @@ Your userid does not appear in the passwd file.
 
 <H1><A NAME="FILES">FILES</A></H1>
 <P>
-<PRE> /etc/sudoers           file of authorized users.
- /etc/stmp              lock file for visudo.
+<PRE> /etc/sudoers           List of who can run what
+ /etc/sudoers.tmp       Lock file for visudo
 </PRE>
 <H1><A NAME="ENVIRONMENT_VARIABLES">ENVIRONMENT VARIABLES</A></H1>
 <P>
-The following are used only if <STRONG>visudo</STRONG> was compiled with the
-<EM>ENV_EDITOR</EM> option:
+The following are used only if <STRONG>visudo</STRONG> was configured with the
+<EM>--with-env-editor</EM> option:
 
 <P>
-<PRE> EDITOR                 Used by visudo as the editor to use.
- VISUAL                 Used by visudo if EDITOR is not set.
+<PRE> EDITOR                 Used by visudo as the editor to use
+ VISUAL                 Used by visudo if EDITOR is not set
 </PRE>
 <H1><A NAME="AUTHOR">AUTHOR</A></H1>
 <P>
@@ -115,18 +115,19 @@ See the HISTORY file in the sudo distribution for more details.
 
 <P>
 Please send all bugs, comments, and changes to <A
-HREF="mailto:sudo-bugs@courtesan.com.">sudo-bugs@courtesan.com.</A>
+HREF="mailto:sudo-bugs@courtesan.com.">sudo-bugs@courtesan.com.</A> Be sure
+to include the version of <STRONG>sudo</STRONG> you are using and the platform you are running it on.
 
 <H1><A NAME="DISCLAIMER">DISCLAIMER</A></H1>
 <P>
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE file distributed with
-sudo for more details.
+<STRONG>Visudo</STRONG> is provided ``AS IS'' and any express or implied warranties, including, but
+not limited to, the implied warranties of merchantability and fitness for a
+particular purpose are disclaimed. See the LICENSE file distributed with <STRONG>sudo</STRONG> for complete details.
 
 <H1><A NAME="CAVEATS">CAVEATS</A></H1>
 <P>
-Due to the syntax of the <EM>sudoers</EM> file, there is no way for <STRONG>visudo</STRONG> to tell the difference between a mistyped {Host,User,Cmnd}_Alias and a user
+Due to the syntax of the <EM>sudoers</EM> file, there is no way for
+<STRONG>visudo</STRONG> to tell the difference between a mistyped {Host,User,Cmnd}_Alias and a user
 or host name.
 
 <P>
index b928e59bc9c3614435e2ac2029697e56b81dcf70..ba1542b13332cfa302b0db1a2102a600846304d3 100644 (file)
@@ -2,8 +2,9 @@
 ''' $RCSfile$$Revision$$Date$
 '''
 ''' $Log$
-''' Revision 1.8  1999/08/01 16:26:16  millert
-''' regen
+''' Revision 1.9  1999/08/06 09:37:02  millert
+''' o /etc/stmp -> /etc/sudoers.tmp since solaris uses stmp as shadow temp file
+''' o _PATH_SUDO_SUDOERS -> _PATH_SUDOERS and _PATH_SUDO_STMP -> _PATH_SUDOERS_TMP
 '''
 '''
 .de Sh
@@ -96,7 +97,7 @@
 .nr % 0
 .rr F
 .\}
-.TH VISUDO 8 "1.6" "1/Aug/1999" "MAINTENANCE COMMANDS"
+.TH VISUDO 8 "1.6" "6/Aug/1999" "MAINTENANCE COMMANDS"
 .UC
 .if n .hy 0
 .if n .na
@@ -226,9 +227,9 @@ and exit.
 .SH "ERRORS"
 .Ip "sudoers file busy, try again later." 4
 Either someone is currently editing the \fIsudoers\fR file
-or there is a stale sudoers lock file (/etc/stmp by default)
+or there is a stale sudoers lock file (/etc/sudoers.tmp by default)
 that you need to delete.
-.Ip "/etc/stmp: Permission denied" 4
+.Ip "/etc/sudoers.tmp: Permission denied" 4
 You didn't run \fBvisudo\fR as root.
 .Ip "Can't find you in the passwd database" 4
 Your userid does not appear in the passwd file.
@@ -236,7 +237,7 @@ Your userid does not appear in the passwd file.
 .Sp
 .Vb 2
 \& /etc/sudoers           List of who can run what
-\& /etc/stmp              Lock file for visudo
+\& /etc/sudoers.tmp       Lock file for visudo
 .Ve
 .SH "ENVIRONMENT VARIABLES"
 The following are used only if \fBvisudo\fR was configured with the
@@ -294,7 +295,7 @@ the individual \fBvisudo\fR program.
 
 .IX Item "sudoers file busy, try again later."
 
-.IX Item "/etc/stmp: Permission denied"
+.IX Item "/etc/sudoers.tmp: Permission denied"
 
 .IX Item "Can't find you in the passwd database"
 
index 14947a6c91c9058e005928877a8f2c0ad55d85cf..60fd0223acba26392f9814ce3058d87b8a4de6bf 100644 (file)
@@ -89,10 +89,10 @@ and exit.
 =item sudoers file busy, try again later.
 
 Either someone is currently editing the I<sudoers> file
-or there is a stale sudoers lock file (/etc/stmp by default)
+or there is a stale sudoers lock file (/etc/sudoers.tmp by default)
 that you need to delete.
 
-=item /etc/stmp: Permission denied
+=item /etc/sudoers.tmp: Permission denied
 
 You didn't run B<visudo> as root.
 
@@ -103,7 +103,7 @@ Your userid does not appear in the passwd file.
 =head1 FILES
 
  /etc/sudoers          List of who can run what
- /etc/stmp             Lock file for visudo
+ /etc/sudoers.tmp      Lock file for visudo
 
 =head1 ENVIRONMENT VARIABLES