Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:verify_head - unpack serialized stream header*@e: serialized data read head (NOT NULL)*@required: whether the header is required or optional*@ns: Returns - namespace if one is specified else NULL (NOT NULL)* Returns: error or 0 if header is good

Proto:static int verify_header(struct aa_ext *e, int required, const char **ns)

Type:int

Parameter:

TypeParameterName
struct aa_ext *e
intrequired
const char **ns
944  error = -EPROTONOSUPPORT
945  const char * name = NULL
946  * ns = NULL
949  If Not unpack_u32(e, & version, "version") Then
950  If required Then
953  Return error
961  If VERSION_LT(version, ase version ) || VERSION_GT(version, v7) Then
962  audit_iface - do audit message for policy unpacking/load/replace/remove*@new: profile if it has been allocated (MAYBE NULL)*@ns_name: name of the ns the profile is to be loaded to (MAY BE NULL)*@name: name of the profile being manipulated (MAYBE
964  Return error
968  If unpack_str(e, & name, "namespace") Then
969  If name == '\0' Then
972  Return error
974  If ns && strcmp( * ns, name) Then
977  Else if Not ns Then
979  If Not ns Then Return -ENOMEM
984  Return 0
Caller
NameDescribe
aa_unpackaa_unpack - unpack packed binary profile(s) data loaded from user space*@udata: user data copied to kmem (NOT NULL)*@lh: list to place unpacked profiles in a aa_repl_ws*@ns: Returns namespace profile is in if specified else NULL (NOT NULL)* Unpack user