aboutsummaryrefslogtreecommitdiff
path: root/ja_JP.eucJP/man/man8/smrsh.8
blob: 64833ebe0bbcfdb221537b86866f3ec5db08a93f (plain) (blame)
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
.\" Copyright (c) 1993	Eric P. Allman
.\" Copyright (c) 1993
.\"     The Regents of the University of California.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"	This product includes software developed by the University of
.\"	California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"     @(#)smrsh.8	8.2 (Berkeley) 1/9/96
.\" jpman %Id: smrsh.8,v 1.3 1997/09/04 18:05:48 horikawa Stab %
.\"
.TH SMRSH 8 11/02/93
.SH 名称
smrsh \- sendmail用に制限されたシェル
.SH 書式
.B smrsh
.B \-c
command
.SH 解説
.I smrsh
は、
.IR sendmail (8)
のコンフィグレーションファイルで、
.I sh
の代わりに ``prog'' メーラとして使用する事を目的としています。
.I smrsh
は、システムの全体的なセキュリティを改善するために、
.I sendmail
の ``|program'' 書式により起動する事ができるコマンドを制限します。
つまり、もし ``悪者'' が alias ファイルや forward ファイルを経由せずに
sendmail からプログラムを実行する事ができたとしても、
.I smrsh
を使えば、彼(あるいは彼女)が実行できるプログラムを制限する事ができるのです。
.PP
簡単に言うと、
.I smrsh
は、実行可能なプログラムを /usr/libexec/sm.bin ディレクトリに存在するもの
だけに限定します。これにより、システム管理者は利用可能なコマンドを選択する
事ができます。
更に、
.I smrsh
は、``end run'' 攻撃を防ぐために、コマンド行に
`\`', `<', `>', `|', `;', `&', `$', `(', `)', `\er'(キャリッジリターン),
`\en'(ニューライン)
の文字を含むコマンドは実行しません。
.PP
プログラム名の前にあるパス名は全て取り除かれるため、
``/usr/bin/vacation'', ``/home/server/mydir/bin/vacation'', ``vacation''
などは全て ``/usr/libexec/sm.bin/vacation'' と解釈されます。
.PP
システム管理者は、
/usr/libexec/sm.bin に置くプログラムを選ぶ際には慎重な
判断をすべきです。適切な物としては、
.IR vacation (1)
や
.IR procmail (1)
などがあげられるでしょう。いかなる要望があっても、シェルや、
.IR perl (1)
などのシェルに似たプログラムを 
sm.bin
に入れてはいけません。
これは、単に任意のプログラムを実行する事を制限するだけで、
``#!''書式を用いた、シェルスクリプトや perl スクリプトを
sm.bin
ディレクトリに入れる事を制限する訳ではありません。
.SH コンパイル
コンパイルはほとんどのシステムでつまらないものです。
デフォルトのサーチパス
(デフォルトでは``/bin:/usr/bin'')
を変更するためには、\-DPATH=\e"\fIpath\fP\e" を
使用する必要があり、また、
デフォルトのプログラムディレクトリ
(デフォルトでは ``/usr/libexec/sm.bin'')
を変更するためには、\-DCMDBIN=\e"\fIdir\fP\e" を
使用する必要があります。
.SH 関連ファイル
/usr/libexec/sm.bin \- 制限されたプログラム用のディレクトリ
.SH 関連項目
sendmail(8)