Lines Matching refs:mode
32 extern int __fchmod(int fd, mode_t mode);
41 fchmod(int fd, mode_t mode)
43 int res = __fchmod(fd, mode);
45 if (res >= 0 || errno != EPERM || (mode & (S_ISUID | S_ISGID)) == 0)
47 if (mode & S_ISGID) {
48 res = __fchmod(fd, mode ^ S_ISGID);
52 if (mode & S_ISUID) {
53 res = __fchmod(fd, mode ^ S_ISUID);
57 if ((mode & (S_ISUID | S_ISGID)) == (S_ISUID | S_ISGID))
58 res = __fchmod(fd, mode ^ (S_ISUID | S_ISGID));