⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 setuid.2

📁 Unix操作系统minix 2.0源码
💻 2
字号:
.\" Copyright (c) 1980 Regents of the University of California..\" All rights reserved.  The Berkeley software License Agreement.\" specifies the terms and conditions for redistribution..\".\"	@(#)setreuid.2	6.1 (Berkeley) 5/9/85.\".TH SETUID 2 "May 9, 1985".UC 4.SH NAMEsetuid, setgid \- set user or group ID's.SH SYNOPSIS.nf.ft B#include <sys/types.h>int setuid(uid_t \fIuid\fP)int setgid(gid_t \fIgid\fP).ft R.fi.SH DESCRIPTION.B Setuidsets the real and effective user ID's of thecurrent process to.IR uid .Unprivileged users may only change both user ID'sto the real user ID; only the super-user maymake other changes..B Setgiddoes the same for the real and effective group ID's..PPMinix-vmdallows an unprivileged user to change ID's to the original real or effectiveID as they were at the time the process was executed..B Setgidmay also set the group ID's to any of the additional group ID's.If one of theremembered user ID's was 0 then any user or group ID may be chosen..SH "RETURN VALUEUpon successful completion, a value of 0 is returned.  Otherwise,a value of \-1 is returned and \fBerrno\fP is set to indicate the error..SH "ERRORS.TP 15[EPERM]The current process is not the super-user and a changeother than one of the allowed changes was attempted..SH "SEE ALSO".BR getuid (2),.BR getgid (2).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -