Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (7 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.21.1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/selinux/setfiles.c

    r2725 r3232  
    44  Port to BusyBox (c) 2007 by Yuichi Nakamura <ynakam@hitachisoft.jp>
    55*/
     6
     7//usage:#define setfiles_trivial_usage
     8//usage:       "[-dnpqsvW] [-e DIR]... [-o FILE] [-r alt_root_path]"
     9//usage:    IF_FEATURE_SETFILES_CHECK_OPTION(
     10//usage:       " [-c policyfile] spec_file"
     11//usage:    )
     12//usage:       " pathname"
     13//usage:#define setfiles_full_usage "\n\n"
     14//usage:       "Reset file contexts under pathname according to spec_file\n"
     15//usage:    IF_FEATURE_SETFILES_CHECK_OPTION(
     16//usage:     "\n    -c FILE Check the validity of the contexts against the specified binary policy"
     17//usage:    )
     18//usage:     "\n    -d  Show which specification matched each file"
     19//usage:     "\n    -l  Log changes in file labels to syslog"
     20//usage:     "\n    -n  Don't change any file labels"
     21//usage:     "\n    -q  Suppress warnings"
     22//usage:     "\n    -r DIR  Use an alternate root path"
     23//usage:     "\n    -e DIR  Exclude DIR"
     24//usage:     "\n    -F  Force reset of context to match file_context for customizable files"
     25//usage:     "\n    -o FILE Save list of files with incorrect context"
     26//usage:     "\n    -s  Take a list of files from stdin (instead of command line)"
     27//usage:     "\n    -v  Show changes in file labels, if type or role are changing"
     28//usage:     "\n    -vv Show changes in file labels, if type, role, or user are changing"
     29//usage:     "\n    -W  Display warnings about entries that had no matching files"
     30//usage:
     31//usage:#define restorecon_trivial_usage
     32//usage:       "[-iFnRv] [-e EXCLUDEDIR]... [-o FILE] [-f FILE]"
     33//usage:#define restorecon_full_usage "\n\n"
     34//usage:       "Reset security contexts of files in pathname\n"
     35//usage:     "\n    -i  Ignore files that don't exist"
     36//usage:     "\n    -f FILE File with list of files to process"
     37//usage:     "\n    -e DIR  Directory to exclude"
     38//usage:     "\n    -R,-r   Recurse"
     39//usage:     "\n    -n  Don't change any file labels"
     40//usage:     "\n    -o FILE Save list of files with incorrect context"
     41//usage:     "\n    -v  Verbose"
     42//usage:     "\n    -vv Show changed labels"
     43//usage:     "\n    -F  Force reset of context to match file_context"
     44//usage:     "\n        for customizable files, or the user section,"
     45//usage:     "\n        if it has changed"
    646
    747#include "libbb.h"
     
    459499    if (S_ISDIR(sb.st_mode) && recurse) {
    460500        if (recursive_action(name,
    461                      ACTION_RECURSE,
    462                      apply_spec,
    463                      apply_spec,
    464                      NULL, 0) != TRUE) {
     501                ACTION_RECURSE,
     502                apply_spec,
     503                apply_spec,
     504                NULL, 0) != TRUE
     505        ) {
    465506            bb_error_msg("error while labeling %s", name);
    466507            goto err;
     
    545586                IF_FEATURE_SETFILES_CHECK_OPTION("c:"),
    546587            &exclude_dir, &input_filename, &rootpath, &out_filename,
    547                  IF_FEATURE_SETFILES_CHECK_OPTION(&policyfile,)
     588                IF_FEATURE_SETFILES_CHECK_OPTION(&policyfile,)
    548589            &verbose);
    549590    }
     
    561602
    562603        /* Only process the specified file_contexts file, not
    563            any .homedirs or .local files, and do not perform
    564            context translations. */
     604         * any .homedirs or .local files, and do not perform
     605         * context translations. */
    565606        set_matchpathcon_flags(MATCHPATHCON_BASEONLY |
    566607                       MATCHPATHCON_NOTRANS |
     
    592633    if (applet_name[0] == 's') { /* setfiles */
    593634        /* Use our own invalid context checking function so that
    594            we can support either checking against the active policy or
    595            checking against a binary policy file. */
     635         * we can support either checking against the active policy or
     636         * checking against a binary policy file. */
    596637        set_matchpathcon_canoncon(&canoncon);
    597638        if (!argv[0])
Note: See TracChangeset for help on using the changeset viewer.