当前位置: 技术问答>linux和unix
有效组id值为-1有什么特别的意思吗?
来源: 互联网 发布时间:2015-08-29
本文导语: setregid (getegid(), -1); 这一句执行后,对程序有什么影响? | setregid( ) is used to set the real and effective group IDs of the calling process. If rgid is -1, the real group ID is not changed; if e...
setregid (getegid(), -1);
这一句执行后,对程序有什么影响?
这一句执行后,对程序有什么影响?
|
setregid( ) is used to set the real and effective group IDs of
the calling process. If rgid is -1, the real group ID is not
changed; if egid is -1, the effective group ID is not changed.
The real and effective group IDs may be set to different values
in the same call.
If the effective user ID of the calling process is root, the real
group ID and the effective group ID can be set to any legal
value.
If the effective user ID of the calling process is not root, the
real group ID can be set to the saved set-group ID from
execve(S), or the effective group ID can be set to either the
saved set-group ID or the real group ID. If a set-GID process
sets its effective group ID to its real group ID, it can still
set its effective group ID back to the saved set-group ID.
If the real group ID is changed (rgid is not -1), the saved
set-group ID is set to that same value.
the calling process. If rgid is -1, the real group ID is not
changed; if egid is -1, the effective group ID is not changed.
The real and effective group IDs may be set to different values
in the same call.
If the effective user ID of the calling process is root, the real
group ID and the effective group ID can be set to any legal
value.
If the effective user ID of the calling process is not root, the
real group ID can be set to the saved set-group ID from
execve(S), or the effective group ID can be set to either the
saved set-group ID or the real group ID. If a set-GID process
sets its effective group ID to its real group ID, it can still
set its effective group ID back to the saved set-group ID.
If the real group ID is changed (rgid is not -1), the saved
set-group ID is set to that same value.
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。