Blame SOURCES/sendmail-8.14.3-smrsh_paths.patch

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