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

📄 syscalls_68.html

📁 Linux系统调用
💻 HTML
字号:
<!-- This HTML file has been created by texi2html 1.29
     from syscalls.texi on 4 June 1994 -->

<TITLE>Syscall specifications of Linux - setreuid</TITLE>
<P>Go to the <A HREF="syscalls_67.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_67.html">previous</A>, <A HREF="syscalls_69.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_69.html">next</A> section.<P>
<H2><A NAME="SEC68" HREF="syscalls_toc.html#SEC68" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_toc.html#SEC68">setreuid</A></H2>
<P>
<H3>SYNOPSIS</H3>
<P>
<CODE>int setrugid(gid_t <VAR>ruid</VAR>, gid_t <VAR>euid</VAR>);</CODE>
 
<H3>PARAMETERS</H3>
<P>
<VAR>rgid</VAR>: [in] the new real uid, -1 for no change.
<P>
<VAR>egid</VAR>: [in] the new effective uid, -1 for no change.
<P>
<H3>DESCRIPTION</H3>
<P>
Sets both the real and effective uid of the task. If the calling task
does not have superuser privileges, it can only swap its real and
effective uids. If the calling task has superuser privileges, it can set
the effective and real uids to whatever it wants. The saved uid is set
to the same value of the effective uid. This is done so that a programm
using this call will be considered 100% BSD compatible.
<P>
<H3>RETURN VALUE</H3>
<P>
On success, returns 0. On error, returns -1 and <CODE>errno</CODE> is set to
one of the following values: <CODE>EPERM</CODE>: the task tried something else
than just changing the effective uid to the real uid and the real uid to
the effective uid and the task does not have superuser privileges.
<P>
<P>Go to the <A HREF="syscalls_67.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_67.html">previous</A>, <A HREF="syscalls_69.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_69.html">next</A> section.<P>

⌨️ 快捷键说明

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