diff mbox series

[1/3] libsepol: more accurate error messages

Message ID alpine.LFD.2.21.1906131858100.5703@34-41-5D-CA-59-C7 (mailing list archive)
State Accepted
Headers show
Series [1/3] libsepol: more accurate error messages | expand

Commit Message

Jokke Hämäläinen June 13, 2019, 3:59 p.m. UTC
When reporting errors, differetiate between
source and target SIDs.

Signed-off-by: Unto Sten <sten.unto@gmail.com>
---
 libsepol/src/services.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/libsepol/src/services.c b/libsepol/src/services.c
index 303a138c..3758436f 100644
--- a/libsepol/src/services.c
+++ b/libsepol/src/services.c
@@ -1134,13 +1134,13 @@  int hidden sepol_compute_av_reason(sepol_security_id_t ssid,
 
 	scontext = sepol_sidtab_search(sidtab, ssid);
 	if (!scontext) {
-		ERR(NULL, "unrecognized SID %d", ssid);
+		ERR(NULL, "unrecognized source SID %d", ssid);
 		rc = -EINVAL;
 		goto out;
 	}
 	tcontext = sepol_sidtab_search(sidtab, tsid);
 	if (!tcontext) {
-		ERR(NULL, "unrecognized SID %d", tsid);
+		ERR(NULL, "unrecognized target SID %d", tsid);
 		rc = -EINVAL;
 		goto out;
 	}
@@ -1170,13 +1170,13 @@  int hidden sepol_compute_av_reason_buffer(sepol_security_id_t ssid,
 
 	scontext = sepol_sidtab_search(sidtab, ssid);
 	if (!scontext) {
-		ERR(NULL, "unrecognized SID %d", ssid);
+		ERR(NULL, "unrecognized source SID %d", ssid);
 		rc = -EINVAL;
 		goto out;
 	}
 	tcontext = sepol_sidtab_search(sidtab, tsid);
 	if (!tcontext) {
-		ERR(NULL, "unrecognized SID %d", tsid);
+		ERR(NULL, "unrecognized target SID %d", tsid);
 		rc = -EINVAL;
 		goto out;
 	}