aboutsummaryrefslogtreecommitdiff
path: root/selinux/setfiles.c
diff options
context:
space:
mode:
Diffstat (limited to 'selinux/setfiles.c')
-rw-r--r--selinux/setfiles.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/selinux/setfiles.c b/selinux/setfiles.c
index ca3fd9361..0173db99e 100644
--- a/selinux/setfiles.c
+++ b/selinux/setfiles.c
@@ -498,10 +498,11 @@ static int process_one(char *name)
498 498
499 if (S_ISDIR(sb.st_mode) && recurse) { 499 if (S_ISDIR(sb.st_mode) && recurse) {
500 if (recursive_action(name, 500 if (recursive_action(name,
501 ACTION_RECURSE, 501 ACTION_RECURSE,
502 apply_spec, 502 apply_spec,
503 apply_spec, 503 apply_spec,
504 NULL, 0) != TRUE) { 504 NULL, 0) != TRUE
505 ) {
505 bb_error_msg("error while labeling %s", name); 506 bb_error_msg("error while labeling %s", name);
506 goto err; 507 goto err;
507 } 508 }
@@ -584,7 +585,7 @@ int setfiles_main(int argc UNUSED_PARAM, char **argv)
584 flags = getopt32(argv, "de:f:ilnpqr:svo:FW" 585 flags = getopt32(argv, "de:f:ilnpqr:svo:FW"
585 IF_FEATURE_SETFILES_CHECK_OPTION("c:"), 586 IF_FEATURE_SETFILES_CHECK_OPTION("c:"),
586 &exclude_dir, &input_filename, &rootpath, &out_filename, 587 &exclude_dir, &input_filename, &rootpath, &out_filename,
587 IF_FEATURE_SETFILES_CHECK_OPTION(&policyfile,) 588 IF_FEATURE_SETFILES_CHECK_OPTION(&policyfile,)
588 &verbose); 589 &verbose);
589 } 590 }
590 argv += optind; 591 argv += optind;
@@ -600,8 +601,8 @@ int setfiles_main(int argc UNUSED_PARAM, char **argv)
600 fclose(policystream); 601 fclose(policystream);
601 602
602 /* Only process the specified file_contexts file, not 603 /* Only process the specified file_contexts file, not
603 any .homedirs or .local files, and do not perform 604 * any .homedirs or .local files, and do not perform
604 context translations. */ 605 * context translations. */
605 set_matchpathcon_flags(MATCHPATHCON_BASEONLY | 606 set_matchpathcon_flags(MATCHPATHCON_BASEONLY |
606 MATCHPATHCON_NOTRANS | 607 MATCHPATHCON_NOTRANS |
607 MATCHPATHCON_VALIDATE); 608 MATCHPATHCON_VALIDATE);
@@ -631,8 +632,8 @@ int setfiles_main(int argc UNUSED_PARAM, char **argv)
631 632
632 if (applet_name[0] == 's') { /* setfiles */ 633 if (applet_name[0] == 's') { /* setfiles */
633 /* Use our own invalid context checking function so that 634 /* Use our own invalid context checking function so that
634 we can support either checking against the active policy or 635 * we can support either checking against the active policy or
635 checking against a binary policy file. */ 636 * checking against a binary policy file. */
636 set_matchpathcon_canoncon(&canoncon); 637 set_matchpathcon_canoncon(&canoncon);
637 if (!argv[0]) 638 if (!argv[0])
638 bb_show_usage(); 639 bb_show_usage();