I'm working on rewrite policycoreutils to use setools4 and for 'sepolicy communicate' I need to make a query which will match a subset ["open", "write"] of permissions.
gets rules which have only "open" and "write" permissions
But I haven't found how to create a query which would match rules with "open" and "write". If there's no such option, could be something added? E.g via keyword perms_subset.
I'm working on rewrite policycoreutils to use setools4 and for 'sepolicy communicate' I need to make a query which will match a subset ["open", "write"] of permissions.
setools.TERuleQuery(p, ruletype=["allow"], source="httpd_t", tclass=["file"], perms=["open","write"])
gets rules which have "open" or "write" permission
setools.TERuleQuery(p, ruletype=["allow"], source="httpd_t", tclass=["file"], perms=["open","write"], perms_equal=True)
gets rules which have only "open" and "write" permissions
But I haven't found how to create a query which would match rules with "open" and "write". If there's no such option, could be something added? E.g via keyword
perms_subset
.