From 8d3a1b558e02aed2269b55cb47688801e417f776 Mon Sep 17 00:00:00 2001 From: William Roberts <william.c.roberts@intel.com> Date: Fri, 19 Jun 2015 09:12:01 -0700 Subject: [PATCH] correct all error messages When an error occured it was erroneously being indicated that he file was the output file, not the input file. Before: Error: Could not find selinux type "fake_app" on line: 51 in file: out/target/product/flo/obj/ETC/seapp_contexts_intermediates/seapp_contexts Error: Could not validate Error: reading out/target/product/flo/obj/ETC/seapp_contexts_intermediates/seapp_contexts.tmp, line 51, name levelFrom, value user After: Error: Could not find selinux type "fake_app" on line: 51 in file: out/target/product/flo/obj/ETC/seapp_contexts_intermediates/seapp_contexts.tmp Error: Could not validate Error: reading out/target/product/flo/obj/ETC/seapp_contexts_intermediates/seapp_contexts.tmp, line 51, name levelFrom, value user Change-Id: Ib0e01f1f0ef563a2a150a0a3b4012e6e15d736bb Signed-off-by: William Roberts <william.c.roberts@intel.com> --- tools/check_seapp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/check_seapp.c b/tools/check_seapp.c index d40b6b082..8ff5c50ae 100644 --- a/tools/check_seapp.c +++ b/tools/check_seapp.c @@ -259,7 +259,7 @@ static int key_map_validate(key_map *m, int lineno) { } else if (type == dt_bool) { log_error("Expected boolean value got: %s=%s on line: %d in file: %s\n", - key, value, lineno, out_file_name); + key, value, lineno, in_file_name); rc = 0; goto out; } @@ -268,7 +268,7 @@ static int key_map_validate(key_map *m, int lineno) { (strcasecmp(value, "none") && strcasecmp(value, "all") && strcasecmp(value, "app") && strcasecmp(value, "user"))) { log_error("Unknown levelFrom=%s on line: %d in file: %s\n", - value, lineno, out_file_name); + value, lineno, in_file_name); rc = 0; goto out; } @@ -285,7 +285,7 @@ static int key_map_validate(key_map *m, int lineno) { if(!check_type(pol.db, value)) { log_error("Could not find selinux type \"%s\" on line: %d in file: %s\n", value, - lineno, out_file_name); + lineno, in_file_name); rc = 0; } goto out; @@ -295,7 +295,7 @@ static int key_map_validate(key_map *m, int lineno) { ret = sepol_mls_check(pol.handle, pol.db, value); if (ret < 0) { log_error("Could not find selinux level \"%s\", on line: %d in file: %s\n", value, - lineno, out_file_name); + lineno, in_file_name); rc = 0; goto out; } -- GitLab