version 1 showing authors affecting page license.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
SETFSGID |
|
|
2 |
!!!SETFSGID |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
RETURN VALUE |
|
|
7 |
CONFORMING TO |
|
|
8 |
BUGS |
|
|
9 |
NOTE |
|
|
10 |
SEE ALSO |
|
|
11 |
---- |
|
|
12 |
!!NAME |
|
|
13 |
|
|
|
14 |
|
|
|
15 |
setfsgid - set group identity used for file system checks |
|
|
16 |
!!SYNOPSIS |
|
|
17 |
|
|
|
18 |
|
|
|
19 |
__#include __ /* glibc uses |
|
|
20 |
__ |
|
|
21 |
|
|
|
22 |
|
|
|
23 |
__int setfsgid(uid_t__ ''fsgid''__);__ |
|
|
24 |
!!DESCRIPTION |
|
|
25 |
|
|
|
26 |
|
|
|
27 |
__setfsgid__ sets the group ID that the Linux kernel uses |
|
|
28 |
to check for all accesses to the file system. Normally, the |
|
|
29 |
value of ''fsgid'' will shadow the value of the effective |
|
|
30 |
group ID. In fact, whenever the effective group ID is |
|
|
31 |
changed, ''fsgid'' will also be changed to new value of |
|
|
32 |
effective group ID. |
|
|
33 |
|
|
|
34 |
|
|
|
35 |
An explicit call to __setfsgid__ is usually only used by |
|
|
36 |
programs such as the Linux NFS server that need to change |
|
|
37 |
what group ID is used for file access without a |
|
|
38 |
corresponding change in the real and effective group IDs. A |
|
|
39 |
change in the normal group IDs for a program such as the NFS |
|
|
40 |
server is a security hole that can expose it to unwanted |
|
|
41 |
signals from other group IDs. |
|
|
42 |
|
|
|
43 |
|
|
|
44 |
__setfsgid__ will only succeed if the caller is the |
|
|
45 |
superuser or if ''fsgid'' matches either the real group |
|
|
46 |
ID, effective group ID, saved set-group-ID, or the current |
|
|
47 |
value of ''fsgid''. |
|
|
48 |
!!RETURN VALUE |
|
|
49 |
|
|
|
50 |
|
|
|
51 |
On success, the previous value of ''fsgid'' is returned. |
|
|
52 |
On error, the current value of ''fsgid'' is |
|
|
53 |
returned. |
|
|
54 |
!!CONFORMING TO |
|
|
55 |
|
|
|
56 |
|
|
|
57 |
__setfsgid__ is Linux specific and should not be used in |
|
|
58 |
programs intended to be portable. |
|
|
59 |
!!BUGS |
|
|
60 |
|
|
|
61 |
|
|
|
62 |
No error messages of any kind are returned to the caller. At |
|
|
63 |
the very least, __EPERM__ should be returned when the |
|
|
64 |
call fails. |
|
|
65 |
!!NOTE |
|
|
66 |
|
|
|
67 |
|
|
|
68 |
When glibc determines that the argument is not a valid gid, |
|
|
69 |
it will return -1 and set ''errno'' to EINVAL without |
|
|
70 |
attempting the system call. |
|
|
71 |
!!SEE ALSO |
|
|
72 |
|
|
|
73 |
|
|
|
74 |
setfsuid(2) |
|
|
75 |
---- |