Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:apparmor_getprocattr

Proto:static int apparmor_getprocattr(struct task_struct *task, char *name, char **value)

Type:int

Parameter:

TypeParameterName
struct task_struct *task
char *name
char **value
591  error = -ENOENT
593  cred = get_task_cred - Get another task's objective credentials*@task: The task to query* Get the objective credentials of a task, pinning them so that they can't go* away
594  ctx = task_ctx(current process)
595  struct aa_label * label = NULL
597  If strcmp(name, "current") == 0 Then label = aa_get_newest_label - find the newest version of @l*@l: the label to check for newer versions of* Returns: refcounted newest version of @l taking into account* replacement, renames and removals* return @l.
599  Else if strcmp(name, "prev") == 0 && previous Then label = aa_get_newest_label - find the newest version of @l*@l: the label to check for newer versions of* Returns: refcounted newest version of @l taking into account* replacement, renames and removals* return @l.
601  Else if strcmp(name, "exec") == 0 && onexec Then label = aa_get_newest_label - find the newest version of @l*@l: the label to check for newer versions of* Returns: refcounted newest version of @l taking into account* replacement, renames and removals* return @l.
603  Else error = -EINVAL
606  If label Then error = 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*
609  aa_put_label(label)
610  put_cred - Release a reference to a set of credentials*@cred: The credentials to release* Release a reference to a set of credentials, deleting them when the last ref* is released
612  Return error