.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" Copyright (C) 1997 Andries Brouwer (aeb@cwi.nl) .\" and Copyright (c) 2007, Michael Kerrisk .\" .\" 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. .\" .\" Modified, 2003-05-26, Michael Kerrisk, .\" .\" 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 .\" Updated Sun Oct 12 JST 2003 by Kentaro Shirakata .\" .\"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 .\" .TH GETRESUID 2 2007-12-28 "Linux" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O getresuid, getresgid \- get real, effective and saved user/group ID getresuid, getresgid \- 実、実効、保存、ユーザー ID / グループ ID を取得する .\"O .SH SYNOPSIS .SH 書式 .\"O .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .BR "#define _GNU_SOURCE" " /* feature_test_macros(7) 参照 */" .br .B #include .sp .BI "int getresuid(uid_t *" ruid ", uid_t *" euid ", uid_t *" suid ); .br .BI "int getresgid(gid_t *" rgid ", gid_t *" egid ", gid_t *" sgid ); .\"O .SH DESCRIPTION .SH 説明 .\"O .BR getresuid () .\"O returns the real UID, the effective UID, and the saved set-user-ID .\"O of the calling process, in the arguments .\"O .IR ruid , .\"O .IR euid , .\"O and .\"O .IR suid , .\"O respectively. .\"O .BR getresgid () .\"O performs the analogous task for the process's group IDs. .BR getresuid () は、呼び出したプロセスの実 (real) UID、実効 (effective) UID、 保存 (saved) set-user-ID .RB ( getresgid の場合はグループ ID) を、 それぞれ引き数 .IR ruid , .IR euid , .I suid に格納して返す。 .BR getresgid () は、呼び出したプロセスのグループ ID について同様の処理を行う。 .\"O .SH "RETURN VALUE" .SH 返り値 .\"O On success, zero is returned. .\"O On error, \-1 is returned, and .\"O .I errno .\"O is set appropriately. 成功した場合はゼロを返す。エラーの場合は \-1 を返し、 .I errno が適切に設定される。 .\"O .SH ERRORS .SH エラー .TP .B EFAULT .\"O One of the arguments specified an address outside the calling program's .\"O address space. 指定した引き数のどれかが、呼び出したプログラムのアドレス空間の外の アドレスである。 .\"O .SH VERSIONS .SH バージョン .\"O These system calls appeared on Linux starting with kernel 2.1.44. これらのシステムコールはカーネル 2.1.44 から Linux に登場した。 .\"O The prototypes are given by glibc since version 2.3.2 .\"O provided .\"O .B _GNU_SOURCE .\"O is defined. プロトタイプ宣言は 2.3.2 以降の glibc では .B _GNU_SOURCE を定義していると得られる。 .\"O .SH "CONFORMING TO" .SH 準拠 .\"O These calls are nonstandard; .\"O they also appear on HP-UX and some of the BSDs. これらのコールは非標準である。 HP-UX や BSD 系のいくつかにも存在する。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR getuid (2), .BR setresuid (2), .BR setreuid (2), .BR setuid (2), .BR credentials (7)