We can now have a list of permissions instead of just one permission, coma separated
This commit is contained in:
parent
8473caf5a6
commit
c011bccc45
@ -455,11 +455,15 @@ int main(int argc, char **argv)
|
|||||||
} else if(noaudit) {
|
} else if(noaudit) {
|
||||||
add_rule(source, target, class, perm, AVTAB_AUDITDENY, &policydb);
|
add_rule(source, target, class, perm, AVTAB_AUDITDENY, &policydb);
|
||||||
} else {
|
} else {
|
||||||
create_domain(source, &policydb);
|
char *saveptr = NULL;
|
||||||
if (add_rule(source, target, class, perm, AVTAB_ALLOWED, &policydb)) {
|
|
||||||
fprintf(stderr, "Could not add rule\n");
|
char *p = strtok_r(perm, ",", &saveptr);
|
||||||
return 1;
|
do {
|
||||||
}
|
if (add_rule(source, target, class, p, AVTAB_ALLOWED, &policydb)) {
|
||||||
|
fprintf(stderr, "Could not add rule\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
} while( (p = strtok_r(NULL, ",", &saveptr)) != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
fp = fopen(outfile, "w");
|
fp = fopen(outfile, "w");
|
||||||
|
Loading…
Reference in New Issue
Block a user