SETFSUID(2) Linux Programmer's Manual SETFSUID(2)
NAME
setfsuid - set user identity used for filesystem checks
SYNOPSIS
#include <sys/fsuid.h>
int setfsuid(uid_t fsuid);
DESCRIPTION
The system call setfsuid() changes the value of the caller's filesystem
user ID--the user ID that the Linux kernel uses to check for all
accesses to the filesystem. Normally, the value of the filesystem user
ID will shadow the value of the effective user ID. In fact, whenever
the effective user ID is changed, the filesystem user ID will also be
changed to the new value of the effective user ID.
Explicit calls to setfsuid() and setfsgid vulnera-
ble to receiving signals sent by another (unprivileged) process with
the same user ID. The filesystem user ID attribute was thus added to
allow a process to change its user ID for the purposes of file permis-
sion checking without at the same time becoming vulnerable to receiving
unwanted signals. Since Linux 2.0, signal permission handling is dif-
ferent (see kill(2)), with the result that a process deter-
mines that the argument can't be passed to the kernel without integer
truncation (because the kernel is old and does not support 32-bit user
IDs), 4.10 of the Linux man-pages project. A
description of the project, information about reporting bugs, and the
latest version of this page, can be found at.
Linux 2016-07-17 SETFSUID(2)