Skip to content

Commit

Permalink
libsepol: indent printed allow rule on assertion failure
Browse files Browse the repository at this point in the history
Indent the printed allow rule that triggered an assertion by two spaces
to improve readability.

Signed-off-by: Christian Göttsche <[email protected]>
---
v3:
  add patch
  • Loading branch information
cgzones committed Oct 25, 2024
1 parent f54cb74 commit cf5e4d3
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 54 deletions.
8 changes: 4 additions & 4 deletions libsepol/src/assertion.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ static int report_assertion_extended_permissions(sepol_handle_t *handle,
permstring = sepol_extended_perms_to_string(&error);

ERR(handle, "neverallowxperm on line %lu of %s (or line %lu of %s) violated by\n"
"allowxperm %s %s:%s %s;",
" allowxperm %s %s:%s %s;",
narule->source_line, narule->source_filename, narule->line, policy_name(p),
p->p_type_val_to_name[i],
p->p_type_val_to_name[j],
Expand Down Expand Up @@ -247,7 +247,7 @@ static int report_assertion_extended_permissions(sepol_handle_t *handle,
permstring = sepol_extended_perms_to_string(&error);

ERR(handle, "neverallowxperm on line %lu of %s (or line %lu of %s) violated by\n"
"allowxperm %s %s:%s %s;",
" allowxperm %s %s:%s %s;",
narule->source_line, narule->source_filename, narule->line, policy_name(p),
p->p_type_val_to_name[i],
p->p_type_val_to_name[j],
Expand Down Expand Up @@ -289,7 +289,7 @@ static int report_assertion_extended_permissions(sepol_handle_t *handle,
permstring = sepol_extended_perms_to_string(&error);

ERR(handle, "neverallowxperm on line %lu of %s (or line %lu of %s) violated by\n"
"allowxperm %s %s:%s %s;",
" allowxperm %s %s:%s %s;",
narule->source_line, narule->source_filename, narule->line, policy_name(p),
p->p_type_val_to_name[i],
p->p_type_val_to_name[j],
Expand All @@ -314,7 +314,7 @@ static int report_assertion_extended_permissions(sepol_handle_t *handle,
char *permstr = sepol_av_to_string(p, curperm->tclass, perms);

ERR(handle, "neverallowxperm on line %lu of %s (or line %lu of %s) violated by\n"
"allow %s %s:%s {%s };",
" allow %s %s:%s {%s };",
narule->source_line, narule->source_filename, narule->line, policy_name(p),
p->p_type_val_to_name[stype],
p->p_type_val_to_name[ttype],
Expand Down
Loading

0 comments on commit cf5e4d3

Please sign in to comment.