mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-22 01:57:43 +00:00
apparmor_parser: show attachment in --debug output
When showing the content of profiles with `apparmor_parser --debug`, the attachment path is now displayed within the 'Debugging built structures' section. Signed-off-by: Maxime Bélair <maxime.belair@canonical.com>
This commit is contained in:
parent
cda9153772
commit
5d7fe96fd0
@ -410,6 +410,7 @@ extern int process_policydb(Profile *prof);
|
||||
|
||||
extern int process_policy_ents(Profile *prof);
|
||||
extern void filter_slashes(char *path);
|
||||
extern const char *local_name(const char *name);
|
||||
|
||||
/* parser_variable.c */
|
||||
int expand_entry_variables(char **name);
|
||||
|
@ -433,7 +433,7 @@ out:
|
||||
return ptype;
|
||||
}
|
||||
|
||||
static const char *local_name(const char *name)
|
||||
const char *local_name(const char *name)
|
||||
{
|
||||
const char *t;
|
||||
|
||||
|
@ -459,7 +459,12 @@ public:
|
||||
printf("Name:\t\t%s\n", name);
|
||||
else
|
||||
printf("Name:\t\t<NULL>\n");
|
||||
|
||||
if (attachment)
|
||||
printf("Attachment:\t%s\n", attachment);
|
||||
else {
|
||||
const char *local = local_name(name);
|
||||
printf("Attachment:\t%s\n", local[0] == '/' ? local : "<NULL>");
|
||||
}
|
||||
if (parent)
|
||||
printf("Local To:\t%s\n", parent->name);
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user