Blame SOURCES/sendmail-8.14.3-smrsh_paths.patch

f67e08
diff -up sendmail-8.14.3/smrsh/README.smrsh_paths sendmail-8.14.3/smrsh/README
f67e08
--- sendmail-8.14.3/smrsh/README.smrsh_paths	2008-02-12 17:40:06.000000000 +0100
f67e08
+++ sendmail-8.14.3/smrsh/README	2008-07-15 14:40:36.000000000 +0200
f67e08
@@ -6,7 +6,7 @@ Software Engineering Institute, Carnegie
f67e08
 intended as a supplement to the CERT advisory CA-93:16.sendmail.vulnerability,
f67e08
 and to the software, smrsh.c, written by Eric Allman.
f67e08
 
f67e08
-
f67e08
+* Modified by Red Hat, Inc., to reflect different paths. *
f67e08
 
f67e08
 The smrsh(8) program is intended as a replacement for /bin/sh in the
f67e08
 program mailer definition of sendmail(8).  This README file describes
f67e08
@@ -56,15 +56,15 @@ These can be added to the devtools/Site/
f67e08
 global M4 macro confENVDEF or the smrsh specific M4 macro
f67e08
 conf_smrsh_ENVDEF.
f67e08
 
f67e08
-As root, install smrsh in /usr/libexec.  Using the Build script:
f67e08
+As root, install smrsh in /usr/sbin.  Using the Build script:
f67e08
 
f67e08
 	host.domain# sh ./Build install
f67e08
 
f67e08
-For manual installation: install smrsh in the /usr/libexec
f67e08
+For manual installation: install smrsh in the /usr/sbin
f67e08
 directory, with mode 511.
f67e08
 
f67e08
-	host.domain# mv smrsh /usr/libexec
f67e08
-	host.domain# chmod 511 /usr/libexec/smrsh
f67e08
+	host.domain# mv smrsh /usr/sbin
f67e08
+	host.domain# chmod 511 /usr/sbin/smrsh
f67e08
 
f67e08
 
f67e08
 
f67e08
@@ -86,7 +86,7 @@ perl(1), uudecode(1) or the stream edito
f67e08
 acceptable commands.
f67e08
 
f67e08
 If your platform doesn't have a default SMRSH_CMDDIR setting, you will
f67e08
-next need to create the directory /usr/adm/sm.bin and populate
f67e08
+next need to create the directory /etc/smrsh and populate
f67e08
 it with the programs that your site feels are allowable for sendmail
f67e08
 to execute.   This directory is explicitly specified in the source
f67e08
 code for smrsh, so changing this directory must be accompanied with
f67e08
@@ -95,22 +95,22 @@ a change in smrsh.c.
f67e08
 
f67e08
 You will have to be root to make these modifications.
f67e08
 
f67e08
-After creating the /usr/adm/sm.bin directory, either copy the programs
f67e08
+After creating the /etc/smrsh directory, either copy the programs
f67e08
 to the directory, or establish links to the allowable programs from
f67e08
-/usr/adm/sm.bin.  Change the file permissions, so that these programs
f67e08
+/etc/smrsh.  Change the file permissions, so that these programs
f67e08
 can not be modified by non-root users.  If you use links, you should
f67e08
 ensure that the target programs are not modifiable.
f67e08
 
f67e08
 To allow the popular vacation(1) program by creating a link in the
f67e08
-/usr/adm/sm.bin directory, you should:
f67e08
+/etc/smrsh directory, you should:
f67e08
 
f67e08
-	host.domain# cd /usr/adm/sm.bin
f67e08
+	host.domain# cd /etc/smrsh
f67e08
 	host.domain# ln -s /usr/ucb/vacation vacation
f67e08
 
f67e08
 
f67e08
 
f67e08
 
f67e08
-After populating the /usr/adm/sm.bin directory, you can now configure
f67e08
+After populating the /etc/smrsh directory, you can now configure
f67e08
 sendmail to use the restricted shell.  Save the current sendmail.cf
f67e08
 file prior to modifying it, as a prudent precaution.
f67e08
 
f67e08
@@ -125,7 +125,7 @@ help to locate it.
f67e08
 
f67e08
 In order to configure sendmail to use smrsh, you must modify the Mprog
f67e08
 definition in the sendmail.cf file, by replacing the /bin/sh specification
f67e08
-with /usr/libexec/smrsh.
f67e08
+with /usr/sbin/smrsh.
f67e08
 
f67e08
 As an example:
f67e08
 
f67e08
@@ -133,14 +133,14 @@ In most Sun Microsystems' sendmail.cf fi
f67e08
 Mprog,	P=/bin/sh,   F=lsDFMeuP,  S=10, R=20, A=sh -c $u
f67e08
 
f67e08
 which should be changed to:
f67e08
-Mprog,	P=/usr/libexec/smrsh,   F=lsDFMeuP,  S=10, R=20, A=sh -c $u
f67e08
-          ^^^^^^^^^^^^^^^^^^
f67e08
+Mprog,	P=/usr/sbin/smrsh,   F=lsDFMeuP,  S=10, R=20, A=sh -c $u
f67e08
+         ^^^^^^^^^^^^^^^^
f67e08
 
f67e08
 A more generic line may be:
f67e08
 Mprog,		P=/bin/sh, F=lsDFM, A=sh -c $u
f67e08
 
f67e08
 and should be changed to;
f67e08
-Mprog,		P=/usr/libexec/smrsh, F=lsDFM, A=sh -c $u
f67e08
+Mprog,		P=/usr/sbin/smrsh, F=lsDFM, A=sh -c $u
f67e08
 
