mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-25 07:22:07 +00:00
checkpolicy: print reason of fopen failure
Print the reason why opening a source policy file failed, e.g: checkpolicy: unable to open policy.conf: No such file or directory Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
This commit is contained in:
parent
3d27e5a410
commit
e32809155b
@ -36,7 +36,7 @@ int read_source_policy(policydb_t * p, const char *file, const char *progname)
|
||||
{
|
||||
yyin = fopen(file, "r");
|
||||
if (!yyin) {
|
||||
fprintf(stderr, "%s: unable to open %s\n", progname, file);
|
||||
fprintf(stderr, "%s: unable to open %s: %s\n", progname, file, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
set_source_file(file);
|
||||
|
Loading…
Reference in New Issue
Block a user