函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\mount.c Create Date:2022-07-27 21:13:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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.

函数原型:int tomoyo_mount_permission(const char *dev_name, const struct path *path, const char *type, unsigned long flags, void *data_page)

返回类型:int

参数:

类型参数名称
const char *dev_name
const struct path *path
const char *type
unsigned longflags
void *data_page
199  如果tomoyo_init_request_info( & r, NULL, TOMOYO_MAC_FILE_MOUNT)恒等于TOMOYO_CONFIG_DISABLED则返回:0
202  如果flags按位与MS_MGC_MSK的值恒等于Old magic mount flag and maskflags与等于MS_MGC_MSK的反
204  如果flags按位与Alter flags of a mounted FS
205  type等于String table for special mount operations. [mount -o remount /dir ]
206  flags与等于Alter flags of a mounted FS 的反
207  否则如果flags按位与MS_BIND
208  type等于String table for special mount operations. [mount --bind /source /dest ]
209  flags与等于MS_BIND的反
210  否则如果flags按位与change to shared
211  如果flags按位与change to private 按位或change to slave 按位或change to unbindable 的值则返回:负EINVAL
213  type等于String table for special mount operations. [mount --make-shared /dir ]
214  flags与等于change to shared 的反
215  否则如果flags按位与change to private
216  如果flags按位与change to shared 按位或change to slave 按位或change to unbindable 的值则返回:负EINVAL
218  type等于String table for special mount operations. [mount --make-private /dir ]
219  flags与等于change to private 的反
220  否则如果flags按位与change to slave
221  如果flags按位与change to shared 按位或change to private 按位或change to unbindable 的值则返回:负EINVAL
223  type等于String table for special mount operations. [mount --make-slave /dir ]
224  flags与等于change to slave 的反
225  否则如果flags按位与change to unbindable
226  如果flags按位与change to shared 按位或change to private 按位或change to slave 的值则返回:负EINVAL
228  type等于String table for special mount operations. [mount --make-unbindable /dir ]
229  flags与等于change to unbindable 的反
230  否则如果flags按位与MS_MOVE
231  type等于String table for special mount operations. [mount --move /old /new ]
232  flags与等于MS_MOVE的反
234  如果非typetype等于"<NULL>"
236  idx等于moyo_read_lock - Take lock for protecting policy.* Returns index number for tomoyo_read_unlock().
237  error等于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.
238  moyo_read_unlock - Release lock for protecting policy.*@idx: Index number returned by tomoyo_read_lock().* Returns nothing.
239  返回:error
调用者
名称描述
tomoyo_sb_mountmoyo_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.