.\" Copyright (C) 2007 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. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 2007 Akihiro MOTOKI .\" all rights reserved. .\" Translated 2007-06-02, Akihiro MOTOKI .\" Updated 2012-04-30, Akihiro MOTOKI .\" Updated 2013-03-26, Akihiro MOTOKI .\" .TH EUIDACCESS 3 2013\-09\-25 "" "Linux Programmer's Manual" .SH 名前 euidaccess, eaccess \- ファイルへのアクセス権を実効ユーザーでチェックする .SH 書式 .nf \fB#define _GNU_SOURCE\fP /* feature_test_macros(7) 参照 */ \fB#include \fP .sp \fBint euidaccess(const char *\fP\fIpathname\fP\fB, int \fP\fImode\fP\fB);\fP \fBint eaccess(const char *\fP\fIpathname\fP\fB, int \fP\fImode\fP\fB);\fP .fi .SH 説明 \fBaccess\fP(2) と同様、 \fBeuidaccess\fP() は引き数 \fIpathname\fP で指定されたファイルの許可 (permission) と存在のチェックを行う。 \fBaccess\fP(2) はプロセスの実 (real) ユーザーID / 実グループID を用いてチェックを行うのに対し、 \fBeuidaccess\fP() は実効 (effective) ID を用いる。 \fImode\fP は \fBR_OK\fP, \fBW_OK\fP, \fBX_OK\fP, \fBF_OK\fP の一つ以上から構成されるマスクである。 \fBR_OK\fP, \fBW_OK\fP, \fBX_OK\fP, \fBF_OK\fP は \fBaccess\fP(2) と同じ意味を持つ。 \fBeaccess\fP() は \fBeuidaccess\fP() の同義語であり、他のいくつかのシステムとの互換性のために提供されている。 .SH 返り値 成功した場合 (要求した全てについて許可が得られたら)、ゼロが返される。 エラーの場合 (\fImode\fP の少なくとも一つのビットで要求した許可がなかった場合や、 他のエラーが起こった場合)、\-1 が返され、 \fIerrno\fP が適切に設定される。 .SH エラー \fBaccess\fP(2) と同じ。 .SH バージョン \fBeaccess\fP() 関数は glibc のバージョン 2.4 で追加された。 .SH 属性 .SS "マルチスレッディング (pthreads(7) 参照)" 関数 \fBeuidaccess\fP() と \fBeaccess\fP() はスレッドセーフである。 .SH 準拠 .\" e.g., FreeBSD 6.1. これらの関数は非標準である。 他のいくつかのシステムには \fBeaccess\fP() 関数がある。 .SH 注意 \fI警告\fP: ある操作を実行する前にこの関数を使ってファイルに対するプロセスのアクセス許可を 確認してから、その情報に基づいて操作を行うと、競合条件が発生する可能性がある。 これは二つの操作の間でファイルのアクセス許可が変化する場合があるからである。 一般的には、必要な操作のみを行い、その際に発生したアクセス許可に関するエラーを 処理する方が安全である。 この関数は常にシンボリックリンクの展開を行う。 シンボリックリンクのアクセス許可を確認する必要がある場合は、 フラグ \fBAT_EACCESS\fP と \fBAT_SYMLINK_NOFOLLOW\fP を付けて \fBfaccessat\fP(2) を使うこと。 .SH 関連項目 \fBaccess\fP(2), \fBchmod\fP(2), \fBchown\fP(2), \fBfaccessat\fP(2), \fBopen\fP(2), \fBsetgid\fP(2), \fBsetuid\fP(2), \fBstat\fP(2), \fBcredentials\fP(7), \fBpath_resolution\fP(7) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。