Skip to contentSkip to conversation

secilc/secilcheck: Exit with an error for an assertion violation

PATCH In review James Carter 2 participants 3 messages Jun 4 – Jun 5 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 secilc/secilcheck: Exit with an error for an assertion violation

secilcheck was exiting with SEPOL_OK upon an assertion violation because the "goto exit" was missing.

Added the "goto exit" and now secilcheck will exit with an error for an assertion violation.

---
 secilc/secilcheck.c | 1 +
 1 file changed, 1 insertion(+)
secilc/secilcheck.c +1 -0
index bf12a812..e8e030ee 100644
@@ -298,6 +298,7 @@ int main(int argc, char *argv[])
 	if (violation == 1) {
 		fprintf(stderr, "There was a neverallow violation\n");
 		rc = SEPOL_ERR;
+		goto exit;
 	}
 
 	rc = SEPOL_OK;
Signature · 1 line
2.54.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · James Carter

secilcheck was exiting with SEPOL_OK upon an assertion violation because the "goto exit" was missing.

Added the "goto exit" and now secilcheck will exit with an error for an assertion violation.

Quoted 20 lines
---
 secilc/secilcheck.c | 1 +
 1 file changed, 1 insertion(+)
secilc/secilcheck.c +1 -1
index bf12a812..e8e030ee 100644
@@ -298,6 +298,7 @@ int main(int argc, char *argv[])
        if (violation == 1) {
                fprintf(stderr, "There was a neverallow violation\n");
                rc = SEPOL_ERR;
+               goto exit;
        }
 
        rc = SEPOL_OK;
--

2.54.0

#2 lore raw
Quoted 6 lines · Stephen Smalley
Quoted 4 lines · James Carter

secilcheck was exiting with SEPOL_OK upon an assertion violation because the "goto exit" was missing.

Quoted 7 lines
Quoted 4 lines

Added the "goto exit" and now secilcheck will exit with an error for an assertion violation.

Merged.
Jim

Quoted 20 lines
Quoted 20 lines
---
 secilc/secilcheck.c | 1 +
 1 file changed, 1 insertion(+)
secilc/secilcheck.c +1 -1
index bf12a812..e8e030ee 100644
@@ -298,6 +298,7 @@ int main(int argc, char *argv[])
        if (violation == 1) {
                fprintf(stderr, "There was a neverallow violation\n");
                rc = SEPOL_ERR;
+               goto exit;
        }
 
        rc = SEPOL_OK;
--

2.54.0