函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Derived from fs/exec.c:flush_old_files.

函数原型:static inline void flush_unauthorized_files(const struct cred *cred, struct files_struct *files)

返回类型:void

参数:

类型参数名称
const struct cred *cred
struct files_struct *files
2454  struct file * file, * devnull = NULL
2456  drop_tty等于0
2459  tty等于get_current_tty()
2460  如果tty
2461  加自旋锁
2462  如果非链表为空
2472  file等于file
2476  自旋锁解锁
2477  tty_kref_put(tty)
2480  如果drop_ttyno_tty()
2484  n等于iterate_fd(files, 0, match_file, cred)
2485  如果非n则返回
2488  devnull等于dentry_open( & selinux_null, O_RDWR, cred)
2489  如果是错误devnull = NULL
2492  循环
2493  replace_fd(n - 1, devnull, 0)
2494 n等于iterate_fd(files, n, match_file, cred)不等于0循环
2495  如果devnullfput(devnull)
调用者
名称描述
selinux_bprm_committing_credsPrepare a process for imminent new credential changes due to exec