diff options
author | William Roberts <william.c.roberts@intel.com> | 2016-01-07 08:41:32 -0800 |
---|---|---|
committer | Jason Zaman <jason@perfinion.com> | 2016-01-31 01:16:56 +0800 |
commit | cde11120caf4ffea75639428abdf91ab5568d653 (patch) | |
tree | a9e0700dd9b160ea7a95d36df8205df0d6b29663 /support | |
parent | Label Xorg server binary correctly on Debian (diff) | |
download | hardened-refpolicy-cde11120caf4ffea75639428abdf91ab5568d653.tar.gz hardened-refpolicy-cde11120caf4ffea75639428abdf91ab5568d653.tar.bz2 hardened-refpolicy-cde11120caf4ffea75639428abdf91ab5568d653.zip |
fc_sort: strip whitespace errors
Signed-off-by: William Roberts <william.c.roberts@intel.com>
Diffstat (limited to 'support')
-rw-r--r-- | support/fc_sort.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/support/fc_sort.c b/support/fc_sort.c index 6dc59afdb..f4d2cd0b8 100644 --- a/support/fc_sort.c +++ b/support/fc_sort.c @@ -1,13 +1,13 @@ /* Copyright 2005,2013 Tresys Technology - * + * * Some parts of this came from matchpathcon.c in libselinux */ /* PURPOSE OF THIS PROGRAM - * The original setfiles sorting algorithm did not take into - * account regular expression specificity. With the current - * strict and targeted policies this is not an issue because - * the file contexts are partially hand sorted and concatenated + * The original setfiles sorting algorithm did not take into + * account regular expression specificity. With the current + * strict and targeted policies this is not an issue because + * the file contexts are partially hand sorted and concatenated * in the right order so that the matches are generally correct. * The way reference policy and loadable policy modules handle * file contexts makes them come out in an unpredictable order @@ -27,7 +27,7 @@ typedef unsigned char bool_t; /* file_context_node * A node used in a linked list of file contexts.c - * Each node contains the regular expression, the type and + * Each node contains the regular expression, the type and * the context, as well as information about the regular * expression. The regular expression data (meta, stem_len * and str_len) can be filled in by using the fc_fill_data @@ -114,7 +114,7 @@ int fc_compare(file_context_node_t *a, file_context_node_t *b) if (!b->file_type && a->file_type) return 1; - /* If none of the above conditions were satisfied, + /* If none of the above conditions were satisfied, * then a and b are equally specific. */ return 0; } @@ -251,7 +251,7 @@ void fc_merge_sort(file_context_bucket_t *master) /* fc_fill_data * This processes a regular expression in a file context * and sets the data held in file_context_node, namely - * meta, str_len and stem_len. + * meta, str_len and stem_len. * The following changes are made to fc_node after the * the completion of the function: * fc_node->meta = 1 if path has a meta character, 0 if not. @@ -332,7 +332,7 @@ int main(int argc, char *argv[]) fprintf(stderr, "Usage: %s <infile> [<outfile>]\n",argv[0]); return 1; } - + input_name = argv[1]; output_name = (argc >= 3) ? argv[2] : NULL; @@ -395,7 +395,7 @@ int main(int argc, char *argv[]) continue; } - + temp->path = (char*)strndup(&line_buf[start], regex_len); if (!temp->path) { file_context_node_destroy(temp); @@ -409,7 +409,7 @@ int main(int argc, char *argv[]) if (!isspace(line_buf[i])) break; - } + } if (i == line_len) { file_context_node_destroy(temp); @@ -417,7 +417,7 @@ int main(int argc, char *argv[]) continue; } - /* Parse out the type from the line (if it + /* Parse out the type from the line (if it * is there). */ if (line_buf[i] == '-') { temp->file_type = (char *)malloc(sizeof(char) * 3); |