mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-01 23:05:11 +00:00
Mild cruft cleanup (woo!)
- fix "Namespcae" tyop - get rid of sub_name and default_deny from the main profile struct as they haven't been used for a long time; also eliminates their output from the debugging output. - emit dumped parsing structure with only one -d, users were confuzzled and it was not documented that you needed to use -dd to get it to output anything if DEBUG wasn't set when compiling.
This commit is contained in:
@@ -78,8 +78,8 @@ struct aa_rlimits {
|
|||||||
struct codomain {
|
struct codomain {
|
||||||
char *namespace;
|
char *namespace;
|
||||||
char *name; /* codomain name */
|
char *name; /* codomain name */
|
||||||
char *sub_name; /* subdomain name or NULL */
|
/* char *sub_name; */ /* subdomain name or NULL */
|
||||||
int default_deny; /* TRUE or FALSE */
|
/* int default_deny; */ /* TRUE or FALSE */
|
||||||
int local;
|
int local;
|
||||||
int local_mode; /* true if local, not hat */
|
int local_mode; /* true if local, not hat */
|
||||||
int local_audit;
|
int local_audit;
|
||||||
|
@@ -523,10 +523,8 @@ int process_profile(int option, char *profilename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (debug > 0) {
|
if (debug > 0) {
|
||||||
if (debug > 1) {
|
|
||||||
printf("----- Debugging built structures -----\n");
|
printf("----- Debugging built structures -----\n");
|
||||||
dump_policy();
|
dump_policy();
|
||||||
}
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -785,23 +785,13 @@ void debug_cod_list(struct codomain *cod)
|
|||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
if (cod->namespace)
|
if (cod->namespace)
|
||||||
printf("Namespcae:\t\t%s\n", cod->namespace);
|
printf("Namespace:\t\t%s\n", cod->namespace);
|
||||||
|
|
||||||
if (cod->name)
|
if (cod->name)
|
||||||
printf("Name:\t\t%s\n", cod->name);
|
printf("Name:\t\t%s\n", cod->name);
|
||||||
else
|
else
|
||||||
printf("Name:\t\tNULL\n");
|
printf("Name:\t\tNULL\n");
|
||||||
|
|
||||||
if (cod->sub_name)
|
|
||||||
printf("Subname:\t%s\n", cod->sub_name);
|
|
||||||
else
|
|
||||||
printf("Subname:\tNULL\n");
|
|
||||||
|
|
||||||
if (cod->default_deny)
|
|
||||||
printf("Type:\t\tDefault Deny\t\n");
|
|
||||||
else
|
|
||||||
printf("Type:\t\tDefault Allow\t\n");
|
|
||||||
|
|
||||||
printf("Capabilities:\t");
|
printf("Capabilities:\t");
|
||||||
for (i = 0; i < (sizeof(capnames)/sizeof(char *)); i++) {
|
for (i = 0; i < (sizeof(capnames)/sizeof(char *)); i++) {
|
||||||
if (((1 << i) & cod->capabilities) != 0) {
|
if (((1 << i) & cod->capabilities) != 0) {
|
||||||
|
Reference in New Issue
Block a user