OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[linuxjm/LDP_man-pages.git] / draft / man2 / faccessat.2
index 99056b3..581172d 100644 (file)
@@ -1,7 +1,6 @@
-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
 .\" This manpage is Copyright (C) 2006, Michael Kerrisk
 .\"
+.\" %%%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.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
 .\"
-.\" Japanese Version Copyright (c) 2006-2007 Yuichi SATO
-.\"         all rights reserved.
-.\" Translated 2006-10-14 by Yuichi SATO <ysato444@yahoo.co.jp>, LDP v2.39
-.\" Updated & Modified 2007-01-08 by Yuichi SATO, LDP v2.43
-.\" Updated 2007-05-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" This file was generated with po4a. Translate the source file.
 .\"
-.TH FACCESSAT 2 2009-12-13 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
-.SH Ì¾Á°
-.\"O faccessat \- check user's permissions of a file relative to a \
-.\"O directory file descriptor
-faccessat \- ¥Ç¥£¥ì¥¯¥È¥ê¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤«¤éÁêÂÐŪ¤Ê°ÌÃ֤ˤ¢¤ë
-¥Õ¥¡¥¤¥ë¤Î¥¢¥¯¥»¥¹¸¢¤ò¥Á¥§¥Ã¥¯¤¹¤ë
-.\"O .SH SYNOPSIS
-.SH ½ñ¼°
+.\"*******************************************************************
+.TH FACCESSAT 2 2012\-05\-04 Linux "Linux Programmer's Manual"
+.SH 名前
+faccessat \- ディレクトリファイルディスクリプタから相対的な位置にある ファイルのアクセス権をチェックする
+.SH 書式
 .nf
-.\"O .B #include <fcntl.h>           /* Definition of AT_* constants */
-.B #include <fcntl.h>           /* AT_* Äê¿ô¤ÎÄêµÁ */
-.B #include <unistd.h>
+\fB#include <fcntl.h> /* AT_* 定数の定義 */\fP
+\fB#include <unistd.h>\fP
 .sp
-.BI "int faccessat(int " dirfd ", const char *" pathname ", int " \
-mode ", int " flags );
+\fBint faccessat(int \fP\fIdirfd\fP\fB, const char *\fP\fIpathname\fP\fB, int \fP\fImode\fP\fB, int \fP\fIflags\fP\fB);\fP
 .fi
 .sp
 .in -4n
-.\"O Feature Test Macro Requirements for glibc (see
-.\"O .BR feature_test_macros (7)):
-glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
-.RB ( feature_test_macros (7)
-»²¾È):
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
 .in
 .sp
-.BR faccessat ():
+\fBfaccessat\fP():
 .PD 0
 .ad l
 .RS 4
-.TP 4
-.\"O Since glibc 2.10:
-glibc 2.10 °Ê¹ß:
+.TP  4
+glibc 2.10 以降:
 _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
-.TP
-.\"O Before glibc 2.10:
-glibc 2.10 ¤è¤êÁ°:
+.TP 
+glibc 2.10 より前:
 _ATFILE_SOURCE
 .RE
 .ad
 .PD
-.\"O .SH DESCRIPTION
-.SH ÀâÌÀ
-.\"O The
-.\"O .BR faccessat ()
-.\"O system call operates in exactly the same way as
-.\"O .BR access (2),
-.\"O except for the differences described in this manual page.
-.BR faccessat ()
-¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¡¢¤³¤Î man ¥Ú¡¼¥¸¤ÇÀâÌÀ¤·¤Æ¤¤¤ë°ã¤¤¤¬¤¢¤ë°Ê³°¤Ï¡¢
-.BR access (2)
-¤ÈÁ´¤¯Æ±¤¸¤è¤¦¤ËÆ°ºî¤¹¤ë¡£
+.SH 説明
+\fBfaccessat\fP()  システムコールは、この man ページで説明している違いがある以外は、 \fBaccess\fP(2)
+と全く同じように動作する。
+
+\fIpathname\fP で指定されるパス名が相対パスである場合、 ファイルディスクリプタ \fIdirfd\fP
+で参照されるディレクトリからの相対パス名として解釈される (\fBaccess\fP(2)
+では、相対パスは呼び出し元プロセスのカレントワーキングディレクトリからの 相対パスとなる)。
 
