.\" Copyright (C) 1997 Andries Brouwer (aeb@cwi.nl) .\" and 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 .\" .\" Modified, 2003-05-26, Michael Kerrisk, .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya .\" all rights reserved. .\" Translated Sat Aug 30 14:47:25 JST 1997 .\" by HANATAKA Shinya .\" Updated Sun Oct 12 JST 2003 by Kentaro Shirakata .\" Updated 2012-04-30, Akihiro MOTOKI .\" .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 \fB#include \fP .sp \fBint getresuid(uid_t *\fP\fIruid\fP\fB, uid_t *\fP\fIeuid\fP\fB, uid_t *\fP\fIsuid\fP\fB);\fP .br \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 では \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) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。