summaryrefslogtreecommitdiff
blob: f24f7c9bb151ef7e10706dae5a1b3b8d93fbc0e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
--- sendmail-8.12.2/smrsh/README	Tue Jan 23 19:05:58 2001
+++ sendmail-8.12.2/smrsh/README	Tue Feb 19 16:49:44 2002
@@ -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, Inc., 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 @@
 
 
 
-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
 
-For manual installation: install smrsh in the /usr/libexec
+For manual installation: install smrsh in the /usr/sbin
 directory, with mode 511.
 
-	host.domain# mv smrsh /usr/libexec
-	host.domain# chmod 511 /usr/libexec/smrsh
+	host.domain# mv smrsh /usr/sbin
+	host.domain# chmod 511 /usr/sbin/smrsh
 
 
 
@@ -76,7 +76,7 @@
 acceptable commands.
 
 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 @@
 
 You will have to be root to make these modifications.
 
-After creating the /usr/adm/sm.bin directory, either copy the programs
+After creating the /etc/smrsh directory, either copy the programs
 to the directory, or establish links to the allowable programs from
-/usr/adm/sm.bin.  Change the file permissions, so that these programs
+/etc/smrsh.  Change the file permissions, so that these programs
 can not be modified by non-root users.  If you use links, you should
 ensure that the target programs are not modifiable.
 
 To allow the popular vacation(1) program by creating a link in the
-/usr/adm/sm.bin directory, you should:
+/etc/smrsh directory, you should:
 
-	host.domain# cd /usr/adm/sm.bin
+	host.domain# cd /etc/smrsh
 	host.domain# ln -s /usr/ucb/vacation vacation
 
 
 
 
-After populating the /usr/adm/sm.bin directory, you can now configure
+After populating the /etc/smrsh directory, you can now configure
 sendmail to use the restricted shell.  Save the current sendmail.cf
 file prior to modifying it, as a prudent precaution.
 
@@ -115,7 +115,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
-with /usr/libexec/smrsh.
+with /usr/sbin/smrsh.
 
 As an example:
 
@@ -123,14 +123,14 @@
 Mprog,	P=/bin/sh,   F=lsDFMeuP,  S=10, R=20, A=sh -c $u
 
 which should be changed to:
-Mprog,	P=/usr/libexec/smrsh,   F=lsDFMeuP,  S=10, R=20, A=sh -c $u
-          ^^^^^^^^^^^^^^^^^^
+Mprog,	P=/usr/sbin/smrsh,   F=lsDFMeuP,  S=10, R=20, A=sh -c $u
+         ^^^^^^^^^^^^^^^^
 
 A more generic line may be:
 Mprog,		P=/bin/sh, F=lsDFM, A=sh -c $u
 
 and should be changed to;
-Mprog,		P=/usr/libexec/smrsh, F=lsDFM, A=sh -c $u
+Mprog,		P=/usr/sbin/smrsh, F=lsDFM, A=sh -c $u
 
 
 After modifying the Mprog definition in the sendmail.cf file, if a frozen
@@ -141,7 +141,7 @@
 a search of the strings(1) output of the sendmail binary.
 
 In order to create a new frozen configuration, if it is required:
-	host.domain# /usr/lib/sendmail -bz
+	host.domain# /usr/sbin/sendmail -bz
 
 Now re-start the sendmail process.  An example of how to do this on
 a typical system follows:
--- sendmail-8.12.2/smrsh/smrsh.8	Tue Jan 23 19:40:47 2001
+++ sendmail-8.12.2/smrsh/smrsh.8	Tue Feb 19 16:50:25 2002
@@ -39,7 +39,7 @@
 .I smrsh
 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
@@ -56,10 +56,10 @@
 and
 ``vacation''
 all actually forward to
-``/usr/adm/sm.bin/vacation''.
+``/etc/smrsh/vacation''.
 .PP
 System administrators should be conservative about populating
-the sm.bin directory.
+the /etc/smrsh directory.
 Reasonable additions are
 .IR vacation (1),
 .IR procmail (1),
@@ -69,20 +69,12 @@
 (such as
 .IR perl (1))
 in the
-sm.bin
+/etc/smrsh
 directory.
 Note that this does not restrict the use of shell or perl scripts
 in the sm.bin directory (using the ``#!'' syntax);
 it simply disallows execution of arbitrary programs.
-.SH COMPILATION
-Compilation should be trivial on most systems.
-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 \-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
+/etc/smrsh \- directory for restricted programs
 .SH SEE ALSO
 sendmail(8)
--- sendmail-8.12.2/smrsh/smrsh.c	Tue Sep 11 00:05:22 2001
+++ sendmail-8.12.2/smrsh/smrsh.c	Tue Feb 19 16:51:05 2002
@@ -74,7 +74,7 @@
 # ifdef SMRSH_CMDDIR
 #  define CMDDIR	SMRSH_CMDDIR
 # else /* SMRSH_CMDDIR */
-#  define CMDDIR	"/usr/adm/sm.bin"
+#  define CMDDIR	"/etc/smrsh"
 # endif /* SMRSH_CMDDIR */
 #endif /* ! CMDDIR */
 
@@ -86,7 +86,7 @@
 # ifdef SMRSH_PATH
 #  define PATH		SMRSH_PATH
 # else /* SMRSH_PATH */
-#  define PATH		"/bin:/usr/bin:/usr/ucb"
+#  define PATH		"/bin:/usr/bin"
 # endif /* SMRSH_PATH */
 #endif /* ! PATH */