Lines Matching +full:status +full:- +full:sizes
48 cmsg->cmsg_level = SOL_SOCKET; in send_fd()
49 cmsg->cmsg_type = SCM_RIGHTS; in send_fd()
50 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); in send_fd()
53 msg.msg_controllen = cmsg->cmsg_len; in send_fd()
57 return -1; in send_fd()
81 return -1; in recv_fd()
112 int ret = -1, mem; in handle_req()
114 resp->id = req->id; in handle_req()
115 resp->error = -EPERM; in handle_req()
116 resp->val = 0; in handle_req()
118 if (req->data.nr != __NR_mount) { in handle_req()
119 fprintf(stderr, "huh? trapped something besides mount? %d\n", req->data.nr); in handle_req()
120 return -1; in handle_req()
124 if (!(req->data.args[3] & MS_BIND)) in handle_req()
131 snprintf(path, sizeof(path), "/proc/%d/mem", req->pid); in handle_req()
135 return -1; in handle_req()
144 * Note that this check should occur *after* any task-specific in handle_req()
149 if (ioctl(listener, SECCOMP_IOCTL_NOTIF_ID_VALID, &req->id) < 0) { in handle_req()
159 if (lseek(mem, req->data.args[0], SEEK_SET) < 0) { in handle_req()
170 if (lseek(mem, req->data.args[1], SEEK_SET) < 0) { in handle_req()
187 if (mount(source, target, NULL, req->data.args[3], NULL) < 0) { in handle_req()
188 ret = -1; in handle_req()
192 resp->error = 0; in handle_req()
207 int sk_pair[2], ret = 1, status, listener; in main() local
253 if (mount("/dev/sda", "/tmp/foo", NULL, 0, NULL) != -1) { in main()
295 struct seccomp_notif_sizes sizes; in main() local
297 if (seccomp(SECCOMP_GET_NOTIF_SIZES, 0, &sizes) < 0) { in main()
302 req = malloc(sizes.seccomp_notif); in main()
306 resp = malloc(sizes.seccomp_notif_resp); in main()
309 memset(resp, 0, sizes.seccomp_notif_resp); in main()
312 memset(req, 0, sizes.seccomp_notif); in main()
347 if (waitpid(worker, &status, 0) != worker) { in main()
362 if (!WIFEXITED(status) || WEXITSTATUS(status)) { in main()