.\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) .\" .\" %%%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 .\" .\" Historical remark, aeb, 2004-06-05 .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1997 SUTO, Mitsuaki .\" all rights reserved. .\" Translated Thu Jun 26 20:37:44 JST 1997 .\" by SUTO, Mitsuaki .\" Updated & Modified Sat Feb 5 19:49:39 JST 2005 .\" by Yuichi SATO .\" Updated 2012-04-30, Akihiro MOTOKI .\" .TH GETUID 2 2019\-03\-06 Linux "Linux Programmer's Manual" .SH 名前 getuid, geteuid \- ユーザー ID を得る .SH 書式 \fB#include \fP .br \fB#include \fP .PP \fBuid_t getuid(void);\fP .br \fBuid_t geteuid(void);\fP .SH 説明 \fBgetuid\fP() は呼び出し元のプロセスの実ユーザー ID を返す。 .PP \fBgeteuid\fP() は呼び出し元のプロセスの実効ユーザー ID を返す。 .SH エラー これらの関数は常に成功する。 .SH 準拠 POSIX.1\-2001, POSIX.1\-2008, 4.3BSD. .SH 注意 .SS 歴史 UNIX\ V6 では \fBgetuid\fP() コールは \fI(euid << 8) + uid\fP を返していた。 UNIX\ V7 では \fBgetuid\fP() と \fBgeteuid\fP() という別々のコールが導入された。 .PP 元々の Linux の \fBgetuid\fP() と \fBgeteuid\fP() システムコールは 16 ビットのグループ ID だけに対応していた。 その後、Linux 2.4 で、32 ビットの ID に対応した \fBgetuid32\fP() と \fBgeteuid32\fP() が追加された。 glibc の \fBgetuid\fP() と \fBgeteuid\fP() のラッパー関数は カーネルバージョンによるこの違いを吸収している。 .PP On Alpha, instead of a pair of \fBgetuid\fP() and \fBgeteuid\fP() system calls, a single \fBgetxuid\fP() system call is provided, which returns a pair of real and effective UIDs. The glibc \fBgetuid\fP() and \fBgeteuid\fP() wrapper functions transparently deal with this. See \fBsyscall\fP(2) for details regarding register mapping. .SH 関連項目 \fBgetresuid\fP(2), \fBsetreuid\fP(2), \fBsetuid\fP(2), \fBcredentials\fP(7) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は \%https://www.kernel.org/doc/man\-pages/ に書かれている。