OSDN Git Service

(split) LDP: Release pages for LDP v3.39.
[linuxjm/LDP_man-pages.git] / release / man2 / getresuid.2
index 3304896..576673c 100644 (file)
 .\" which is licensed free of charge, as they might when working
 .\" professionally.
 .\"
 .\" which is licensed free of charge, as they might when working
 .\" professionally.
 .\"
-.\" Modified, 2003-05-26, Michael Kerrisk, <mtk.manpages@gmail.com>
-.\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
 .\"
-.\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
-.\"         all rights reserved.
-.\" Translated Sat Aug 30 14:47:25 JST 1997
-.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
-.\" Updated Sun Oct 12 JST 2003 by Kentaro Shirakata <argrath@ub32.org>
+.\" Modified, 2003-05-26, Michael Kerrisk, <mtk.manpages@gmail.com>
+.\"*******************************************************************
 .\"
 .\"
-.\"WORD:       effective user ID       ¼Â¸ú¥æ¡¼¥¶¡¼ID
-.\"WORD:       real user ID            ¼Â¥æ¡¼¥¶¡¼ID
-.\"WORD:       saved user ID           Êݸ¥æ¡¼¥¶¡¼ID
-.\"WORD:       effective group ID      ¼Â¸ú¥°¥ë¡¼¥×ID
-.\"WORD:       real group ID           ¼Â¥°¥ë¡¼¥×ID
-.\"WORD:       saved group ID          Êݸ¥°¥ë¡¼¥×ID
+.\" This file was generated with po4a. Translate the source file.
 .\"
 .\"
-.TH GETRESUID 2 2007-12-28 "Linux" "Linux Programmer's Manual"
-.SH Ì¾Á°
-getresuid, getresgid \- ¼Â¡¢¼Â¸ú¡¢Êݸ¡¢¥æ¡¼¥¶¡¼ ID / ¥°¥ë¡¼¥× ID ¤ò¼èÆÀ¤¹¤ë
-.SH ½ñ¼°
-.B #define _GNU_SOURCE
+.\"*******************************************************************
+.TH GETRESUID 2 2010\-11\-22 Linux "Linux Programmer's Manual"
+.SH 名前
+getresuid, getresgid \- 実、実効、保存、ユーザー ID / グループ ID を取得する
+.SH 書式
+\fB#define _GNU_SOURCE\fP /* feature_test_macros(7) 参照 */
 .br
 .br
-.B #include <unistd.h>
+\fB#include <unistd.h>\fP
 .sp
 .sp
-.BI "int getresuid(uid_t *" ruid ", uid_t *" euid ", uid_t *" suid );
+\fBint getresuid(uid_t *\fP\fIruid\fP\fB, uid_t *\fP\fIeuid\fP\fB, uid_t *\fP\fIsuid\fP\fB);\fP
 .br
 .br
