Skip to content

Commit

Permalink
sesearch: Fully specify --type/range/role_transition long options.
Browse files Browse the repository at this point in the history
This will fully match the rule types, plus the ArgumentParser argument
abbreviations will enable the previous long options to continue to work.

Signed-off-by: Chris PeBenito <[email protected]>
  • Loading branch information
pebenito committed Dec 11, 2023
1 parent 6fe1a12 commit b0fe7b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions man/sesearch.1
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Find allowxperm rules.
Find auditallowxperm rules.
.IP "--dontauditxperm"
Find dontauditxperm rules.
.IP "-T, --type_trans"
.IP "-T, --type_transition"
Find type_transition rules.
.IP "--type_member"
Find type_member rules.
Expand All @@ -46,12 +46,12 @@ Find type_change rules.
.SS RBAC Rule Types
.IP "--role_allow"
Find role allow rules.
.IP "--role_trans"
.IP "--role_transition"
Find role_transition rules.
.IP "Note: TE/MLS rule searches cannot be mixed with RBAC rule searches"

.SS MLS Rule Types
.IP "--range_trans"
.IP "--range_transition"
Find range_transition rules.

.SS Rule Fields
Expand Down
6 changes: 3 additions & 3 deletions sesearch
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ rtypes.add_argument("--dontauditxperm", action="append_const",
# rtypes.add_argument("--neverallowxperm", action="append_const",
# const=setools.TERuletype.neverallowxperm, dest="tertypes",
# help="Search neverallowxperm rules.")
rtypes.add_argument("-T", "--type_trans", action="append_const",
rtypes.add_argument("-T", "--type_transition", action="append_const",
const=setools.TERuletype.type_transition, dest="tertypes",
help="Search type_transition rules.")
rtypes.add_argument("--type_change", action="append_const",
Expand All @@ -61,12 +61,12 @@ rbacrtypes = parser.add_argument_group("RBAC Rule Types")
rbacrtypes.add_argument("--role_allow", action="append_const",
const=setools.RBACRuletype.allow, dest="rbacrtypes",
help="Search role allow rules.")
rbacrtypes.add_argument("--role_trans", action="append_const",
rbacrtypes.add_argument("--role_transition", action="append_const",
const=setools.RBACRuletype.role_transition, dest="rbacrtypes",
help="Search role_transition rules.")

mlsrtypes = parser.add_argument_group("MLS Rule Types")
mlsrtypes.add_argument("--range_trans", action="append_const",
mlsrtypes.add_argument("--range_transition", action="append_const",
const=setools.MLSRuletype.range_transition, dest="mlsrtypes",
help="Search range_transition rules.")

Expand Down

0 comments on commit b0fe7b0

Please sign in to comment.