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