python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / setools / 0003-setools-Update-for-2015-02-02-Userspace-release.patch
blobb0842d961a48354a08a08d024873b95cca0906c3
1 setools: Add patch to support 2.4 toolstack.
2 Signed-off-by: Philip Tricca <flihp@twobit.us>
3 Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
4 URL: https://github.com/flihp/meta-selinux/commit/e09eaef7a9acb552a4a5e1f90117154ae06b6fda
6 Signed-off-by: Adam Duskett <Aduskett@gmail.com>
8 diff --git a/libqpol/src/policy_define.c b/libqpol/src/policy_define.c
9 index fad6b60..231962f 100644
10 --- a/libqpol/src/policy_define.c
11 +++ b/libqpol/src/policy_define.c
12 @@ -1449,7 +1449,7 @@ int define_compute_type_helper(int which, avrule_t ** rule)
13 return -1;
15 class_perm_node_init(perm);
16 - perm->class = i + 1;
17 + perm->tclass = i + 1;
18 perm->data = datum->s.value;
19 perm->next = avrule->perms;
20 avrule->perms = perm;
21 @@ -1699,7 +1699,7 @@ int define_te_avtab_helper(int which, avrule_t ** rule)
22 goto out;
24 class_perm_node_init(cur_perms);
25 - cur_perms->class = i + 1;
26 + cur_perms->tclass = i + 1;
27 if (!perms)
28 perms = cur_perms;
29 if (tail)
30 diff --git a/libqpol/src/policy_extend.c b/libqpol/src/policy_extend.c
31 index 5325a87..1417271 100644
32 --- a/libqpol/src/policy_extend.c
33 +++ b/libqpol/src/policy_extend.c
34 @@ -843,7 +843,7 @@ static int qpol_syn_rule_table_insert_sepol_avrule(qpol_policy_t * policy, qpol_
35 for (class_node = rule->perms; class_node; class_node = class_node->next) {
36 key.rule_type = rule->specified;
37 key.source_val = key.target_val = i + 1;
38 - key.class_val = class_node->class;
39 + key.class_val = class_node->tclass;
40 key.cond = cond;
41 if (qpol_syn_rule_table_insert_entry(policy, table, &key, new_rule))
42 goto err;
43 @@ -856,7 +856,7 @@ static int qpol_syn_rule_table_insert_sepol_avrule(qpol_policy_t * policy, qpol_
44 key.rule_type = rule->specified;
45 key.source_val = i + 1;
46 key.target_val = j + 1;
47 - key.class_val = class_node->class;
48 + key.class_val = class_node->tclass;
49 key.cond = cond;
50 if (qpol_syn_rule_table_insert_entry(policy, table, &key, new_rule))
51 goto err;
52 diff --git a/libqpol/src/syn_rule_query.c b/libqpol/src/syn_rule_query.c
53 index 3e63204..d7578f1 100644
54 --- a/libqpol/src/syn_rule_query.c
55 +++ b/libqpol/src/syn_rule_query.c
56 @@ -67,7 +67,7 @@ static void *syn_rule_class_state_get_cur(const qpol_iterator_t * iter)
57 return NULL;
60 - return db->class_val_to_struct[srcs->cur->class - 1];
61 + return db->class_val_to_struct[srcs->cur->tclass - 1];
64 static int syn_rule_class_state_next(qpol_iterator_t * iter)
65 @@ -465,10 +465,10 @@ int qpol_syn_avrule_get_perm_iter(const qpol_policy_t * policy, const qpol_syn_a
68 for (node = internal_rule->perms; node; node = node->next) {
69 - for (i = 0; i < db->class_val_to_struct[node->class - 1]->permissions.nprim; i++) {
70 + for (i = 0; i < db->class_val_to_struct[node->tclass - 1]->permissions.nprim; i++) {
71 if (!(node->data & (1 << i)))
72 continue;
73 - tmp = sepol_av_to_string(db, node->class, (sepol_access_vector_t) (1 << i));
74 + tmp = sepol_av_to_string(db, node->tclass, (sepol_access_vector_t) (1 << i));
75 if (tmp) {
76 tmp++; /* remove prepended space */
77 for (cur = 0; cur < perm_list_sz; cur++)
78 diff --git a/secmds/replcon.cc b/secmds/replcon.cc
79 index 34f7c1a..307c39f 100644
80 --- a/secmds/replcon.cc
81 +++ b/secmds/replcon.cc
82 @@ -60,7 +60,7 @@ static struct option const longopts[] = {
83 {NULL, 0, NULL, 0}
86 -extern int lsetfilecon_raw(const char *, security_context_t) __attribute__ ((weak));
87 +extern int lsetfilecon_raw(const char *, const char *) __attribute__ ((weak));
89 /**
90 * As that setools must work with older libselinux versions that may