OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[linuxjm/LDP_man-pages.git] / draft / man3 / getenv.3
index 6fec0ce..288f19c 100644 (file)
@@ -1,6 +1,7 @@
 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
-.\" and Copyright (C) 2007 Michael Kerrisk <mtk.manpages@gmail.com>
+.\" and Copyright (C) 2007, 2012 Michael Kerrisk <mtk.manpages@gmail.com>
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
@@ -20,6 +21,7 @@
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\" References consulted:
 .\"     Linux libc source code
 .\" Modified Sat Jul 24 19:30:29 1993 by Rik Faith (faith@cs.unc.edu)
 .\" Modified Fri Feb 14 21:47:50 1997 by Andries Brouwer (aeb@cwi.nl)
 .\"
-.\" Japanese Version Copyright (c) 1997 Taro Morioka
-.\"         all rights reserved.
-.\" Translated Tue 08 04 06:00:00 JST 1997
-.\"         by Tarho Morioka (t-morioka@nri.co.jp)
-.\" Modified 2003-09-27 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
-.\" Updated 2008-08-07, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.05
+.\"*******************************************************************
 .\"
-.TH GETENV 3  2008-03-17 "GNU" "Linux Programmer's Manual"
-.\"O .SH NAME
-.\"O getenv \- get an environment variable
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH GETENV 3 2012\-08\-14 GNU "Linux Programmer's Manual"
 .SH 名前
-getenv \- 環境変数を得る
-.\"O .SH SYNOPSIS
+getenv, secure_getenv \- 環境変数を得る
 .SH 書式
 .nf
-.B #include <stdlib.h>
+\fB#include <stdlib.h>\fP
 .sp
-.BI "char *getenv(const char *" name );
+\fBchar *getenv(const char *\fP\fIname\fP\fB);\fP
+
+\fBchar *secure_getenv(const char *\fP\fIname\fP\fB);\fP
 .fi
-.\"O .SH DESCRIPTION
+.sp
+.in -4n
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.in
+.sp
+\fBsecure_getenv\fP(): _GNU_SOURCE
 .SH 説明
-.\"O The
-.\"O .BR getenv ()
-.\"O function searches the environment list to find the
-.\"O environment variable
-.\"O .IR name ,
-.\"O and returns a pointer to the corresponding
-.\"O .I value
-.\"O string.
-関数
-.BR getenv ()
-は、環境リストから名前が
-.I name
-の環境変数を検索し、対応する
-.I value
-文字列へのポインタを返す。
-.\"O .SH "RETURN VALUE"
+関数 \fBgetenv\fP()  は、環境リストから名前が \fIname\fP の環境変数を検索し、対応する \fIvalue\fP 文字列へのポインタを返す。
+
+GNU 固有の \fBsecure_getenv\fP() 関数は \fBgetenv\fP() と同様だが、 "secure execution"
+(「安全な実行」) が必要な場合には NULL を返す点が異なる。 "secure execution" が必要となるのは、
+呼び出し元プロセスにより実行されるプログラムがロードされる際に、 以下の条件のいずれか一つが成立する場合である。
+.IP * 3
+プロセスの実効ユーザ ID がプロセスの実ユーザ ID と一致しない場合、またはプロセスの実効グループ ID がプロセスの実グループ ID
+と一致しない場合 (通常、この状況になるのは、 set\-user\-ID プログラムか set\-group\-ID プログラムを実行した場合である)。
+.IP *
+実行ファイルで実効ケーパビリティビットがセットされている場合。
+.IP *
+プロセスの許可ケーパビリティセットが空でない場合。
+.PP
+Linux セキュリティモジュールにより要求された場合にも "secure execution" は必要となる。
+
+\fBsecure_getenv\fP() 関数は、 set\-user\-ID プログラムや set\-group\-ID
+プログラムが実行環境を偶然信用してしまった場合に起こり得る脆弱性を、 汎用ライブラリで回避するために使うことを意図して作られた。
 .SH 返り値
-.\"O The
-.\"O .BR getenv ()
-.\"O function returns a pointer to the value in the
-.\"O environment, or NULL if there is no match.
-関数
-.BR getenv ()
-は、環境における値 value へのポインタを返す。
-\fIname\fP にマッチする環境変数が存在しないときには NULL を返す。
-.\"O .SH "CONFORMING TO"
+関数 \fBgetenv\fP()  は、環境における値 value へのポインタを返す。 \fIname\fP にマッチする環境変数が存在しないときには NULL
+を返す。
+.SH バージョン
+\fBsecure_getenv\fP() は glibc 2.17 で初めて登場した。
 .SH 準拠
-SVr4, POSIX.1-2001, 4.3BSD, C89, C99.
-.\"O .SH NOTES
+\fBgetenv\fP(): SVr4, POSIX.1\-2001, 4.3BSD, C89, C99.
+
+\fBsecure_getenv\fP() は GNU による拡張である。
 .SH 注意
-.\"O The strings in the environment list are of the form \fIname=value\fP.
 環境リストの文字列は \fIname=value\fP という形式をしている。
 
-.\"O As typically implemented,
-.\"O .BR getenv ()
-.\"O returns a pointer to a string within the environment list.
-.\"O The caller must take care not to modify this string,
-.\"O since that would change the environment of the process.
-通常の実装では、
-.BR getenv ()
-は環境リスト内の文字列へのポインタを返す。
-呼び出し元はこの文字列を変更しないように注意しなければならない。
+通常の実装では、 \fBgetenv\fP()  は環境リスト内の文字列へのポインタを返す。 呼び出し元はこの文字列を変更しないように注意しなければならない。
 この文字列を変更すると、そのプロセスの環境を変化させることになるからである。
 
-.\"O The implementation of
-.\"O .BR getenv ()
-.\"O is not required to be reentrant.
-.\"O The string pointed to by the return value of
-.\"O .BR getenv ()
-.\"O may be statically allocated,
-.\"O and can be modified by a subsequent call to
-.\"O .BR getenv (),
-.\"O .BR putenv (3),
-.\"O .BR setenv (3),
-.\"O or
-.\"O .BR unsetenv (3).
-.BR getenv ()
-の実装はリエントラント (再入可能) であることを要求されていない。
-.BR getenv ()
-の返り値により参照される文字列は静的に割り当てられてもよく、
-文字列の内容は後続の
-.BR getenv (),
-.BR putenv (3),
-.BR setenv (3),
-.BR unsetenv (3)
-の呼び出しにより変更されることがある。
-.\"O .SH "SEE ALSO"
+\fBgetenv\fP()  の実装はリエントラント (再入可能) であることを要求されていない。 \fBgetenv\fP()
+の返り値により参照される文字列は静的に割り当てられてもよく、 文字列の内容は後続の \fBgetenv\fP(), \fBputenv\fP(3),
+\fBsetenv\fP(3), \fBunsetenv\fP(3)  の呼び出しにより変更されることがある。
+
+\fBsecure_getenv\fP() の "secure execution" モードは、 カーネルからユーザ空間に渡される補助ベクトル
+(auxiliary vector) の \fBAT_SECURE\fP フラグにより制御される。
 .SH 関連項目
-.BR clearenv (3),
-.BR putenv (3),
-.BR setenv (3),
-.BR unsetenv (3),
-.BR environ (7)
+\fBclearenv\fP(3), \fBgetauxval\fP(3), \fBputenv\fP(3), \fBsetenv\fP(3), \fBunsetenv\fP(3),
+\fBcapabilities\fP(7), \fBenviron\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。