-.BI "int getresgid(gid_t *" rgid ", gid_t *" egid ", gid_t *" sgid );
-.SH ÀâÌÀ
-.BR getresuid ()
-¤Ï¡¢¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¤Î¼Â (real) UID¡¢¼Â¸ú (effective) UID¡¢
-Êݸ (saved) set-user-ID
-.RB ( getresgid
-¤Î¾ì¹ç¤Ï¥°¥ë¡¼¥× ID) ¤ò¡¢
-¤½¤ì¤¾¤ì°ú¤­¿ô
-.IR ruid ,
-.IR euid ,
-.I suid
-¤Ë³ÊǼ¤·¤ÆÊÖ¤¹¡£
-.BR getresgid ()
-¤Ï¡¢¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¤Î¥°¥ë¡¼¥× ID ¤Ë¤Ä¤¤¤ÆƱÍͤνèÍý¤ò¹Ô¤¦¡£
-.SH ÊÖ¤êÃÍ
-À®¸ù¤·¤¿¾ì¹ç¤Ï¥¼¥í¤òÊÖ¤¹¡£¥¨¥é¡¼¤Î¾ì¹ç¤Ï \-1 ¤òÊÖ¤·¡¢
-.I errno
-¤¬Å¬ÀÚ¤ËÀßÄꤵ¤ì¤ë¡£
-.SH ¥¨¥é¡¼
-.TP
-.B EFAULT
-»ØÄꤷ¤¿°ú¤­¿ô¤Î¤É¤ì¤«¤¬¡¢¸Æ¤Ó½Ð¤·¤¿¥×¥í¥°¥é¥à¤Î¥¢¥É¥ì¥¹¶õ´Ö¤Î³°¤Î
-¥¢¥É¥ì¥¹¤Ç¤¢¤ë¡£
-.SH ¥Ð¡¼¥¸¥ç¥ó
-¤³¤ì¤é¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¥«¡¼¥Í¥ë 2.1.44 ¤«¤é Linux ¤ËÅо줷¤¿¡£
+\fBint getresgid(gid_t *\fP\fIrgid\fP\fB, gid_t *\fP\fIegid\fP\fB, gid_t *\fP\fIsgid\fP\fB);\fP
+.SH 説明
+\fBgetresuid\fP()  は、呼び出したプロセスの実 (real) UID、実効 (effective) UID、 保存 (saved)
+set\-user\-ID (\fBgetresgid\fP の場合はグループ ID) を、 それぞれ引き数 \fIruid\fP, \fIeuid\fP, \fIsuid\fP
+に格納して返す。 \fBgetresgid\fP()  は、呼び出したプロセスのグループ ID について同様の処理を行う。
+.SH 返り値
+成功した場合は 0 が返される。エラーの場合は \-1 が返され、 \fIerrno\fP が適切に設定される。
+.SH エラー
+.TP 
+\fBEFAULT\fP
+指定した引き数のどれかが、呼び出したプログラムのアドレス空間の外の アドレスである。
+.SH バージョン
+これらのシステムコールはカーネル 2.1.44 から Linux に登場した。
 
 
-¥×¥í¥È¥¿¥¤¥×Àë¸À¤Ï 2.3.2 °Ê¹ß¤Î glibc ¤Ç¤Ï
-.B _GNU_SOURCE
-¤òÄêµÁ¤·¤Æ¤¤¤ë¤ÈÆÀ¤é¤ì¤ë¡£
-.SH ½àµò
-¤³¤ì¤é¤Î¥³¡¼¥ë¤ÏÈóɸ½à¤Ç¤¢¤ë¡£
-HP-UX ¤ä BSD ·Ï¤Î¤¤¤¯¤Ä¤«¤Ë¤â¸ºß¤¹¤ë¡£
-.SH ´ØÏ¢¹àÌÜ
-.BR getuid (2),
-.BR setresuid (2),
-.BR setreuid (2),
-.BR setuid (2),
-.BR credentials (7),
-.BR feature_test_macros (7)
+プロトタイプ宣言は 2.3.2 以降の glibc では \fB_GNU_SOURCE\fP を定義していると得られる。
+.SH 準拠
+これらのコールは非標準である。 HP\-UX や BSD 系のいくつかにも存在する。
+.SH 注意
+元々の Linux の \fBgetresuid\fP() と \fBgetresgid\fP() システムコールは
+16 ビットのグループ ID だけに対応していた。
+その後、Linux 2.4 で、32 ビットの ID に対応した
+\fBgetresuid32\fP() と \fBgetresgid32\fP() が追加された。
+glibc の \fBgetresuid\fP() と \fBgetresgid\fP() のラッパー関数は
+カーネルバージョンによるこの違いを吸収している。
+.SH 関連項目
+\fBgetuid\fP(2), \fBsetresuid\fP(2), \fBsetreuid\fP(2), \fBsetuid\fP(2),
+\fBcredentials\fP(7)