diff options
Diffstat (limited to 'documentation/manual-pages/ja/man2/issetugid.2')
-rw-r--r-- | documentation/manual-pages/ja/man2/issetugid.2 | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/documentation/manual-pages/ja/man2/issetugid.2 b/documentation/manual-pages/ja/man2/issetugid.2 new file mode 100644 index 0000000000..1e67a57db4 --- /dev/null +++ b/documentation/manual-pages/ja/man2/issetugid.2 @@ -0,0 +1,105 @@ +.\" $OpenBSD: issetugid.2,v 1.7 1997/02/18 00:16:09 deraadt Exp $ +.\" +.\" Copyright (c) 1980, 1991, 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. +.\" +.\" %FreeBSD: src/lib/libc/sys/issetugid.2,v 1.13 2004/07/02 23:52:13 ru Exp % +.\" +.\" $FreeBSD$ +.\" +.Dd August 25, 1996 +.Dt ISSETUGID 2 +.Os +.Sh 名称 +.Nm issetugid +.Nd 現在のプロセスの uid または gid の変化による汚染状況 +.Sh ライブラリ +.Lb libc +.Sh 書式 +.In unistd.h +.Ft int +.Fn issetugid void +.Sh 解説 +.Fn issetugid +システムコールは、プロセスの環境またはメモリアドレス空間が +.Dq 汚染されている +と見なされる場合 1 を返し、そうでない場合は 0 を返します。 +.Pp +setuid または setgid ビットのどちらかが設定されたプロセスを +.Xr execve 2 +システムコールで実行した (そして結果として追加の特権が与えられた) 場合、 +あるいはプロセスの実ユーザ ID、実効ユーザ ID、退避ユーザ ID、 +もしくは実グループ ID、実効グループ ID、退避グループ ID のいずれかが +実行後に変更された場合、そのプロセスは汚染されていると見なされます。 +.Pp +このシステムコールは、ユーザから得られた情報を使用するのが +安全かどうかをライブラリルーチン (たとえば libc や libtermcap) が +信頼性を持って判定できるようにするために存在します。 +特に +.Xr getenv 3 +からの結果を、オペレーションの制御のために使用する場合には +疑いを持って見る必要があります。 +.Pp +.Dq 汚染された +状態は、 +.Xr fork 2 +システムコール (あるいは +.Xr popen 3 +のような fork を呼び出す他のライブラリコード) の結果として、 +子プロセスに継承されます。 +.Pp +別のプログラムを実行する準備をするときにすべての特権を +クリアするプログラムは、環境もリセットすると想定されます。 +したがって +.Dq 汚染された +状態は引き渡されません。 +setuid を開始するけれども汚染されていないプロセスを作成できる必要のある +.Xr su 1 +のようなプログラムにはこれは重要です。 +.Sh エラー +.Fn issetugid +システムコールは必ず正常に完了するので、エラーを示すための戻り値はありません。 +.Sh 関連項目 +.Xr execve 2 , +.Xr fork 2 , +.Xr setegid 2 , +.Xr seteuid 2 , +.Xr setgid 2 , +.Xr setregid 2 , +.Xr setreuid 2 , +.Xr setuid 2 +.Sh 歴史 +.Fn issetugid +システムコールは +.Ox 2.0 +ではじめて登場し、 +.Fx 3.0 +でも実装されました。 |