check_seapp: correct output on invalid policy file

If in invalid policy file is loaded check_seapp outputs:

Error: Could not lod policy file to db: Success!

The "Success" value is from errno, which is not manipulated
by libsepol. Also, load should have an a in it!

Hardcode the error message to:

Error: Could not load policy file to db: invalid input file!

Test: That when providing an invalid sepolicy binary, that the output
message is correct.
Change-Id: Iaf1f85eeb217d484997ee1367d91d461c1195bf4
Signed-off-by: William Roberts <william.c.roberts@intel.com>
This commit is contained in:
William Roberts 2016-08-08 10:31:54 -07:00 committed by William C Roberts
parent c86eb96f45
commit f7d6bb3f71

View File

@ -897,8 +897,7 @@ static void init() {
}
if (sepol_policydb_read(pol.db, pol.pf) < 0) {
log_error("Could not lod policy file to db: %s!\n",
strerror(errno));
log_error("Could not load policy file to db: invalid input file!\n");
exit(EXIT_FAILURE);
}
}