Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\apparmor\mount.c Create Date:2022-07-28 19:54:42
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:audit_mount - handle the auditing of mount operations*@profile: the profile being enforced (NOT NULL)*@op: operation being mediated (NOT NULL)*@name: name of object being mediated (MAYBE NULL)*@src_name: src_name of object being mediated

Proto:static int audit_mount(struct aa_profile *profile, const char *op, const char *name, const char *src_name, const char *type, const char *trans, unsigned long flags, const void *data, unsigned int request, struct aa_perms *perms, const char *info, int error)

Type:int

Parameter:

TypeParameterName
struct aa_profile *profile
const char *op
const char *name
const char *src_name
const char *type
const char *trans
unsigned longflags
const void *data
unsigned intrequest
struct aa_perms *perms
const char *info
interror
136  audit_type = AUDIT_APPARMOR_AUTO
137  TODO: cleanup audit init so we don't need _aad = {0,} (sa, LSM_AUDIT_DATA_NONE, op)
139  If Value is more likely to compile time(!error) Then
140  mask = set only when allow is set
142  If Value for the false possibility is greater at compile time(AUDIT_MODE(profile) == AUDIT_ALL) Then mask = 0xffff
146  request &= mask
148  If Value is more likely to compile time(!request) Then Return 0
150  audit_type = AUDIT_APPARMOR_AUDIT
151  Else
153  request = request & ~allow
155  If request & set only when ~allow | deny Then audit_type = AUDIT_APPARMOR_KILL
159  If request & set only when ~allow | deny && AUDIT_MODE(profile) != do not quiet audit messages && AUDIT_MODE(profile) != AUDIT_ALL Then request &= ~ set only when ~allow | deny
164  If Not request Then Return error
168  name = name
169  src_name = src_name
170  type = type
171  trans = trans
172  flags = flags
173  If data && set only when allow is set & AA_AUDIT_DATA Then data = data
175  info = info
176  error = error
178  Return aa_audit - Log a profile based audit event to the audit subsystem*@type: audit type for the message*@profile: profile to check against (NOT NULL)*@sa: audit event (NOT NULL)*@cb: optional callback fn for type specific fields (MAYBE NULL)* Handle default
Caller
NameDescribe
match_mnt_path_strmatch_mnt_path_str - handle path matching for mount*@profile: the confining profile*@mntpath: for the mntpnt (NOT NULL)*@buffer: buffer to be used to lookup mntpath*@devnme: string for the devname/src_name (MAY BE NULL OR ERRPTR)*@type: string for the dev
profile_umount
build_pivotroothelper fn for transition on pivotroot* Returns: label for transition or ERR_PTR. Does not return NULL
aa_pivotroot