Function report |
Source Code:security\tomoyo\mount.c |
Create Date:2022-07-28 19:44:23 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:moyo_mount_acl - Check permission for mount() operation.*@r: Pointer to "struct tomoyo_request_info".*@dev_name: Name of device file. Maybe NULL.*@dir: Pointer to "struct path".*@type: Name of filesystem type.*@flags: Mount options.
Proto:static int tomoyo_mount_acl(struct tomoyo_request_info *r, const char *dev_name, const struct path *dir, const char *type, unsigned long flags)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct tomoyo_request_info * | r | |
const char * | dev_name | |
const struct path * | dir | |
const char * | type | |
unsigned long | flags |
82 | struct tomoyo_obj_info obj = {} |
84 | struct file_system_type * fstype = NULL |
85 | const char * requested_type = NULL |
86 | const char * requested_dir_name = NULL |
87 | const char * requested_dev_name = NULL |
91 | need_dev = 0 |
94 | For holding parameters specific to operations which deal files.* NULL if not dealing files. = obj |
97 | requested_type = tomoyo_encode(type) |
98 | If Not requested_type Then Go to out |
100 | name = requested_type |
101 | tomoyo_fill_path_info( & rtype) |
105 | requested_dir_name = moyo_realpath_from_path - Returns realpath(3) of the given pathname but ignores chroot'ed root |
106 | If Not requested_dir_name Then |
110 | name = requested_dir_name |
111 | tomoyo_fill_path_info( & rdir) |
121 | Else if type == String table for special mount operations. [mount --bind /source /dest ] || type == String table for special mount operations. [mount --move /old /new ] Then |
123 | need_dev = -1 |
124 | Else |
125 | fstype = get_fs_type(type) |
126 | If Not fstype Then |
130 | If fs_flags & FS_REQUIRES_DEV Then need_dev = 1 |
134 | If need_dev Then |
136 | If Not dev_name || kern_path(dev_name, llow links at the end , & path) Then |
141 | requested_dev_name = moyo_realpath_from_path - Returns realpath(3) of the given pathname but ignores chroot'ed root |
142 | If Not requested_dev_name Then |
146 | Else |
151 | If Not requested_dev_name Then |
156 | name = requested_dev_name |
157 | tomoyo_fill_path_info( & rdev) |
164 | Do |
168 | out : |
169 | kfree(requested_dev_name) |
170 | kfree(requested_dir_name) |
171 | If fstype Then put_filesystem(fstype) |
173 | kfree(requested_type) |
175 | If dentry Then path_put( & First pathname. Initialized with { NULL, NULL } if no path. ) |
177 | Return error |
Name | Describe |
---|---|
tomoyo_mount_permission | moyo_mount_permission - Check permission for mount() operation.*@dev_name: Name of device file. Maybe NULL.*@path: Pointer to "struct path".*@type: Name of filesystem type. Maybe NULL.*@flags: Mount options.*@data_page: Optional data. Maybe NULL. |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |