Report source file and line information for neverallow failures.
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
(cherry picked from commit 6c07e1e9cf7e7b15cca1766a6c4eb7a702e0c52e)
Change-Id: Idc1df0765f802e561fc26959f6a2ec781aafa03e
diff --git a/policy_scan.l b/policy_scan.l
index ab046cc..454bb84 100644
--- a/policy_scan.l
+++ b/policy_scan.l
@@ -308,4 +308,6 @@
source_lineno = 1;
strncpy(source_file, name, sizeof(source_file)-1);
source_file[sizeof(source_file)-1] = '\0';
+ if (strlen(source_file) && source_file[strlen(source_file)-1] == '"')
+ source_file[strlen(source_file)-1] = '\0';
}