📄 setreuid.2
字号:
.\" SCCSID: @(#)setreuid.2 8.1 9/11/90.TH setreuid 2.SH Namesetreuid \- set real and effective user ID's.SH Syntax.nf.B setreuid\fP(\fIruid, euid\fP).B int\fP\fIruid, euid\fP;.fi.SH Description.NXR "setreuid system call".NXR "real user ID" "setting".NXR "effective user ID" "setting"The real and effective user ID's of thecurrent process are set according to the arguments.If.I ruidor .I euidis \-1, the current uid is filled in by the system..SH Return ValuesUpon successful completion, a value of zero (0) is returned. Otherwise,a value of \-1 is returned and \fIerrno\fP is set to indicate the error..SH Environment.PP .B BSD.br If the process is superuser, or .PN ruidand.PN euidmatches with the real user ID, the effective user ID, or the savedset-user-id (as described in .MS execve 2), then the real, effective, and the saved set-user-id are set to.PN ruid ,.PN euid ,and.PN euid ,respectively..PP .B POSIX.br.B SYSTEM-FIVE.br When your program is compiled in the POSIX or SYSTEM-FIVE mode,if both arguments to .PN setreuid are \-1, the system call returnsa value of \-1 and errno is set to [EINVAL]..PPThe following semantics apply when using the .PN setreuidfunction:.PPIf the process is the superuser, the real, effective, and savedset-user-id (as described in.MS execve 2) are set to.PN ruid ,.PN euid ,and.PN euid ,respectively..PPIf the process is not the superuser, but the.PN ruidand.PN euidmatches with the real user ID, the effective user ID (only inthe SYSTEM-FIVE and BSD environments), or the saved set-user-id, then theeffective ID is set to .PN euid. The real user ID and the saved set-user-id are left unchanged..SH Diagnostics.TP 15[EPERM]The current process is not the superuser and the .PN euidand.PN ruidspecified does not match with the real user ID, the effective user ID(only in SYSTEM-FIVE and BSD environment), or the saved set-user-id..SH See Alsogetuid(2), setregid(2), setuid(3)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -