.\" 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.
.\"
-.\" 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"
+.\"*******************************************************************
+.TH GETRESUID 2 2010\-11\-22 Linux "Linux Programmer's Manual"
.SH 名前
getresuid, getresgid \- 実、実効、保存、ユーザー ID / グループ ID を取得する
.SH 書式
-.BR "#define _GNU_SOURCE" " /* feature_test_macros(7) 参照 */"
+\fB#define _GNU_SOURCE\fP /* feature_test_macros(7) 参照 */
.br
-.B #include <unistd.h>
+\fB#include <unistd.h>\fP
.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
-.BI "int getresgid(gid_t *" rgid ", gid_t *" egid ", gid_t *" sgid );
+\fBint getresgid(gid_t *\fP\fIrgid\fP\fB, gid_t *\fP\fIegid\fP\fB, gid_t *\fP\fIsgid\fP\fB);\fP
.SH 説明
-.BR getresuid ()
-は、呼び出したプロセスの実 (real) UID、実効 (effective) UID、
-保存 (saved) set-user-ID
-.RB ( getresgid
-の場合はグループ ID) を、
-それぞれ引き数
-.IR ruid ,
-.IR euid ,
-.I suid
-に格納して返す。
-.BR getresgid ()
-は、呼び出したプロセスのグループ ID について同様の処理を行う。
+\fBgetresuid\fP() は、呼び出したプロセスの実 (real) UID、実効 (effective) UID、 保存 (saved)
+set\-user\-ID (\fBgetresgid\fP の場合はグループ ID) を、 それぞれ引き数 \fIruid\fP, \fIeuid\fP, \fIsuid\fP
+に格納して返す。 \fBgetresgid\fP() は、呼び出したプロセスのグループ ID について同様の処理を行う。
.SH 返り値
-成功した場合はゼロを返す。エラーの場合は \-1 を返し、
-.I errno
-が適切に設定される。
+成功した場合は 0 が返される。エラーの場合は \-1 が返され、 \fIerrno\fP が適切に設定される。
.SH エラー
-.TP
-.B EFAULT
-指定した引き数のどれかが、呼び出したプログラムのアドレス空間の外の
-アドレスである。
+.TP
+\fBEFAULT\fP
+指定した引き数のどれかが、呼び出したプログラムのアドレス空間の外の アドレスである。
.SH バージョン
これらのシステムコールはカーネル 2.1.44 から Linux に登場した。
-プロトタイプ宣言は 2.3.2 以降の glibc では
-.B _GNU_SOURCE
-を定義していると得られる。
+プロトタイプ宣言は 2.3.2 以降の glibc では \fB_GNU_SOURCE\fP を定義していると得られる。
.SH 準拠
-これらのコールは非標準である。
-HP-UX や BSD 系のいくつかにも存在する。
+これらのコールは非標準である。 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 関連項目
-.BR getuid (2),
-.BR setresuid (2),
-.BR setreuid (2),
-.BR setuid (2),
-.BR credentials (7)
+\fBgetuid\fP(2), \fBsetresuid\fP(2), \fBsetreuid\fP(2), \fBsetuid\fP(2),
+\fBcredentials\fP(7)