-.\"O If the pathname given in
-.\"O .I pathname
-.\"O is relative, then it is interpreted relative to the directory
-.\"O referred to by the file descriptor
-.\"O .I dirfd
-.\"O (rather than relative to the current working directory of
-.\"O the calling process, as is done by
-.\"O .BR access (2)
-.\"O for a relative pathname).
-.I pathname
-¤Ç»ØÄꤵ¤ì¤ë¥Ñ¥¹Ì¾¤¬ÁêÂХѥ¹¤Ç¤¢¤ë¾ì¹ç¡¢
-¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿
-.I dirfd
-¤Ç»²¾È¤µ¤ì¤ë¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤ÎÁêÂХѥ¹Ì¾¤È¤·¤Æ²ò¼á¤µ¤ì¤ë
-.RB ( access (2)
-¤Ç¤Ï¡¢ÁêÂХѥ¹¤Ï¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î¥«¥ì¥ó¥È¥ï¡¼¥­¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤Î
-ÁêÂХѥ¹¤È¤Ê¤ë)¡£
+\fIpathname\fP が相対パスであり、かつ \fIdirfd\fP が特別な値 \fBAT_FDCWD\fP である場合、 \fIpathname\fP は
+(\fBaccess\fP(2)  と同じように) 呼び出し元プロセスの カレントワーキングディレクトリからの相対パス名として解釈される。
 
-.\"O If
-.\"O .I pathname
-.\"O is relative and
-.\"O .I dirfd
-.\"O is the special value
-.\"O .BR AT_FDCWD ,
-.\"O then
-.\"O .I pathname
-.\"O is interpreted relative to the current working
-.\"O directory of the calling process (like
-.\"O .BR access (2)).
-.I pathname
-¤¬ÁêÂХѥ¹¤Ç¤¢¤ê¡¢¤«¤Ä
-.I dirfd
-¤¬ÆÃÊ̤ÊÃÍ
-.B AT_FDCWD
-¤Ç¤¢¤ë¾ì¹ç¡¢
-.I pathname
-¤Ï
-.RB ( access (2)
-¤ÈƱ¤¸¤è¤¦¤Ë) ¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î
-¥«¥ì¥ó¥È¥ï¡¼¥­¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤ÎÁêÂХѥ¹Ì¾¤È¤·¤Æ²ò¼á¤µ¤ì¤ë¡£
+\fIpathname\fP が絶対パスである場合、 \fIdirfd\fP は無視される。
 
-.\"O If
-.\"O .I pathname
-.\"O is absolute, then
-.\"O .I dirfd
-.\"O is ignored.
-.I pathname
-¤¬ÀäÂХѥ¹¤Ç¤¢¤ë¾ì¹ç¡¢
-.I dirfd
-¤Ï̵»ë¤µ¤ì¤ë¡£
+\fIflags\fP は以下の値を 0 個以上 OR して作られる。
+.TP 
+\fBAT_EACCESS\fP
+実効 (effective) ユーザ ID と実効グループ ID を使って、 アクセス権のチェックを行う。 デフォルトでは、
+\fBfaccessat\fP()  は (\fBaccess\fP(2)  と同様に) 実 ID を使う。
+.TP 
+\fBAT_SYMLINK_NOFOLLOW\fP
+\fIpathname\fP がシンボリックリンクの場合は、それを辿るのではなく、 リンク自身についての情報を返す。
+.SH 返り値
+成功した場合 (全ての要求された許可が得られたら)、 \fBfaccessat\fP()  は 0 を返す。 エラーの場合、\-1 が返され、 \fIerrno\fP
+にはエラーを示す値が設定される。
+.SH エラー
+\fBaccess\fP(2)  と同じエラーが \fBfaccessat\fP()  でも起こる。 \fBfaccessat\fP()
+では、その他に以下のエラーが起こる:
+.TP 
+\fBEBADF\fP
+\fIdirfd\fP が有効なファイルディスクリプタでない。
+.TP 
+\fBEINVAL\fP
+\fIflags\fP に不正なフラグ値が指定された。
+.TP 
+\fBENOTDIR\fP
+\fIpathname\fP が相対パスで、かつ \fIdirfd\fP がディレクトリ以外のファイルを参照するファイルディスクリプタである。
+.SH バージョン
+\fBfaccessat\fP()  は Linux カーネル 2.6.16 で追加された。
+ライブラリによるサポートは glibc バージョン 2.4 で追加された。
+.SH 準拠
+POSIX.1\-2008.
+.SH 注意
+\fBfaccessat\fP()  が必要な理由については、 \fBopenat\fP(2)  を参照すること。
 
