mirror of
https://github.com/SELinuxProject/selinux
synced 2025-02-02 10:52:04 +00:00
Prevent incompatible option combinations.
checkmodule -m and -b are fundamentally incompatible with each other, so reject attempts to use them together. Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1064603 Also fix the error message for -m with -U to use stderr. Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
This commit is contained in:
parent
2001fa0e9d
commit
bfb806120a
@ -224,8 +224,12 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
if (handle_unknown && (policy_type != POLICY_BASE)) {
|
||||
printf("Handling of unknown classes and permissions is only ");
|
||||
printf("valid in the base module\n");
|
||||
fprintf(stderr, "%s: Handling of unknown classes and permissions is only valid in the base module.\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (binary && (policy_type != POLICY_BASE)) {
|
||||
fprintf(stderr, "%s: -b and -m are incompatible with each other.\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user