Lines Matching full:caps
44 FileMap caps; in FORK_TEST() local
47 caps[key] = dup(ii->second); in FORK_TEST()
48 EXPECT_OK(cap_rights_limit(caps[key], &rights)); in FORK_TEST()
49 EXPECT_OK(caps[key]) << " on " << ii->first; in FORK_TEST()
130 int CheckFcntl(unsigned long long right, int caps[FCNTL_NUM_RIGHTS], int cmd, long arg, const char*… in CheckFcntl()
140 EXPECT_NOTCAPABLE(fcntl(caps[ii], cmd, arg)); in CheckFcntl()
143 int rc = fcntl(caps[ok_index], cmd, arg); in CheckFcntl()
149 #define CHECK_FCNTL(right, caps, cmd, arg) \ argument
150 CheckFcntl(right, caps, cmd, arg, "fcntl(" #cmd ") expect " #right)
159 int caps[FCNTL_NUM_RIGHTS]; in TEST() local
162 caps[ii] = dup(fd); in TEST()
163 EXPECT_OK(caps[ii]); in TEST()
164 EXPECT_OK(cap_rights_limit(caps[ii], &(fcntl_rights[ii]))); in TEST()
170 // Check the things that need no rights against caps[0]. in TEST()
171 int newfd = fcntl(caps[0], F_DUPFD, 0); in TEST()
180 EXPECT_OK(fcntl(caps[0], F_DUP2FD, newfd)); in TEST()
187 EXPECT_OK(fcntl(caps[0], F_GETFD, 0)); in TEST()
188 EXPECT_OK(fcntl(caps[0], F_SETFD, 0)); in TEST()
191 int fd_flag = CHECK_FCNTL(CAP_FCNTL, caps, F_GETFL, 0); in TEST()
192 EXPECT_EQ(0, CHECK_FCNTL(CAP_FCNTL, caps, F_SETFL, fd_flag)); in TEST()
203 EXPECT_EQ(0, CHECK_FCNTL(CAP_FLOCK, caps, F_GETLK, (long)&fl)); in TEST()
207 close(caps[ii]); in TEST()