Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:aa_getprocattr - Return the profile information for @profile*@profile: the profile to print profile info about (NOT NULL)*@string: Returns - string containing the profile info (NOT NULL)* Returns: length of @string on success else error on failure*

Proto:int aa_getprocattr(struct aa_label *label, char **string)

Type:int

Parameter:

TypeParameterName
struct aa_label *label
char **string
35  ns = labels_ns(label)
36  current_ns = aa_get_current_ns()
39  If Not aa_ns_visible(current_ns, ns, true) Then
40  aa_put_ns - decrement refcount on @ns*@ns: namespace to put reference of* Decrement reference count of @ns and if no longer in use free it
41  Return -EACCES
44  len = aa_label_snxprint(NULL, 0, current_ns, label, FLAG_SHOW_MODE | FLAG_VIEW_SUBNS | FLAG_HIDDEN_UNCONFINED)
47  AA_BUG(len < 0)
49  string = Allocation memory
50  If Not string Then
51  aa_put_ns - decrement refcount on @ns*@ns: namespace to put reference of* Decrement reference count of @ns and if no longer in use free it
52  Return -ENOMEM
55  len = aa_label_snxprint( * string, len + 2, current_ns, label, FLAG_SHOW_MODE | FLAG_VIEW_SUBNS | FLAG_HIDDEN_UNCONFINED)
58  If len < 0 Then
59  aa_put_ns - decrement refcount on @ns*@ns: namespace to put reference of* Decrement reference count of @ns and if no longer in use free it
60  Return len
63  ) = '\n'
64  ) = 0
66  aa_put_ns - decrement refcount on @ns*@ns: namespace to put reference of* Decrement reference count of @ns and if no longer in use free it
67  Return len + 1
Caller
NameDescribe
apparmor_getprocattr