Merge pull request #97 from bachradsusi/sediff

Disable/remove neverallow options in sediff.
This commit is contained in:
Chris PeBenito 2023-05-12 13:27:56 -04:00 committed by GitHub
commit 985c9e50f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 11 deletions

View File

@ -57,16 +57,12 @@ sediff \- утилита выявления различий политик SELi
Найти различия правил включения журналирования событий.
.IP "--dontaudit"
Найти различия правил запрета журналирования событий.
.IP "--neverallow"
Найти различия запрещающих правил.
.IP "--allowxperm"
Найти различия расширенных разрешительных правил.
.IP "--auditallowxperm"
Найти различия расширенных правил включения журналирования событий.
.IP "--dontauditxperm"
Найти различия расширенных правил запрета журналирования событий.
.IP "--neverallowxperm"
Найти различия расширенных запрещающих правил.
.IP "-T, --type_trans"
Найти различия правил перехода типов.
.IP "--type_member"

View File

@ -50,16 +50,12 @@ Find differences in allow rules.
Find differences in auditallow rules.
.IP "--dontaudit"
Find differences in dontaudit rules.
.IP "--neverallow"
Find differences in neverallow rules.
.IP "--allowxperm"
Find differences in allowxperm rules.
.IP "--auditallowxperm"
Find differences in auditallowxperm rules.
.IP "--dontauditxperm"
Find differences in dontauditxperm rules.
.IP "--neverallowxperm"
Find differences in neverallowxperm rules.
.IP "-T, --type_trans"
Find differences in type_transition rules.
.IP "--type_member"

10
sediff
View File

@ -46,12 +46,12 @@ comp.add_argument("--level", action="store_true", help="Print MLS level definiti
terule = parser.add_argument_group("type enforcement rule differences")
terule.add_argument("-A", action="store_true", help="Print allow and allowxperm rule differences")
terule.add_argument("--allow", action="store_true", help="Print allow rule differences")
terule.add_argument("--neverallow", action="store_true", help="Print neverallow rule differences")
# terule.add_argument("--neverallow", action="store_true", help="Print neverallow rule differences")
terule.add_argument("--auditallow", action="store_true", help="Print auditallow rule differences")
terule.add_argument("--dontaudit", action="store_true", help="Print dontaudit rule differences")
terule.add_argument("--allowxperm", action="store_true", help="Print allowxperm rule differences")
terule.add_argument("--neverallowxperm", action="store_true",
help="Print neverallowxperm rule differences")
# terule.add_argument("--neverallowxperm", action="store_true",
# help="Print neverallowxperm rule differences")
terule.add_argument("--auditallowxperm", action="store_true",
help="Print auditallowxperm rule differences")
terule.add_argument("--dontauditxperm", action="store_true",
@ -98,6 +98,10 @@ other.add_argument("--typebounds", action="store_true", help="Print typebounds d
args = parser.parse_args()
# neverallow and neverallowxperm options are disabled
args.neverallow = False
args.neverallowxperm = False
if args.A:
args.allow = True
args.allowxperm = True