Lines Matching refs:req
104 static int handle_req(struct seccomp_notif *req, in handle_req() argument
110 resp->id = req->id; in handle_req()
114 if (req->data.nr != __NR_mount) { in handle_req()
115 fprintf(stderr, "huh? trapped something besides mount? %d\n", req->data.nr); in handle_req()
120 if (!(req->data.args[3] & MS_BIND)) in handle_req()
127 snprintf(path, sizeof(path), "/proc/%d/mem", req->pid); in handle_req()
145 if (ioctl(listener, SECCOMP_IOCTL_NOTIF_ID_VALID, &req->id) < 0) { in handle_req()
155 if (lseek(mem, req->data.args[0], SEEK_SET) < 0) { in handle_req()
166 if (lseek(mem, req->data.args[1], SEEK_SET) < 0) { in handle_req()
183 if (mount(source, target, NULL, req->data.args[3], NULL) < 0) { in handle_req()
289 struct seccomp_notif *req; in main() local
298 req = malloc(sizes.seccomp_notif); in main()
299 if (!req) in main()
308 memset(req, 0, sizes.seccomp_notif); in main()
309 if (ioctl(listener, SECCOMP_IOCTL_NOTIF_RECV, req)) { in main()
314 if (handle_req(req, resp, listener) < 0) in main()
335 free(req); in main()