]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
credentials.7: Add a list of the APIs that change a process's credentials
authorMichael Kerrisk <mtk.manpages@gmail.com>
Tue, 21 Apr 2020 11:55:22 +0000 (13:55 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Tue, 21 Apr 2020 11:55:22 +0000 (13:55 +0200)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man7/credentials.7

index 431639c7b9fbd6e753db063b9bc9515924d66739..95558f5d19926c31743669d92ab636301fc55f38 100644 (file)
@@ -247,9 +247,7 @@ of which a process may be a member.
 .\" /proc/sys/kernel/ngroups_max.
 .\" As at 2.6.22-rc2, this file is still read-only.
 A process can obtain its set of supplementary group IDs using
-.BR getgroups (2),
-and can modify the set using
-.BR setgroups (2).
+.BR getgroups (2).
 .PP
 A child process created by
 .BR fork (2)
@@ -261,6 +259,33 @@ group IDs are preserved;
 the effective and saved set IDs may be changed, as described in
 .BR execve (2).
 .PP
+Subject to rules described in the relevant manual pages,
+a process can use the following APIs to modify its user and group IDs:
+.TP
+.BR setuid "(2) (" setgid (2))
+Modify the process's real (and possibly effective and saved-set)
+user (group) IDs.
+.TP
+.BR seteuid "(2) (" setegid (2))
+Modify the process's effective user (group) ID.
+.TP
+.BR setfsuid "(2) (" setfsgid (2))
+Modify the process's filesystem user (group) ID.
+.TP
+.BR setreuid "(2) (" setregid (2))
+Modify the process's real and effective (and possibly saved-set)
+user (group) IDs.
+.TP
+.BR setresuid "(2) (" setresgid (2))
+Modify the process's real, effective, and saved-set user (group) IDs.
+.TP
+.BR setgroups (2)
+Modify the process's supplementary group list.
+.PP
+Any changes to a process's effective user (group) ID
+are automatically carried over to the process's
+filesystem user (group) ID.
+.PP
 Aside from the purposes noted above,
 a process's user IDs are also employed in a number of other contexts:
 .IP * 3