Function report |
Source Code:security\tomoyo\mount.c |
Create Date:2022-07-28 19:44:31 |
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_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.
Proto:int tomoyo_mount_permission(const char *dev_name, const struct path *path, const char *type, unsigned long flags, void *data_page)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
const char * | dev_name | |
const struct path * | path | |
const char * | type | |
unsigned long | flags | |
void * | data_page |
199 | If tomoyo_init_request_info( & r, NULL, TOMOYO_MAC_FILE_MOUNT) == TOMOYO_CONFIG_DISABLED Then Return 0 |
202 | If (flags & MS_MGC_MSK) == Old magic mount flag and mask Then flags &= ~MS_MGC_MSK |
204 | If flags & Alter flags of a mounted FS Then |
206 | flags &= ~Alter flags of a mounted FS |
210 | Else if flags & change to shared Then |
211 | If flags & ( change to private | change to slave | change to unbindable ) Then Return -EINVAL |
214 | flags &= ~change to shared |
215 | Else if flags & change to private Then |
216 | If flags & ( change to shared | change to slave | change to unbindable ) Then Return -EINVAL |
219 | flags &= ~change to private |
220 | Else if flags & change to slave Then |
221 | If flags & ( change to shared | change to private | change to unbindable ) Then Return -EINVAL |
224 | flags &= ~change to slave |
225 | Else if flags & change to unbindable Then |
226 | If flags & ( change to shared | change to private | change to slave ) Then Return -EINVAL |
229 | flags &= ~change to unbindable |
236 | idx = moyo_read_lock - Take lock for protecting policy.* Returns index number for tomoyo_read_unlock(). |
239 | Return error |
Name | Describe |
---|---|
tomoyo_sb_mount | moyo_sb_mount - Target for security_sb_mount().*@dev_name: Name of device file. Maybe NULL.*@path: Pointer to "struct path".*@type: Name of filesystem type. Maybe NULL.*@flags: Mount options.*@data: 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 |