]> git.pld-linux.org Git - packages/sendmail.git/blobdiff - sendmail-smrsh-paths.patch
- updated to 8.16.1 (includes security fix)
[packages/sendmail.git] / sendmail-smrsh-paths.patch
index 2f42a97e2560f5952b416e7e5beb67005145b6c6..114ff4d67ab6978773f3d2c49ce72fc7303fa038 100644 (file)
@@ -1,22 +1,33 @@
---- sendmail-8.10.0/smrsh/README.smrsh Tue Apr 27 22:26:10 1999
-+++ sendmail-8.10.0/smrsh/README       Thu Mar  9 13:21:10 2000
+--- ./smrsh/README.org Tue Sep 30 09:59:46 2003
++++ ./smrsh/README     Tue Sep 30 10:04:24 2003
 @@ -6,7 +6,7 @@
  intended as a supplement to the CERT advisory CA-93:16.sendmail.vulnerability,
  and to the software, smrsh.c, written by Eric Allman.
  
 -
-+* Modified by Red Hat Software to reflect different paths. *
++* Modified by PLD Team to reflect different paths. *
  
  The smrsh(8) program is intended as a replacement for /bin/sh in the
  program mailer definition of sendmail(8).  This README file describes
-@@ -46,15 +46,15 @@
+@@ -47,24 +47,24 @@
+ The following C defines can be set defined to change the search path and
+ the bin directory used by smrsh.
+--DSMRSH_PATH=\"path\" \"/bin:/usr/bin:/usr/ucb\"      The default search
++-DSMRSH_PATH=\"path\" \"/bin:/usr/bin:/usr/bin\"      The default search
+                                                       path.
+--DSMRSH_CMDDIR=\"dir\"        \"/usr/adm/sm.bin\"             The default smrsh
++-DSMRSH_CMDDIR=\"dir\"        \"/etc/smrsh\"          The default smrsh
+                                                       program directory
+  
+ These can be added to the devtools/Site/site.config.m4 file using the
+ global M4 macro confENVDEF or the smrsh specific M4 macro
+ conf_smrsh_ENVDEF.
  
 -As root, install smrsh in /usr/libexec.  Using the Build script:
 +As root, install smrsh in /usr/sbin.  Using the Build script:
  
-       host.domain# sh Build install
+       host.domain# sh ./Build install
  
 -For manual installation: install smrsh in the /usr/libexec
 +For manual installation: install smrsh in the /usr/sbin
  
  
  
-@@ -76,7 +76,7 @@
- acceptable commands.
+@@ -79,14 +79,14 @@
  
+ See the man page for aliases(5) if you are unfamiliar with the format of
+ these specifications. Additionally, you should include in the list,
+-popular commands such as /usr/ucb/vacation.
++popular commands such as /usr/bin/vacation.
+ You should NOT include interpreter programs such as sh(1), csh(1),
+ perl(1), uudecode(1) or the stream editor sed(1) in your list of
+ acceptable commands.
  
--You will next need to create the directory /usr/adm/sm.bin and populate
-+You will next need to create the directory /etc/smrsh and populate
+ If your platform doesn't have a default SMRSH_CMDDIR setting, you will
+-next need to create the directory /usr/adm/sm.bin and populate
++next need to create the directory /etc/smrsh and populate
  it with the programs that your site feels are allowable for sendmail
  to execute.   This directory is explicitly specified in the source
  code for smrsh, so changing this directory must be accompanied with
-@@ -85,22 +85,22 @@
+@@ -95,22 +95,22 @@
  
  You will have to be root to make these modifications.
  
@@ -55,8 +74,9 @@
 +/etc/smrsh directory, you should:
  
 -      host.domain# cd /usr/adm/sm.bin
+-      host.domain# ln -s /usr/ucb/vacation vacation
 +      host.domain# cd /etc/smrsh
-       host.domain# ln -s /usr/ucb/vacation vacation
++      host.domain# ln -s /usr/bin/vacation vacation
  
  
  
@@ -66,7 +86,7 @@
  sendmail to use the restricted shell.  Save the current sendmail.cf
  file prior to modifying it, as a prudent precaution.
  
-@@ -115,7 +115,7 @@
+@@ -125,7 +125,7 @@
  
  In order to configure sendmail to use smrsh, you must modify the Mprog
  definition in the sendmail.cf file, by replacing the /bin/sh specification
@@ -75,7 +95,7 @@
  
  As an example:
  
-@@ -123,14 +123,14 @@
+@@ -133,14 +133,14 @@
  Mprog,        P=/bin/sh,   F=lsDFMeuP,  S=10, R=20, A=sh -c $u
  
  which should be changed to:
  
  
  After modifying the Mprog definition in the sendmail.cf file, if a frozen
-@@ -141,7 +141,7 @@
+@@ -151,7 +151,7 @@
  a search of the strings(1) output of the sendmail binary.
  
  In order to create a new frozen configuration, if it is required:
  
  Now re-start the sendmail process.  An example of how to do this on
  a typical system follows:
---- sendmail-8.10.0/smrsh/smrsh.8.smrsh        Tue Jun 15 00:50:19 1999
-+++ sendmail-8.10.0/smrsh/smrsh.8      Thu Mar  9 13:21:40 2000
-@@ -38,7 +38,7 @@
- Briefly,
+--- ./smrsh/smrsh.8.org        Tue Sep 30 10:04:39 2003
++++ ./smrsh/smrsh.8    Tue Sep 30 10:12:49 2003
+@@ -39,7 +39,7 @@
  .I smrsh
- limits programs to be in the directory
+ limits programs to be in a single directory,
+ by default
 -/usr/adm/sm.bin,
 +/etc/smrsh,
  allowing the system administrator to choose the set of acceptable commands,
  and to the shell builtin commands ``exec'', ``exit'', and ``echo''.
  It also rejects any commands with the characters
-@@ -55,10 +55,10 @@
+@@ -50,16 +50,16 @@
+ ``"|exec /usr/local/bin/filter || exit 75"''
+ .PP
+ Initial pathnames on programs are stripped,
+-so forwarding to ``/usr/ucb/vacation'',
++so forwarding to ``/usr/bin/vacation'',
+ ``/usr/bin/vacation'',
+ ``/home/server/mydir/bin/vacation'',
  and
  ``vacation''
  all actually forward to
 +``/etc/smrsh/vacation''.
  .PP
  System administrators should be conservative about populating
--/usr/adm/sm.bin.
-+/etc/smrsh
- Reasonable additions are
+-the sm.bin directory.
++the /etc/smrsh directory.
+ For example, a reasonable additions is
  .IR vacation (1),
- .IR procmail (1),
-@@ -68,20 +68,12 @@
+ and the like.
+@@ -68,10 +68,10 @@
  (such as
  .IR perl (1))
  in the
 -in the sm.bin directory (using the ``#!'' syntax);
 +in the /etc/smrsh directory (using the ``#!'' syntax);
  it simply disallows execution of arbitrary programs.
+ Also, including mail filtering programs such as
+ .IR procmail (1)
+@@ -79,15 +79,7 @@
+ .IR procmail (1)
+ allows users to run arbitrary programs in their
+ .IR procmailrc (5).
 -.SH COMPILATION
 -Compilation should be trivial on most systems.
--You may need to use \-DPATH=\e"\fIpath\fP\e"
+-You may need to use \-DSMRSH_PATH=\e"\fIpath\fP\e"
 -to adjust the default search path
 -(defaults to ``/bin:/usr/bin:/usr/ucb'')
--and/or \-DCMDBIN=\e"\fIdir\fP\e"
+-and/or \-DSMRSH_CMDDIR=\e"\fIdir\fP\e"
 -to change the default program directory
 -(defaults to ``/usr/adm/sm.bin'').
  .SH FILES
--/usr/adm/sm.bin \- directory for restricted programs
+-/usr/adm/sm.bin \- default directory for restricted programs on most OSs
 +/etc/smrsh \- directory for restricted programs
- .SH SEE ALSO
- sendmail(8)
---- sendmail-8.10.0/smrsh/smrsh.c.smrsh2       Tue Oct 26 22:49:51 1999
-+++ sendmail-8.10.0/smrsh/smrsh.c      Thu Mar  9 13:28:37 2000
-@@ -76,7 +76,7 @@
- /* directory in which all commands must reside */
- #ifndef CMDDIR
--# define CMDDIR               "/usr/adm/sm.bin"
-+# define CMDDIR               "/etc/smrsh"
+ .PP
+ /var/adm/sm.bin \- directory for restricted programs on HP UX and Solaris
+--- sendmail-8.16.1/smrsh/smrsh.c.orig 2020-08-28 23:00:20.515734197 +0200
++++ sendmail-8.16.1/smrsh/smrsh.c      2020-08-29 09:13:31.036422852 +0200
+@@ -77,7 +77,7 @@
+ # ifdef SMRSH_CMDDIR
+ #  define CMDDIR      SMRSH_CMDDIR
+ # else
+-#  define CMDDIR      "/usr/adm/sm.bin"
++#  define CMDDIR      "/etc/smrsh"
+ # endif
  #endif /* ! CMDDIR */
  
- /* characters disallowed in the shell "-c" argument */
-@@ -84,7 +84,7 @@
- /* default search path */
- #ifndef PATH
--# define PATH         "/bin:/usr/bin:/usr/ucb"
-+# define PATH         "/bin:/usr/bin:"
+@@ -89,7 +89,7 @@
+ # ifdef SMRSH_PATH
+ #  define PATH                SMRSH_PATH
+ # else
+-#  define PATH                "/bin:/usr/bin:/usr/ucb"
++#  define PATH                "/bin:/usr/bin:/usr/sbin"
+ # endif
  #endif /* ! PATH */
  
- #ifndef __P
This page took 0.041419 seconds and 4 git commands to generate.