-.\"O .I flags
-.\"O is constructed by ORing together zero or more of the following values:
-.I flags
-¤Ï°Ê²¼¤ÎÃͤò 0 ¸Ä°Ê¾å OR ¤·¤Æºî¤é¤ì¤ë¡£
-.TP
-.B AT_EACCESS
-.\"O Perform access checks using the effective user and group IDs.
-.\"O By default,
-.\"O .BR faccessat ()
-.\"O uses the real IDs (like
-.\"O .BR access (2)).
-¼Â¸ú (effective) ¥æ¡¼¥¶ ID ¤È¼Â¸ú¥°¥ë¡¼¥× ID ¤ò»È¤Ã¤Æ¡¢
-¥¢¥¯¥»¥¹¸¢¤Î¥Á¥§¥Ã¥¯¤ò¹Ô¤¦¡£
-¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢
-.BR faccessat ()
-¤Ï
-.RB ( access (2)
-¤ÈƱÍͤË) ¼Â ID ¤ò»È¤¦¡£
-.TP
-.B AT_SYMLINK_NOFOLLOW
-.\"O If
-.\"O .I pathname
-.\"O is a symbolic link, do not dereference it:
-.\"O instead return information about the link itself.
-.I pathname
-¤¬¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤Î¾ì¹ç¤Ï¡¢¤½¤ì¤òé¤ë¤Î¤Ç¤Ï¤Ê¤¯¡¢
-¥ê¥ó¥¯¼«¿È¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤òÊÖ¤¹¡£
-.\"O .SH "RETURN VALUE"
-.SH ÊÖ¤êÃÍ
-.\"O On success, (all requested permissions granted)
-.\"O .BR faccessat ()
-.\"O returns 0.
-À®¸ù¤·¤¿¾ì¹ç (Á´¤Æ¤ÎÍ׵ᤵ¤ì¤¿µö²Ä¤¬ÆÀ¤é¤ì¤¿¤é)¡¢
-.BR faccessat ()
-¤Ï 0 ¤òÊÖ¤¹¡£
-.\"O On error, \-1 is returned and
-.\"O .I errno
-.\"O is set to indicate the error.
-¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤¬ÊÖ¤µ¤ì¡¢
-.I errno
-¤Ë¤Ï¥¨¥é¡¼¤ò¼¨¤¹Ãͤ¬ÀßÄꤵ¤ì¤ë¡£
-.\"O .SH ERRORS
-.SH ¥¨¥é¡¼
-.\"O The same errors that occur for
-.\"O .BR access (2)
-.\"O can also occur for
-.\"O .BR faccessat ().
-.BR access (2)
-¤ÈƱ¤¸¥¨¥é¡¼¤¬
-.BR faccessat ()
-¤Ç¤âµ¯¤³¤ë¡£
-.\"O The following additional errors can occur for
-.\"O .BR faccessat ():
-.BR faccessat ()
-¤Ç¤Ï¡¢¤½¤Î¾¤Ë°Ê²¼¤Î¥¨¥é¡¼¤¬µ¯¤³¤ë:
-.TP
-.B EBADF
-.\"O .I dirfd
-.\"O is not a valid file descriptor.
-.I dirfd
-¤¬Í­¸ú¤Ê¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤Ê¤¤¡£
-.TP
-.B EINVAL
-.\"O Invalid flag specified in
-.\"O .IR flags .
-.I flags
-¤ËÉÔÀµ¤Ê¥Õ¥é¥°Ãͤ¬»ØÄꤵ¤ì¤¿¡£
-.TP
-.B ENOTDIR
-.\"O .I pathname
-.\"O is relative and
-.\"O .I dirfd
-.\"O is a file descriptor referring to a file other than a directory.
-.I pathname
-¤¬ÁêÂХѥ¹¤Ç¡¢¤«¤Ä
-.I dirfd
-¤¬¥Ç¥£¥ì¥¯¥È¥ê°Ê³°¤Î¥Õ¥¡¥¤¥ë¤ò»²¾È¤¹¤ë¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤¢¤ë¡£
-.\"O .SH VERSIONS
-.SH ¥Ð¡¼¥¸¥ç¥ó
-.\"O .BR faccessat ()
-.\"O was added to Linux in kernel 2.6.16.
-.BR faccessat ()
-¤Ï Linux ¥«¡¼¥Í¥ë 2.6.16 ¤ÇÄɲ䵤줿¡£
-.\"O .SH "CONFORMING TO"
-.SH ½àµò
-POSIX.1-2008.
-.\"O .SH NOTES
-.SH Ãí°Õ
-.\"O See
-.\"O .BR openat (2)
-.\"O for an explanation of the need for
-.\"O .BR faccessat ().
-.BR faccessat ()
-¤¬É¬ÍפÊÍýͳ¤Ë¤Ä¤¤¤Æ¤Ï¡¢
-.BR openat (2)
-¤ò»²¾È¤¹¤ë¤³¤È¡£
-.\"O .SS Glibc Notes
-.SS glibc ¤Ë¤Ä¤¤¤Æ¤ÎÃí°Õ
-.\"O The
-.\"O .B AT_EACCESS
-.\"O and
-.\"O .B AT_SYMLINK_NOFOLLOW
-.\"O flags are actually implemented within the glibc wrapper function for
-.\"O .BR faccessat ().
-.B AT_EACCESS
-¤È
-.B AT_SYMLINK_NOFOLLOW
-¥Õ¥é¥°¤Ï¡¢
-.BR faccessat ()
-¤Î glibc ¥é¥Ã¥Ñ¡¼´Ø¿ô¤Ç¼ÂºÝ¤Ë¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡£
-.\"O If either of these flags are specified, then the wrapper function employs
-.\"O .BR fstatat (2)
-.\"O to determine access permissions.
-¤³¤ì¤é¤Î¥Õ¥é¥°¤Î¤¤¤º¤ì¤«¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¡¢
-¥é¥Ã¥Ñ¡¼´Ø¿ô¤Ï¥¢¥¯¥»¥¹¸¢¤ò·èÄꤹ¤ë¤¿¤á¤Ë
-.BR fstatat (2)
-¤ò»È¤¦¡£
-.\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
-.BR access (2),
-.BR openat (2),
-.BR eauidaccess (3),
-.BR credentials (7),
-.BR path_resolution (7),
-.BR symlink (7)
+\fI警告\fP: \fBfaccessat\fP() は \fBaccess\fP(2) や \fBeuidaccess\fP(3) と同様の
+競合状態が起こり得る。
+.SS "glibc についての注意"
+\fBAT_EACCESS\fP と \fBAT_SYMLINK_NOFOLLOW\fP フラグは、 \fBfaccessat\fP()  の glibc
+ラッパー関数で実際に実装されている。 これらのフラグのいずれかが指定された場合、 ラッパー関数はアクセス権を決定するために \fBfstatat\fP(2)
+を使う。
+.SH 関連項目
+\fBaccess\fP(2), \fBopenat\fP(2), \fBeauidaccess\fP(3), \fBcredentials\fP(7),
+\fBpath_resolution\fP(7), \fBsymlink\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。