f67e08
 
f67e08
 After modifying the Mprog definition in the sendmail.cf file, if a frozen
f67e08
@@ -151,7 +151,7 @@ or /etc/mail directories.  The specific 
f67e08
 a search of the strings(1) output of the sendmail binary.
f67e08
 
f67e08
 In order to create a new frozen configuration, if it is required:
f67e08
-	host.domain# /usr/lib/sendmail -bz
f67e08
+	host.domain# /usr/sbin/sendmail -bz
f67e08
 
f67e08
 Now re-start the sendmail process.  An example of how to do this on
f67e08
 a typical system follows:
f67e08
diff -up sendmail-8.14.3/smrsh/smrsh.8.smrsh_paths sendmail-8.14.3/smrsh/smrsh.8
f67e08
--- sendmail-8.14.3/smrsh/smrsh.8.smrsh_paths	2004-08-06 05:55:35.000000000 +0200
f67e08
+++ sendmail-8.14.3/smrsh/smrsh.8	2008-07-15 14:38:07.000000000 +0200
f67e08
@@ -39,7 +39,7 @@ Briefly,
f67e08
 .I smrsh
f67e08
 limits programs to be in a single directory,
f67e08
 by default
f67e08
-/usr/adm/sm.bin,
f67e08
+/etc/smrsh,
f67e08
 allowing the system administrator to choose the set of acceptable commands,
f67e08
 and to the shell builtin commands ``exec'', ``exit'', and ``echo''.
f67e08
 It also rejects any commands with the characters
f67e08
@@ -56,10 +56,10 @@ so forwarding to ``/usr/ucb/vacation'',
f67e08
 and
f67e08
 ``vacation''
f67e08
 all actually forward to
f67e08
-``/usr/adm/sm.bin/vacation''.
f67e08
+``/etc/smrsh/vacation''.
f67e08
 .PP
f67e08
 System administrators should be conservative about populating
f67e08
-the sm.bin directory.
f67e08
+the /etc/smrsh directory.
f67e08
 For example, a reasonable additions is
f67e08
 .IR vacation (1),
f67e08
 and the like.
f67e08
@@ -68,7 +68,7 @@ never include any shell or shell-like pr
f67e08
 (such as
f67e08
 .IR perl (1))
f67e08
 in the
f67e08
-sm.bin
f67e08
+/etc/smrsh
f67e08
 directory.
f67e08
 Note that this does not restrict the use of shell or perl scripts
f67e08
 in the sm.bin directory (using the ``#!'' syntax);
f67e08
@@ -79,20 +79,7 @@ is a very bad idea.
f67e08
 .IR procmail (1)
f67e08
 allows users to run arbitrary programs in their
f67e08
 .IR procmailrc (5).
f67e08
-.SH COMPILATION
f67e08
-Compilation should be trivial on most systems.
f67e08
-You may need to use \-DSMRSH_PATH=\e"\fIpath\fP\e"
f67e08
-to adjust the default search path
f67e08
-(defaults to ``/bin:/usr/bin:/usr/ucb'')
f67e08
-and/or \-DSMRSH_CMDDIR=\e"\fIdir\fP\e"
f67e08
-to change the default program directory
f67e08
-(defaults to ``/usr/adm/sm.bin'').
f67e08
 .SH FILES
f67e08
-/usr/adm/sm.bin \- default directory for restricted programs on most OSs
f67e08
-.PP
f67e08
-/var/adm/sm.bin \- directory for restricted programs on HP UX and Solaris
f67e08
-.PP
f67e08
-/usr/libexec/sm.bin \- directory for restricted programs on FreeBSD (>= 3.3) and DragonFly BSD
f67e08
-
f67e08
+/etc/smrsh \- directory for restricted programs
f67e08
 .SH SEE ALSO
f67e08
 sendmail(8)
f67e08
diff -up sendmail-8.14.3/smrsh/smrsh.c.smrsh_paths sendmail-8.14.3/smrsh/smrsh.c
f67e08
--- sendmail-8.14.3/smrsh/smrsh.c.smrsh_paths	2004-08-06 20:54:22.000000000 +0200
f67e08
+++ sendmail-8.14.3/smrsh/smrsh.c	2008-07-15 14:38:07.000000000 +0200
f67e08
@@ -77,7 +77,7 @@ SM_IDSTR(id, "@(#)$Id: smrsh.c,v 8.65 20
f67e08
 # ifdef SMRSH_CMDDIR
f67e08
 #  define CMDDIR	SMRSH_CMDDIR
f67e08
 # else /* SMRSH_CMDDIR */
f67e08
-#  define CMDDIR	"/usr/adm/sm.bin"
f67e08
+#  define CMDDIR	"/etc/smrsh"
f67e08
 # endif /* SMRSH_CMDDIR */
f67e08
 #endif /* ! CMDDIR */
f67e08
 
f67e08
@@ -89,7 +89,7 @@ SM_IDSTR(id, "@(#)$Id: smrsh.c,v 8.65 20
f67e08
 # ifdef SMRSH_PATH
f67e08
 #  define PATH		SMRSH_PATH
f67e08
 # else /* SMRSH_PATH */
f67e08
-#  define PATH		"/bin:/usr/bin:/usr/ucb"
f67e08
+#  define PATH		"/bin:/usr/bin"
f67e08
 # endif /* SMRSH_PATH */
f67e08
 #endif /* ! PATH */
f67e08