Gentoo Archives: gentoo-commits

From: Jason Zaman <perfinion@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: support/
Date: Sat, 30 Jan 2016 17:21:29
Message-Id: 1454174216.cde11120caf4ffea75639428abdf91ab5568d653.perfinion@gentoo
1 commit: cde11120caf4ffea75639428abdf91ab5568d653
2 Author: William Roberts <william.c.roberts <AT> intel <DOT> com>
3 AuthorDate: Thu Jan 7 16:41:32 2016 +0000
4 Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 30 17:16:56 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=cde11120
7
8 fc_sort: strip whitespace errors
9
10 Signed-off-by: William Roberts <william.c.roberts <AT> intel.com>
11
12 support/fc_sort.c | 24 ++++++++++++------------
13 1 file changed, 12 insertions(+), 12 deletions(-)
14
15 diff --git a/support/fc_sort.c b/support/fc_sort.c
16 index 6dc59af..f4d2cd0 100644
17 --- a/support/fc_sort.c
18 +++ b/support/fc_sort.c
19 @@ -1,13 +1,13 @@
20 /* Copyright 2005,2013 Tresys Technology
21 - *
22 + *
23 * Some parts of this came from matchpathcon.c in libselinux
24 */
25
26 /* PURPOSE OF THIS PROGRAM
27 - * The original setfiles sorting algorithm did not take into
28 - * account regular expression specificity. With the current
29 - * strict and targeted policies this is not an issue because
30 - * the file contexts are partially hand sorted and concatenated
31 + * The original setfiles sorting algorithm did not take into
32 + * account regular expression specificity. With the current
33 + * strict and targeted policies this is not an issue because
34 + * the file contexts are partially hand sorted and concatenated
35 * in the right order so that the matches are generally correct.
36 * The way reference policy and loadable policy modules handle
37 * file contexts makes them come out in an unpredictable order
38 @@ -27,7 +27,7 @@ typedef unsigned char bool_t;
39
40 /* file_context_node
41 * A node used in a linked list of file contexts.c
42 - * Each node contains the regular expression, the type and
43 + * Each node contains the regular expression, the type and
44 * the context, as well as information about the regular
45 * expression. The regular expression data (meta, stem_len
46 * and str_len) can be filled in by using the fc_fill_data
47 @@ -114,7 +114,7 @@ int fc_compare(file_context_node_t *a, file_context_node_t *b)
48 if (!b->file_type && a->file_type)
49 return 1;
50
51 - /* If none of the above conditions were satisfied,
52 + /* If none of the above conditions were satisfied,
53 * then a and b are equally specific. */
54 return 0;
55 }
56 @@ -251,7 +251,7 @@ void fc_merge_sort(file_context_bucket_t *master)
57 /* fc_fill_data
58 * This processes a regular expression in a file context
59 * and sets the data held in file_context_node, namely
60 - * meta, str_len and stem_len.
61 + * meta, str_len and stem_len.
62 * The following changes are made to fc_node after the
63 * the completion of the function:
64 * fc_node->meta = 1 if path has a meta character, 0 if not.
65 @@ -332,7 +332,7 @@ int main(int argc, char *argv[])
66 fprintf(stderr, "Usage: %s <infile> [<outfile>]\n",argv[0]);
67 return 1;
68 }
69 -
70 +
71 input_name = argv[1];
72 output_name = (argc >= 3) ? argv[2] : NULL;
73
74 @@ -395,7 +395,7 @@ int main(int argc, char *argv[])
75
76 continue;
77 }
78 -
79 +
80 temp->path = (char*)strndup(&line_buf[start], regex_len);
81 if (!temp->path) {
82 file_context_node_destroy(temp);
83 @@ -409,7 +409,7 @@ int main(int argc, char *argv[])
84
85 if (!isspace(line_buf[i]))
86 break;
87 - }
88 + }
89
90 if (i == line_len) {
91 file_context_node_destroy(temp);
92 @@ -417,7 +417,7 @@ int main(int argc, char *argv[])
93 continue;
94 }
95
96 - /* Parse out the type from the line (if it
97 + /* Parse out the type from the line (if it
98 * is there). */
99 if (line_buf[i] == '-') {
100 temp->file_type = (char *)malloc(sizeof(char) * 3);