• Home
  • Raw
  • Download

Lines Matching refs:hdr

517 static bool get_caller_has_rw_locked(struct fuse* fuse, const struct fuse_in_header *hdr) {  in get_caller_has_rw_locked()  argument
523 appid_t appid = multiuser_get_app_id(hdr->uid); in get_caller_has_rw_locked()
531 const struct fuse_in_header *hdr, const struct node* parent_node, in check_caller_access_to_name() argument
549 if (hdr->uid == 0) { in check_caller_access_to_name()
556 if (parent_node && hdr->uid == parent_node->uid) { in check_caller_access_to_name()
568 const struct fuse_in_header *hdr, const struct node* node, int mode, bool has_rw) { in check_caller_access_to_node() argument
569 return check_caller_access_to_name(fuse, hdr, node->parent, node->name, mode, has_rw); in check_caller_access_to_node()
748 struct fuse_out_header hdr; in fuse_status() local
749 hdr.len = sizeof(hdr); in fuse_status()
750 hdr.error = err; in fuse_status()
751 hdr.unique = unique; in fuse_status()
752 write(fuse->fd, &hdr, sizeof(hdr)); in fuse_status()
757 struct fuse_out_header hdr; in fuse_reply() local
761 hdr.len = len + sizeof(hdr); in fuse_reply()
762 hdr.error = 0; in fuse_reply()
763 hdr.unique = unique; in fuse_reply()
765 vec[0].iov_base = &hdr; in fuse_reply()
766 vec[0].iov_len = sizeof(hdr); in fuse_reply()
822 const struct fuse_in_header *hdr, const char* name) in handle_lookup() argument
830 parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, in handle_lookup()
832 TRACE("[%d] LOOKUP %s @ %"PRIx64" (%s)\n", handler->token, name, hdr->nodeid, in handle_lookup()
840 if (!check_caller_access_to_name(fuse, hdr, parent_node, name, R_OK, false)) { in handle_lookup()
844 return fuse_reply_entry(fuse, hdr->unique, parent_node, name, actual_name, child_path); in handle_lookup()
848 const struct fuse_in_header *hdr, const struct fuse_forget_in *req) in handle_forget() argument
853 node = lookup_node_by_id_locked(fuse, hdr->nodeid); in handle_forget()
855 hdr->nodeid, node ? node->name : "?"); in handle_forget()
867 const struct fuse_in_header *hdr, const struct fuse_getattr_in *req) in handle_getattr() argument
873 node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, path, sizeof(path)); in handle_getattr()
875 req->getattr_flags, req->fh, hdr->nodeid, node ? node->name : "?"); in handle_getattr()
881 if (!check_caller_access_to_node(fuse, hdr, node, R_OK, false)) { in handle_getattr()
885 return fuse_reply_attr(fuse, hdr->unique, node, path); in handle_getattr()
889 const struct fuse_in_header *hdr, const struct fuse_setattr_in *req) in handle_setattr() argument
897 has_rw = get_caller_has_rw_locked(fuse, hdr); in handle_setattr()
898 node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, path, sizeof(path)); in handle_setattr()
900 req->fh, req->valid, hdr->nodeid, node ? node->name : "?"); in handle_setattr()
906 if (!check_caller_access_to_node(fuse, hdr, node, W_OK, has_rw)) { in handle_setattr()
948 return fuse_reply_attr(fuse, hdr->unique, node, path); in handle_setattr()
952 const struct fuse_in_header* hdr, const struct fuse_mknod_in* req, const char* name) in handle_mknod() argument
961 has_rw = get_caller_has_rw_locked(fuse, hdr); in handle_mknod()
962 parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, in handle_mknod()
965 name, req->mode, hdr->nodeid, parent_node ? parent_node->name : "?"); in handle_mknod()
972 if (!check_caller_access_to_name(fuse, hdr, parent_node, name, W_OK, has_rw)) { in handle_mknod()
979 return fuse_reply_entry(fuse, hdr->unique, parent_node, name, actual_name, child_path); in handle_mknod()
983 const struct fuse_in_header* hdr, const struct fuse_mkdir_in* req, const char* name) in handle_mkdir() argument
992 has_rw = get_caller_has_rw_locked(fuse, hdr); in handle_mkdir()
993 parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, in handle_mkdir()
996 name, req->mode, hdr->nodeid, parent_node ? parent_node->name : "?"); in handle_mkdir()
1003 if (!check_caller_access_to_name(fuse, hdr, parent_node, name, W_OK, has_rw)) { in handle_mkdir()
1029 return fuse_reply_entry(fuse, hdr->unique, parent_node, name, actual_name, child_path); in handle_mkdir()
1033 const struct fuse_in_header* hdr, const char* name) in handle_unlink() argument
1041 has_rw = get_caller_has_rw_locked(fuse, hdr); in handle_unlink()
1042 parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, in handle_unlink()
1045 name, hdr->nodeid, parent_node ? parent_node->name : "?"); in handle_unlink()
1052 if (!check_caller_access_to_name(fuse, hdr, parent_node, name, W_OK, has_rw)) { in handle_unlink()
1062 const struct fuse_in_header* hdr, const char* name) in handle_rmdir() argument
1070 has_rw = get_caller_has_rw_locked(fuse, hdr); in handle_rmdir()
1071 parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, in handle_rmdir()
1074 name, hdr->nodeid, parent_node ? parent_node->name : "?"); in handle_rmdir()
1081 if (!check_caller_access_to_name(fuse, hdr, parent_node, name, W_OK, has_rw)) { in handle_rmdir()
1091 const struct fuse_in_header* hdr, const struct fuse_rename_in* req, in handle_rename() argument
1106 has_rw = get_caller_has_rw_locked(fuse, hdr); in handle_rename()
1107 old_parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, in handle_rename()
1113 hdr->nodeid, old_parent_node ? old_parent_node->name : "?", in handle_rename()
1119 if (!check_caller_access_to_name(fuse, hdr, old_parent_node, old_name, W_OK, has_rw)) { in handle_rename()
1123 if (!check_caller_access_to_name(fuse, hdr, new_parent_node, new_name, W_OK, has_rw)) { in handle_rename()
1184 const struct fuse_in_header* hdr, const struct fuse_open_in* req) in handle_open() argument
1193 has_rw = get_caller_has_rw_locked(fuse, hdr); in handle_open()
1194 node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, path, sizeof(path)); in handle_open()
1196 req->flags, hdr->nodeid, node ? node->name : "?"); in handle_open()
1202 if (!check_caller_access_to_node(fuse, hdr, node, in handle_open()
1219 fuse_reply(fuse, hdr->unique, &out, sizeof(out)); in handle_open()
1224 const struct fuse_in_header* hdr, const struct fuse_read_in* req) in handle_read() argument
1227 __u64 unique = hdr->unique; in handle_read()
1251 const struct fuse_in_header* hdr, const struct fuse_write_in* req, in handle_write() argument
1271 fuse_reply(fuse, hdr->unique, &out, sizeof(out)); in handle_write()
1276 const struct fuse_in_header* hdr) in handle_statfs() argument
1302 fuse_reply(fuse, hdr->unique, &out, sizeof(out)); in handle_statfs()
1307 const struct fuse_in_header* hdr, const struct fuse_release_in* req) in handle_release() argument
1318 const struct fuse_in_header* hdr, const struct fuse_fsync_in* req) in handle_fsync() argument
1320 bool is_dir = (hdr->opcode == FUSE_FSYNCDIR); in handle_fsync()
1343 const struct fuse_in_header* hdr) in handle_flush() argument
1350 const struct fuse_in_header* hdr, const struct fuse_open_in* req) in handle_opendir() argument
1358 node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, path, sizeof(path)); in handle_opendir()
1360 hdr->nodeid, node ? node->name : "?"); in handle_opendir()
1366 if (!check_caller_access_to_node(fuse, hdr, node, R_OK, false)) { in handle_opendir()
1382 fuse_reply(fuse, hdr->unique, &out, sizeof(out)); in handle_opendir()
1387 const struct fuse_in_header* hdr, const struct fuse_read_in* req) in handle_readdir() argument
1410 fuse_reply(fuse, hdr->unique, fde, in handle_readdir()
1416 const struct fuse_in_header* hdr, const struct fuse_release_in* req) in handle_releasedir() argument
1427 const struct fuse_in_header* hdr, const struct fuse_init_in* req) in handle_init() argument
1440 fuse_reply(fuse, hdr->unique, &out, sizeof(out)); in handle_init()
1445 const struct fuse_in_header *hdr, const void *data, size_t data_len) in handle_fuse_request() argument
1447 switch (hdr->opcode) { in handle_fuse_request()
1450 return handle_lookup(fuse, handler, hdr, name); in handle_fuse_request()
1455 return handle_forget(fuse, handler, hdr, req); in handle_fuse_request()
1460 return handle_getattr(fuse, handler, hdr, req); in handle_fuse_request()
1465 return handle_setattr(fuse, handler, hdr, req); in handle_fuse_request()
1473 return handle_mknod(fuse, handler, hdr, req, name); in handle_fuse_request()
1479 return handle_mkdir(fuse, handler, hdr, req, name); in handle_fuse_request()
1484 return handle_unlink(fuse, handler, hdr, name); in handle_fuse_request()
1489 return handle_rmdir(fuse, handler, hdr, name); in handle_fuse_request()
1496 return handle_rename(fuse, handler, hdr, req, old_name, new_name); in handle_fuse_request()
1502 return handle_open(fuse, handler, hdr, req); in handle_fuse_request()
1507 return handle_read(fuse, handler, hdr, req); in handle_fuse_request()
1513 return handle_write(fuse, handler, hdr, req, buffer); in handle_fuse_request()
1517 return handle_statfs(fuse, handler, hdr); in handle_fuse_request()
1522 return handle_release(fuse, handler, hdr, req); in handle_fuse_request()
1528 return handle_fsync(fuse, handler, hdr, req); in handle_fuse_request()
1536 return handle_flush(fuse, handler, hdr); in handle_fuse_request()
1541 return handle_opendir(fuse, handler, hdr, req); in handle_fuse_request()
1546 return handle_readdir(fuse, handler, hdr, req); in handle_fuse_request()
1551 return handle_releasedir(fuse, handler, hdr, req); in handle_fuse_request()
1556 return handle_init(fuse, handler, hdr, req); in handle_fuse_request()
1561 handler->token, hdr->opcode, hdr->unique, hdr->nodeid); in handle_fuse_request()
1585 const struct fuse_in_header *hdr = (void*)handler->request_buffer; in handle_fuse_requests() local
1586 if (hdr->len != (size_t)len) { in handle_fuse_requests()
1588 handler->token, (size_t)len, hdr->len); in handle_fuse_requests()
1594 __u64 unique = hdr->unique; in handle_fuse_requests()
1595 int res = handle_fuse_request(fuse, handler, hdr, data, data_len); in handle_fuse_requests()