Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:aa_label_snxprint - print a label name to a string buffer*@str: buffer to write to

Proto:int aa_label_snxprint(char *str, size_t size, struct aa_ns *ns, struct aa_label *label, int flags)

Type:int

Parameter:

TypeParameterName
char *str
size_tsize
struct aa_ns *ns
struct aa_label *label
intflags
1599  struct aa_ns * prev_ns = NULL
1601  count = 0 , total = 0
1604  AA_BUG(!str && size != 0)
1605  AA_BUG(!label)
1607  If flags & FLAG_ABS_ROOT Then
1608  ns = profile namespace
1609  len = snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
1610  helper macro for snprint routines (total, len, size, str)
1611  Else if Not ns Then
1612  ns = labels_ns(label)
1617  If count > 0 Then
1625  count++
1629  If count == 0 Then
1630  If flags & FLAG_HIDDEN_UNCONFINED Then Return snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
1632  Return snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
1638  If any visible label is not unconfined the display_mode returns true Then
1639  len = snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
1641  helper macro for snprint routines (total, len, size, str)
1644  Return total
Caller
NameDescribe
aa_getprocattraa_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*
apparmor_secid_to_secctx
aa_label_asxprintaa_label_asxprint - allocate a string buffer and print label into it*@strp: Returns - the allocated buffer with the label name
aa_label_acntsxprintaa_label_acntsxprint - allocate a __counted string buffer and print label*@strp: buffer to write to