diff --git a/sedta b/sedta index 913c738..b8f339f 100755 --- a/sedta +++ b/sedta @@ -72,9 +72,8 @@ parser = argparse.ArgumentParser( epilog="If no analysis is selected, all forward transitions out of the source will be printed.") parser.add_argument("--version", action="version", version=setools.__version__) parser.add_argument("-p", "--policy", help="Path to SELinux policy to analyze.", required=True) -parser.add_argument("-s", "--source", help="Source type of the analysis.", - required=True, default="") -parser.add_argument("-t", "--target", help="Target type of the analysis.", default="") +parser.add_argument("-s", "--source", help="Source type of the analysis.", required=True) +parser.add_argument("-t", "--target", help="Target type of the analysis.") parser.add_argument("--stats", action="store_true", help="Display statistics at the end of the analysis.") parser.add_argument("-v", "--verbose", action="store_true", diff --git a/seinfo b/seinfo index 08cfef6..87952ae 100755 --- a/seinfo +++ b/seinfo @@ -37,41 +37,41 @@ parser.add_argument("--debug", action="store_true", dest="debug", help="Enable d queries = parser.add_argument_group("Component Queries") queries.add_argument("-a", "--attribute", help="Print type attributes.", dest="typeattrquery", - default=None, nargs='?', const=True, metavar="ATTR") + nargs='?', const=True, metavar="ATTR") queries.add_argument("-b", "--bool", help="Print Booleans.", dest="boolquery", - default=None, nargs='?', const=True, metavar="BOOL") + nargs='?', const=True, metavar="BOOL") queries.add_argument("-c", "--class", help="Print object classes.", dest="classquery", - default=None, nargs='?', const=True, metavar="CLASS") + nargs='?', const=True, metavar="CLASS") queries.add_argument("-r", "--role", help="Print roles.", dest="rolequery", - default=None, nargs='?', const=True, metavar="ROLE") + nargs='?', const=True, metavar="ROLE") queries.add_argument("-t", "--type", help="Print types.", dest="typequery", - default=None, nargs='?', const=True, metavar="TYPE") + nargs='?', const=True, metavar="TYPE") queries.add_argument("-u", "--user", help="Print users.", dest="userquery", - default=None, nargs='?', const=True, metavar="USER") + nargs='?', const=True, metavar="USER") queries.add_argument("--category", help="Print MLS categories.", dest="mlscatsquery", - default=None, nargs='?', const=True, metavar="CAT") + nargs='?', const=True, metavar="CAT") queries.add_argument("--constrain", help="Print constraints.", dest="constraintquery", - default=None, nargs='?', const=True, metavar="CLASS") + nargs='?', const=True, metavar="CLASS") queries.add_argument("--fs_use", help="Print fs_use statements.", dest="fsusequery", - default=None, nargs='?', const=True, metavar="FS_TYPE") + nargs='?', const=True, metavar="FS_TYPE") queries.add_argument("--genfscon", help="Print genfscon statements.", dest="genfsconquery", - default=None, nargs='?', const=True, metavar="FS_TYPE") + nargs='?', const=True, metavar="FS_TYPE") queries.add_argument("--initialsid", help="Print initial SIDs (contexts).", dest="initialsidquery", - default=None, nargs='?', const=True, metavar="NAME") + nargs='?', const=True, metavar="NAME") queries.add_argument("--netifcon", help="Print netifcon statements.", dest="netifconquery", - default=None, nargs='?', const=True, metavar="DEVICE") + nargs='?', const=True, metavar="DEVICE") queries.add_argument("--nodecon", help="Print nodecon statements.", dest="nodeconquery", - default=None, nargs='?', const=True, metavar="ADDR") + nargs='?', const=True, metavar="ADDR") queries.add_argument("--permissive", help="Print permissive types.", dest="permissivequery", - default=None, nargs='?', const=True, metavar="TYPE") + nargs='?', const=True, metavar="TYPE") queries.add_argument("--polcap", help="Print policy capabilities.", dest="polcapquery", - default=None, nargs='?', const=True, metavar="NAME") + nargs='?', const=True, metavar="NAME") queries.add_argument("--portcon", help="Print portcon statements.", dest="portconquery", - default=None, nargs='?', const=True, metavar="PORTNUM[-PORTNUM]") + nargs='?', const=True, metavar="PORTNUM[-PORTNUM]") queries.add_argument("--sensitivity", help="Print MLS sensitivities.", dest="mlssensquery", - default=None, nargs='?', const=True, metavar="SENS") + nargs='?', const=True, metavar="SENS") queries.add_argument("--validatetrans", help="Print validatetrans.", dest="validatetransquery", - default=None, nargs='?', const=True, metavar="CLASS") + nargs='?', const=True, metavar="CLASS") queries.add_argument("--all", help="Print all of the above.", dest="all", default=False, action="store_true") diff --git a/seinfoflow b/seinfoflow index ceb4060..3c9d087 100755 --- a/seinfoflow +++ b/seinfoflow @@ -38,7 +38,7 @@ settings.add_argument("-p", "--policy", required=True, help="Path to SELinux policy to analyze.") settings.add_argument("-m", "--map", required=True, help="Path to permission map file.") -settings.add_argument("-s", "--source", required=True, default="", +settings.add_argument("-s", "--source", required=True, help="Source type of the analysis.") settings.add_argument("-t", "--target", default="", help="Target type of the analysis.") diff --git a/sesearch b/sesearch index 4cb0fe1..626aac5 100755 --- a/sesearch +++ b/sesearch @@ -66,17 +66,17 @@ mlsrtypes.add_argument("--range_trans", action="append_const", help="Search range_transition rules.") expr = parser.add_argument_group("Expressions") -expr.add_argument("-s", "--source", default="", +expr.add_argument("-s", "--source", help="Source type/role of the TE/RBAC rule.") -expr.add_argument("-t", "--target", default="", +expr.add_argument("-t", "--target", help="Target type/role of the TE/RBAC rule.") -expr.add_argument("-c", "--class", dest="tclass", default="", +expr.add_argument("-c", "--class", dest="tclass", help="Comma separated list of object classes") -expr.add_argument("-p", "--perms", metavar="PERMS", default="", +expr.add_argument("-p", "--perms", metavar="PERMS", help="Comma separated list of permissions.") -expr.add_argument("-D", "--default", default="", +expr.add_argument("-D", "--default", help="Default of the rule. (type/role/range transition rules)") -expr.add_argument("-b", "--bool", dest="boolean", metavar="BOOL", default="", +expr.add_argument("-b", "--bool", dest="boolean", metavar="BOOL", help="Comma separated list of Booleans in the conditional expression.") opts = parser.add_argument_group("Search options")