* setools build is broken by 61f21385004 ("libsepol: rename struct member"), revert?
@ 2023-12-04 16:19 Petr Lautrbach
2023-12-04 16:26 ` James Carter
2023-12-04 16:45 ` [PATCH 1/2] Revert "libsepol/tests: rename bool indentifiers" Petr Lautrbach
0 siblings, 2 replies; 9+ messages in thread
From: Petr Lautrbach @ 2023-12-04 16:19 UTC (permalink / raw)
To: selinux
Hi,
it's reported at https://github.com/SELinuxProject/setools/issues/110
While the API change is described in the commit message, SETools is not
ready for this.
I haven't found a way how to use COND_EXPR_T_RENAME_BOOL_BOOLEAN in
Cython code so that SETools could be built with 3.6 and with older
releases.
I consider this as a blocker for 3.6 release and therefore I propose to
revert this change and leave it for the next release together with the
proper (if possible) fix of SETools.
Objections?
Petr
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: setools build is broken by 61f21385004 ("libsepol: rename struct member"), revert? 2023-12-04 16:19 setools build is broken by 61f21385004 ("libsepol: rename struct member"), revert? Petr Lautrbach @ 2023-12-04 16:26 ` James Carter 2023-12-04 16:45 ` [PATCH 1/2] Revert "libsepol/tests: rename bool indentifiers" Petr Lautrbach 1 sibling, 0 replies; 9+ messages in thread From: James Carter @ 2023-12-04 16:26 UTC (permalink / raw) To: Petr Lautrbach; +Cc: selinux I don't have any objections. Jim On Mon, Dec 4, 2023 at 11:19 AM Petr Lautrbach <lautrbach@redhat.com> wrote: > > Hi, > > it's reported at https://github.com/SELinuxProject/setools/issues/110 > > While the API change is described in the commit message, SETools is not > ready for this. > > I haven't found a way how to use COND_EXPR_T_RENAME_BOOL_BOOLEAN in > Cython code so that SETools could be built with 3.6 and with older > releases. > > I consider this as a blocker for 3.6 release and therefore I propose to > revert this change and leave it for the next release together with the > proper (if possible) fix of SETools. > > Objections? > > Petr > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] Revert "libsepol/tests: rename bool indentifiers" 2023-12-04 16:19 setools build is broken by 61f21385004 ("libsepol: rename struct member"), revert? Petr Lautrbach 2023-12-04 16:26 ` James Carter @ 2023-12-04 16:45 ` Petr Lautrbach 2023-12-04 16:45 ` [PATCH 2/2] Revert "libsepol: rename struct member" Petr Lautrbach 2023-12-04 18:19 ` [PATCH 1/2] Revert "libsepol/tests: rename bool indentifiers" James Carter 1 sibling, 2 replies; 9+ messages in thread From: Petr Lautrbach @ 2023-12-04 16:45 UTC (permalink / raw) To: selinux; +Cc: Petr Lautrbach This reverts commit 893b50c6ce661f3ee339145e76a0bbfa199671c3. 61f21385004 ("libsepol: rename struct member") broke build of SETools: setools/policyrep.c: In function ‘__pyx_pf_7setools_9policyrep_23ConditionalExprIterator___next__’: setools/policyrep.c:27857:138: error: ‘cond_expr_t’ {aka ‘struct cond_expr’} has no member named ‘bool’; did you mean ‘boolean’? 27857 | __pyx_t_3 = __pyx_f_7setools_9policyrep_13SELinuxPolicy_boolean_value_to_datum(__pyx_v_self->__pyx_base.policy, (__pyx_v_self->curr->bool - 1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 336, __pyx_L1_error) | ^~~~ | Signed-off-by: Petr Lautrbach <lautrbach@redhat.com> --- libsepol/tests/test-linker-cond-map.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/libsepol/tests/test-linker-cond-map.c b/libsepol/tests/test-linker-cond-map.c index 142066669c0c..6ea0e4c2ac6b 100644 --- a/libsepol/tests/test-linker-cond-map.c +++ b/libsepol/tests/test-linker-cond-map.c @@ -51,7 +51,7 @@ */ typedef struct test_cond_expr { - const char *boolean; + const char *bool; uint32_t expr_type; } test_cond_expr_t; @@ -69,18 +69,18 @@ static void test_cond_expr_mapping(policydb_t * p, avrule_decl_t * d, test_cond_ CU_ASSERT_FATAL(expr != NULL); CU_ASSERT(expr->expr_type == bools[i].expr_type); - if (bools[i].boolean) { - CU_ASSERT(strcmp(p->sym_val_to_name[SYM_BOOLS][expr->boolean - 1], bools[i].boolean) == 0); + if (bools[i].bool) { + CU_ASSERT(strcmp(p->sym_val_to_name[SYM_BOOLS][expr->boolean - 1], bools[i].bool) == 0); } expr = expr->next; } } -static void test_bool_state(policydb_t * p, const char *boolean, int state) +static void test_bool_state(policydb_t * p, const char *bool, int state) { cond_bool_datum_t *b; - b = hashtab_search(p->p_bools.table, boolean); + b = hashtab_search(p->p_bools.table, bool); CU_ASSERT_FATAL(b != NULL); CU_ASSERT(b->state == state); } @@ -100,7 +100,7 @@ void base_cond_tests(policydb_t * base) test_sym_presence(base, "g_b_bool_1", SYM_BOOLS, SCOPE_DECL, decls, 1); test_bool_state(base, "g_b_bool_1", 0); /* conditional expression mapped correctly */ - bools[0].boolean = "g_b_bool_1"; + bools[0].bool = "g_b_bool_1"; bools[0].expr_type = COND_BOOL; test_cond_expr_mapping(base, d, bools, 1); @@ -110,7 +110,7 @@ void base_cond_tests(policydb_t * base) test_sym_presence(base, "o1_b_bool_1", SYM_BOOLS, SCOPE_DECL, decls, 1); test_bool_state(base, "o1_b_bool_1", 1); /* conditional expression mapped correctly */ - bools[0].boolean = "o1_b_bool_1"; + bools[0].bool = "o1_b_bool_1"; bools[0].expr_type = COND_BOOL; test_cond_expr_mapping(base, d, bools, 1); @@ -128,7 +128,7 @@ void module_cond_tests(policydb_t * base) test_sym_presence(base, "g_m1_bool_1", SYM_BOOLS, SCOPE_DECL, decls, 1); test_bool_state(base, "g_m1_bool_1", 1); /* conditional expression mapped correctly */ - bools[0].boolean = "g_m1_bool_1"; + bools[0].bool = "g_m1_bool_1"; bools[0].expr_type = COND_BOOL; test_cond_expr_mapping(base, d, bools, 1); @@ -138,7 +138,7 @@ void module_cond_tests(policydb_t * base) test_sym_presence(base, "o1_m1_bool_1", SYM_BOOLS, SCOPE_DECL, decls, 1); test_bool_state(base, "o1_m1_bool_1", 0); /* conditional expression mapped correctly */ - bools[0].boolean = "o1_m1_bool_1"; + bools[0].bool = "o1_m1_bool_1"; bools[0].expr_type = COND_BOOL; test_cond_expr_mapping(base, d, bools, 1); @@ -150,11 +150,11 @@ void module_cond_tests(policydb_t * base) test_bool_state(base, "g_m2_bool_1", 1); test_bool_state(base, "g_m2_bool_2", 0); /* conditional expression mapped correctly */ - bools[0].boolean = "g_m2_bool_1"; + bools[0].bool = "g_m2_bool_1"; bools[0].expr_type = COND_BOOL; - bools[1].boolean = "g_m2_bool_2"; + bools[1].bool = "g_m2_bool_2"; bools[1].expr_type = COND_BOOL; - bools[2].boolean = NULL; + bools[2].bool = NULL; bools[2].expr_type = COND_AND; test_cond_expr_mapping(base, d, bools, 3); } -- 2.41.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] Revert "libsepol: rename struct member" 2023-12-04 16:45 ` [PATCH 1/2] Revert "libsepol/tests: rename bool indentifiers" Petr Lautrbach @ 2023-12-04 16:45 ` Petr Lautrbach 2023-12-04 18:19 ` [PATCH 1/2] Revert "libsepol/tests: rename bool indentifiers" James Carter 1 sibling, 0 replies; 9+ messages in thread From: Petr Lautrbach @ 2023-12-04 16:45 UTC (permalink / raw) To: selinux; +Cc: Petr Lautrbach This reverts commit 61f213850047c23b0af7c7cafa9245da48120279. This change broke build of SETools and currently it's not clear how to change SETools cython code so that it can be built with 3.6 and older SELinux releases. https://github.com/SELinuxProject/setools/issues/110 Signed-off-by: Petr Lautrbach <lautrbach@redhat.com> --- libsepol/cil/src/cil_binary.c | 6 +++--- libsepol/include/sepol/policydb/conditional.h | 4 +--- libsepol/src/conditional.c | 14 +++++++------- libsepol/src/expand.c | 6 +++--- libsepol/src/kernel_to_cil.c | 2 +- libsepol/src/kernel_to_conf.c | 2 +- libsepol/src/link.c | 6 +++--- libsepol/src/module_to_cil.c | 2 +- libsepol/src/policydb_validate.c | 2 +- libsepol/src/write.c | 2 +- libsepol/tests/debug.c | 2 +- libsepol/tests/test-linker-cond-map.c | 2 +- 12 files changed, 24 insertions(+), 26 deletions(-) diff --git a/libsepol/cil/src/cil_binary.c b/libsepol/cil/src/cil_binary.c index a8e3616a32d0..5fb1109848ea 100644 --- a/libsepol/cil/src/cil_binary.c +++ b/libsepol/cil/src/cil_binary.c @@ -2204,7 +2204,7 @@ static int __cil_cond_item_to_sepol_expr(policydb_t *pdb, struct cil_list_item * *head = cil_malloc(sizeof(cond_expr_t)); (*head)->next = NULL; (*head)->expr_type = COND_BOOL; - (*head)->boolean = sepol_bool->s.value; + (*head)->bool = sepol_bool->s.value; *tail = *head; } else if (item->flavor == CIL_LIST) { struct cil_list *l = item->data; @@ -2240,7 +2240,7 @@ static int __cil_cond_expr_to_sepol_expr_helper(policydb_t *pdb, struct cil_list enum cil_flavor cil_op = (enum cil_flavor)(uintptr_t)item->data; op = cil_malloc(sizeof(*op)); - op->boolean = 0; + op->bool = 0; op->next = NULL; switch (cil_op) { @@ -2307,7 +2307,7 @@ static int __cil_cond_expr_to_sepol_expr_helper(policydb_t *pdb, struct cil_list goto exit; } op = cil_malloc(sizeof(*op)); - op->boolean = 0; + op->bool = 0; op->next = NULL; op->expr_type = COND_OR; t1->next = h2; diff --git a/libsepol/include/sepol/policydb/conditional.h b/libsepol/include/sepol/policydb/conditional.h index 5318ea194a62..49c0d76631c4 100644 --- a/libsepol/include/sepol/policydb/conditional.h +++ b/libsepol/include/sepol/policydb/conditional.h @@ -54,9 +54,7 @@ typedef struct cond_expr { #define COND_NEQ 7 /* bool != bool */ #define COND_LAST COND_NEQ uint32_t expr_type; - /* The member `boolean` was renamed from `bool` in version 3.6 */ -#define COND_EXPR_T_RENAME_BOOL_BOOLEAN - uint32_t boolean; + uint32_t bool; struct cond_expr *next; } cond_expr_t; diff --git a/libsepol/src/conditional.c b/libsepol/src/conditional.c index 24380ea03d76..a620451d8bc5 100644 --- a/libsepol/src/conditional.c +++ b/libsepol/src/conditional.c @@ -125,7 +125,7 @@ int cond_expr_equal(cond_node_t * a, cond_node_t * b) if (cur_a->expr_type != cur_b->expr_type) return 0; if (cur_a->expr_type == COND_BOOL) { - if (cur_a->boolean != cur_b->boolean) + if (cur_a->bool != cur_b->bool) return 0; } cur_a = cur_a->next; @@ -223,7 +223,7 @@ int cond_evaluate_expr(policydb_t * p, cond_expr_t * expr) if (sp == (COND_EXPR_MAXDEPTH - 1)) return -1; sp++; - s[sp] = p->bool_val_to_struct[cur->boolean - 1]->state; + s[sp] = p->bool_val_to_struct[cur->bool - 1]->state; break; case COND_NOT: if (sp < 0) @@ -279,7 +279,7 @@ cond_expr_t *cond_copy_expr(cond_expr_t * expr) memset(new_expr, 0, sizeof(cond_expr_t)); new_expr->expr_type = cur->expr_type; - new_expr->boolean = cur->boolean; + new_expr->bool = cur->bool; if (!head) head = new_expr; @@ -388,10 +388,10 @@ int cond_normalize_expr(policydb_t * p, cond_node_t * cn) switch (e->expr_type) { case COND_BOOL: /* see if we've already seen this bool */ - if (!bool_present(e->boolean, cn->bool_ids, cn->nbools)) { + if (!bool_present(e->bool, cn->bool_ids, cn->nbools)) { /* count em all but only record up to COND_MAX_BOOLS */ if (cn->nbools < COND_MAX_BOOLS) - cn->bool_ids[cn->nbools++] = e->boolean; + cn->bool_ids[cn->nbools++] = e->bool; else cn->nbools++; } @@ -737,7 +737,7 @@ static int expr_isvalid(policydb_t * p, cond_expr_t * expr) return 0; } - if (expr->boolean > p->p_bools.nprim) { + if (expr->bool > p->p_bools.nprim) { WARN(NULL, "security: conditional expressions uses unknown bool."); return 0; } @@ -775,7 +775,7 @@ static int cond_read_node(policydb_t * p, cond_node_t * node, void *fp) memset(expr, 0, sizeof(cond_expr_t)); expr->expr_type = le32_to_cpu(buf[0]); - expr->boolean = le32_to_cpu(buf[1]); + expr->bool = le32_to_cpu(buf[1]); if (!expr_isvalid(p, expr)) { free(expr); diff --git a/libsepol/src/expand.c b/libsepol/src/expand.c index e63414b1497b..ea6492b75da9 100644 --- a/libsepol/src/expand.c +++ b/libsepol/src/expand.c @@ -2025,8 +2025,8 @@ static int cond_node_map_bools(expand_state_t * state, cond_node_t * cn) cur = cn->expr; while (cur) { - if (cur->boolean) - cur->boolean = state->boolmap[cur->boolean - 1]; + if (cur->bool) + cur->bool = state->boolmap[cur->bool - 1]; cur = cur->next; } @@ -2899,7 +2899,7 @@ static void discard_tunables(sepol_handle_t *sh, policydb_t *pol) cur_expr = cur_expr->next) { if (cur_expr->expr_type != COND_BOOL) continue; - booldatum = pol->bool_val_to_struct[cur_expr->boolean - 1]; + booldatum = pol->bool_val_to_struct[cur_expr->bool - 1]; if (booldatum->flags & COND_BOOL_FLAGS_TUNABLE) tmp[tunables++] = booldatum; else diff --git a/libsepol/src/kernel_to_cil.c b/libsepol/src/kernel_to_cil.c index 8ec7974995cc..74cd0e4dd234 100644 --- a/libsepol/src/kernel_to_cil.c +++ b/libsepol/src/kernel_to_cil.c @@ -44,7 +44,7 @@ static char *cond_expr_to_str(struct policydb *pdb, struct cond_expr *expr) for (curr = expr; curr != NULL; curr = curr->next) { if (curr->expr_type == COND_BOOL) { - char *val1 = pdb->p_bool_val_to_name[curr->boolean - 1]; + char *val1 = pdb->p_bool_val_to_name[curr->bool - 1]; new_val = create_str("%s", 1, val1); } else { const char *op; diff --git a/libsepol/src/kernel_to_conf.c b/libsepol/src/kernel_to_conf.c index b5b530d6e6a1..853c0561040b 100644 --- a/libsepol/src/kernel_to_conf.c +++ b/libsepol/src/kernel_to_conf.c @@ -43,7 +43,7 @@ static char *cond_expr_to_str(struct policydb *pdb, struct cond_expr *expr) for (curr = expr; curr != NULL; curr = curr->next) { if (curr->expr_type == COND_BOOL) { - char *val1 = pdb->p_bool_val_to_name[curr->boolean - 1]; + char *val1 = pdb->p_bool_val_to_name[curr->bool - 1]; new_val = create_str("%s", 1, val1); } else { const char *op; diff --git a/libsepol/src/link.c b/libsepol/src/link.c index 3b7742bccac5..cbe4cea40123 100644 --- a/libsepol/src/link.c +++ b/libsepol/src/link.c @@ -1524,9 +1524,9 @@ static int copy_cond_list(cond_node_t * list, cond_node_t ** dst, /* expression nodes don't have a bool value of 0 - don't map them */ if (cur_expr->expr_type != COND_BOOL) continue; - assert(module->map[SYM_BOOLS][cur_expr->boolean - 1] != 0); - cur_expr->boolean = - module->map[SYM_BOOLS][cur_expr->boolean - 1]; + assert(module->map[SYM_BOOLS][cur_expr->bool - 1] != 0); + cur_expr->bool = + module->map[SYM_BOOLS][cur_expr->bool - 1]; } new_node->nbools = cur->nbools; /* FIXME should COND_MAX_BOOLS be used here? */ diff --git a/libsepol/src/module_to_cil.c b/libsepol/src/module_to_cil.c index ee22dbbdb3b7..f43aa7decac8 100644 --- a/libsepol/src/module_to_cil.c +++ b/libsepol/src/module_to_cil.c @@ -1283,7 +1283,7 @@ static int cond_expr_to_cil(int indent, struct policydb *pdb, struct cond_expr * for (curr = cond_expr; curr != NULL; curr = curr->next) { if (curr->expr_type == COND_BOOL) { - val1 = pdb->p_bool_val_to_name[curr->boolean - 1]; + val1 = pdb->p_bool_val_to_name[curr->bool - 1]; // length of boolean + 2 parens + null terminator len = strlen(val1) + 2 + 1; new_val = malloc(len); diff --git a/libsepol/src/policydb_validate.c b/libsepol/src/policydb_validate.c index 8b87675ff7b0..7d9a153fb830 100644 --- a/libsepol/src/policydb_validate.c +++ b/libsepol/src/policydb_validate.c @@ -1002,7 +1002,7 @@ static int validate_cond_expr(sepol_handle_t *handle, const struct cond_expr *ex for (; expr; expr = expr->next) { switch(expr->expr_type) { case COND_BOOL: - if (validate_value(expr->boolean, boolean)) + if (validate_value(expr->bool, boolean)) goto bad; if (depth >= (COND_EXPR_MAXDEPTH - 1)) goto bad; diff --git a/libsepol/src/write.c b/libsepol/src/write.c index 283d11c8a6bb..a7584a78d3c7 100644 --- a/libsepol/src/write.c +++ b/libsepol/src/write.c @@ -834,7 +834,7 @@ static int cond_write_node(policydb_t * p, for (cur_expr = node->expr; cur_expr != NULL; cur_expr = cur_expr->next) { items = 0; buf[items++] = cpu_to_le32(cur_expr->expr_type); - buf[items++] = cpu_to_le32(cur_expr->boolean); + buf[items++] = cpu_to_le32(cur_expr->bool); items2 = put_entry(buf, sizeof(uint32_t), items, fp); if (items2 != items) return POLICYDB_ERROR; diff --git a/libsepol/tests/debug.c b/libsepol/tests/debug.c index 8494dd258e5c..90aa6e0a953a 100644 --- a/libsepol/tests/debug.c +++ b/libsepol/tests/debug.c @@ -41,7 +41,7 @@ void display_expr(policydb_t * p, cond_expr_t * exp, FILE * fp) for (cur = exp; cur != NULL; cur = cur->next) { switch (cur->expr_type) { case COND_BOOL: - fprintf(fp, "%s ", p->p_bool_val_to_name[cur->boolean - 1]); + fprintf(fp, "%s ", p->p_bool_val_to_name[cur->bool - 1]); break; case COND_NOT: fprintf(fp, "! "); diff --git a/libsepol/tests/test-linker-cond-map.c b/libsepol/tests/test-linker-cond-map.c index 6ea0e4c2ac6b..694a73469c46 100644 --- a/libsepol/tests/test-linker-cond-map.c +++ b/libsepol/tests/test-linker-cond-map.c @@ -70,7 +70,7 @@ static void test_cond_expr_mapping(policydb_t * p, avrule_decl_t * d, test_cond_ CU_ASSERT(expr->expr_type == bools[i].expr_type); if (bools[i].bool) { - CU_ASSERT(strcmp(p->sym_val_to_name[SYM_BOOLS][expr->boolean - 1], bools[i].bool) == 0); + CU_ASSERT(strcmp(p->sym_val_to_name[SYM_BOOLS][expr->bool - 1], bools[i].bool) == 0); } expr = expr->next; } -- 2.41.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] Revert "libsepol/tests: rename bool indentifiers" 2023-12-04 16:45 ` [PATCH 1/2] Revert "libsepol/tests: rename bool indentifiers" Petr Lautrbach 2023-12-04 16:45 ` [PATCH 2/2] Revert "libsepol: rename struct member" Petr Lautrbach @ 2023-12-04 18:19 ` James Carter 2023-12-04 18:24 ` Christian Göttsche 1 sibling, 1 reply; 9+ messages in thread From: James Carter @ 2023-12-04 18:19 UTC (permalink / raw) To: Petr Lautrbach; +Cc: selinux On Mon, Dec 4, 2023 at 11:46 AM Petr Lautrbach <lautrbach@redhat.com> wrote: > > This reverts commit 893b50c6ce661f3ee339145e76a0bbfa199671c3. > > 61f21385004 ("libsepol: rename struct member") broke build of SETools: > > setools/policyrep.c: In function ‘__pyx_pf_7setools_9policyrep_23ConditionalExprIterator___next__’: > setools/policyrep.c:27857:138: error: ‘cond_expr_t’ {aka ‘struct cond_expr’} has no member named ‘bool’; did you mean ‘boolean’? > 27857 | __pyx_t_3 = __pyx_f_7setools_9policyrep_13SELinuxPolicy_boolean_value_to_datum(__pyx_v_self->__pyx_base.policy, (__pyx_v_self->curr->bool - 1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 336, __pyx_L1_error) > | ^~~~ > | > > Signed-off-by: Petr Lautrbach <lautrbach@redhat.com> Also need to revert 513fc1570c16924080740b23fa34343ef64a90c0 Plus there is a couple of new uses in policy_validate.c and one in checkpolicy/policy_define.c that need to be corrected. Thanks, Jim > --- > libsepol/tests/test-linker-cond-map.c | 24 ++++++++++++------------ > 1 file changed, 12 insertions(+), 12 deletions(-) > > diff --git a/libsepol/tests/test-linker-cond-map.c b/libsepol/tests/test-linker-cond-map.c > index 142066669c0c..6ea0e4c2ac6b 100644 > --- a/libsepol/tests/test-linker-cond-map.c > +++ b/libsepol/tests/test-linker-cond-map.c > @@ -51,7 +51,7 @@ > */ > > typedef struct test_cond_expr { > - const char *boolean; > + const char *bool; > uint32_t expr_type; > } test_cond_expr_t; > > @@ -69,18 +69,18 @@ static void test_cond_expr_mapping(policydb_t * p, avrule_decl_t * d, test_cond_ > CU_ASSERT_FATAL(expr != NULL); > > CU_ASSERT(expr->expr_type == bools[i].expr_type); > - if (bools[i].boolean) { > - CU_ASSERT(strcmp(p->sym_val_to_name[SYM_BOOLS][expr->boolean - 1], bools[i].boolean) == 0); > + if (bools[i].bool) { > + CU_ASSERT(strcmp(p->sym_val_to_name[SYM_BOOLS][expr->boolean - 1], bools[i].bool) == 0); > } > expr = expr->next; > } > } > > -static void test_bool_state(policydb_t * p, const char *boolean, int state) > +static void test_bool_state(policydb_t * p, const char *bool, int state) > { > cond_bool_datum_t *b; > > - b = hashtab_search(p->p_bools.table, boolean); > + b = hashtab_search(p->p_bools.table, bool); > CU_ASSERT_FATAL(b != NULL); > CU_ASSERT(b->state == state); > } > @@ -100,7 +100,7 @@ void base_cond_tests(policydb_t * base) > test_sym_presence(base, "g_b_bool_1", SYM_BOOLS, SCOPE_DECL, decls, 1); > test_bool_state(base, "g_b_bool_1", 0); > /* conditional expression mapped correctly */ > - bools[0].boolean = "g_b_bool_1"; > + bools[0].bool = "g_b_bool_1"; > bools[0].expr_type = COND_BOOL; > test_cond_expr_mapping(base, d, bools, 1); > > @@ -110,7 +110,7 @@ void base_cond_tests(policydb_t * base) > test_sym_presence(base, "o1_b_bool_1", SYM_BOOLS, SCOPE_DECL, decls, 1); > test_bool_state(base, "o1_b_bool_1", 1); > /* conditional expression mapped correctly */ > - bools[0].boolean = "o1_b_bool_1"; > + bools[0].bool = "o1_b_bool_1"; > bools[0].expr_type = COND_BOOL; > test_cond_expr_mapping(base, d, bools, 1); > > @@ -128,7 +128,7 @@ void module_cond_tests(policydb_t * base) > test_sym_presence(base, "g_m1_bool_1", SYM_BOOLS, SCOPE_DECL, decls, 1); > test_bool_state(base, "g_m1_bool_1", 1); > /* conditional expression mapped correctly */ > - bools[0].boolean = "g_m1_bool_1"; > + bools[0].bool = "g_m1_bool_1"; > bools[0].expr_type = COND_BOOL; > test_cond_expr_mapping(base, d, bools, 1); > > @@ -138,7 +138,7 @@ void module_cond_tests(policydb_t * base) > test_sym_presence(base, "o1_m1_bool_1", SYM_BOOLS, SCOPE_DECL, decls, 1); > test_bool_state(base, "o1_m1_bool_1", 0); > /* conditional expression mapped correctly */ > - bools[0].boolean = "o1_m1_bool_1"; > + bools[0].bool = "o1_m1_bool_1"; > bools[0].expr_type = COND_BOOL; > test_cond_expr_mapping(base, d, bools, 1); > > @@ -150,11 +150,11 @@ void module_cond_tests(policydb_t * base) > test_bool_state(base, "g_m2_bool_1", 1); > test_bool_state(base, "g_m2_bool_2", 0); > /* conditional expression mapped correctly */ > - bools[0].boolean = "g_m2_bool_1"; > + bools[0].bool = "g_m2_bool_1"; > bools[0].expr_type = COND_BOOL; > - bools[1].boolean = "g_m2_bool_2"; > + bools[1].bool = "g_m2_bool_2"; > bools[1].expr_type = COND_BOOL; > - bools[2].boolean = NULL; > + bools[2].bool = NULL; > bools[2].expr_type = COND_AND; > test_cond_expr_mapping(base, d, bools, 3); > } > -- > 2.41.0 > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] Revert "libsepol/tests: rename bool indentifiers" 2023-12-04 18:19 ` [PATCH 1/2] Revert "libsepol/tests: rename bool indentifiers" James Carter @ 2023-12-04 18:24 ` Christian Göttsche 2023-12-04 18:31 ` James Carter 2023-12-04 18:37 ` Petr Lautrbach 0 siblings, 2 replies; 9+ messages in thread From: Christian Göttsche @ 2023-12-04 18:24 UTC (permalink / raw) To: James Carter; +Cc: Petr Lautrbach, selinux On Mon, 4 Dec 2023 at 19:20, James Carter <jwcart2@gmail.com> wrote: > > On Mon, Dec 4, 2023 at 11:46 AM Petr Lautrbach <lautrbach@redhat.com> wrote: > > > > This reverts commit 893b50c6ce661f3ee339145e76a0bbfa199671c3. > > > > 61f21385004 ("libsepol: rename struct member") broke build of SETools: > > > > setools/policyrep.c: In function ‘__pyx_pf_7setools_9policyrep_23ConditionalExprIterator___next__’: > > setools/policyrep.c:27857:138: error: ‘cond_expr_t’ {aka ‘struct cond_expr’} has no member named ‘bool’; did you mean ‘boolean’? > > 27857 | __pyx_t_3 = __pyx_f_7setools_9policyrep_13SELinuxPolicy_boolean_value_to_datum(__pyx_v_self->__pyx_base.policy, (__pyx_v_self->curr->bool - 1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 336, __pyx_L1_error) > > | ^~~~ > > | > > > > Signed-off-by: Petr Lautrbach <lautrbach@redhat.com> > > Also need to revert 513fc1570c16924080740b23fa34343ef64a90c0 > Plus there is a couple of new uses in policy_validate.c and one in > checkpolicy/policy_define.c that need to be corrected. > > Thanks, > Jim Could you consider https://github.com/SELinuxProject/setools/pull/113 as an alternative? > > > --- > > libsepol/tests/test-linker-cond-map.c | 24 ++++++++++++------------ > > 1 file changed, 12 insertions(+), 12 deletions(-) > > > > diff --git a/libsepol/tests/test-linker-cond-map.c b/libsepol/tests/test-linker-cond-map.c > > index 142066669c0c..6ea0e4c2ac6b 100644 > > --- a/libsepol/tests/test-linker-cond-map.c > > +++ b/libsepol/tests/test-linker-cond-map.c > > @@ -51,7 +51,7 @@ > > */ > > > > typedef struct test_cond_expr { > > - const char *boolean; > > + const char *bool; > > uint32_t expr_type; > > } test_cond_expr_t; > > > > @@ -69,18 +69,18 @@ static void test_cond_expr_mapping(policydb_t * p, avrule_decl_t * d, test_cond_ > > CU_ASSERT_FATAL(expr != NULL); > > > > CU_ASSERT(expr->expr_type == bools[i].expr_type); > > - if (bools[i].boolean) { > > - CU_ASSERT(strcmp(p->sym_val_to_name[SYM_BOOLS][expr->boolean - 1], bools[i].boolean) == 0); > > + if (bools[i].bool) { > > + CU_ASSERT(strcmp(p->sym_val_to_name[SYM_BOOLS][expr->boolean - 1], bools[i].bool) == 0); > > } > > expr = expr->next; > > } > > } > > > > -static void test_bool_state(policydb_t * p, const char *boolean, int state) > > +static void test_bool_state(policydb_t * p, const char *bool, int state) > > { > > cond_bool_datum_t *b; > > > > - b = hashtab_search(p->p_bools.table, boolean); > > + b = hashtab_search(p->p_bools.table, bool); > > CU_ASSERT_FATAL(b != NULL); > > CU_ASSERT(b->state == state); > > } > > @@ -100,7 +100,7 @@ void base_cond_tests(policydb_t * base) > > test_sym_presence(base, "g_b_bool_1", SYM_BOOLS, SCOPE_DECL, decls, 1); > > test_bool_state(base, "g_b_bool_1", 0); > > /* conditional expression mapped correctly */ > > - bools[0].boolean = "g_b_bool_1"; > > + bools[0].bool = "g_b_bool_1"; > > bools[0].expr_type = COND_BOOL; > > test_cond_expr_mapping(base, d, bools, 1); > > > > @@ -110,7 +110,7 @@ void base_cond_tests(policydb_t * base) > > test_sym_presence(base, "o1_b_bool_1", SYM_BOOLS, SCOPE_DECL, decls, 1); > > test_bool_state(base, "o1_b_bool_1", 1); > > /* conditional expression mapped correctly */ > > - bools[0].boolean = "o1_b_bool_1"; > > + bools[0].bool = "o1_b_bool_1"; > > bools[0].expr_type = COND_BOOL; > > test_cond_expr_mapping(base, d, bools, 1); > > > > @@ -128,7 +128,7 @@ void module_cond_tests(policydb_t * base) > > test_sym_presence(base, "g_m1_bool_1", SYM_BOOLS, SCOPE_DECL, decls, 1); > > test_bool_state(base, "g_m1_bool_1", 1); > > /* conditional expression mapped correctly */ > > - bools[0].boolean = "g_m1_bool_1"; > > + bools[0].bool = "g_m1_bool_1"; > > bools[0].expr_type = COND_BOOL; > > test_cond_expr_mapping(base, d, bools, 1); > > > > @@ -138,7 +138,7 @@ void module_cond_tests(policydb_t * base) > > test_sym_presence(base, "o1_m1_bool_1", SYM_BOOLS, SCOPE_DECL, decls, 1); > > test_bool_state(base, "o1_m1_bool_1", 0); > > /* conditional expression mapped correctly */ > > - bools[0].boolean = "o1_m1_bool_1"; > > + bools[0].bool = "o1_m1_bool_1"; > > bools[0].expr_type = COND_BOOL; > > test_cond_expr_mapping(base, d, bools, 1); > > > > @@ -150,11 +150,11 @@ void module_cond_tests(policydb_t * base) > > test_bool_state(base, "g_m2_bool_1", 1); > > test_bool_state(base, "g_m2_bool_2", 0); > > /* conditional expression mapped correctly */ > > - bools[0].boolean = "g_m2_bool_1"; > > + bools[0].bool = "g_m2_bool_1"; > > bools[0].expr_type = COND_BOOL; > > - bools[1].boolean = "g_m2_bool_2"; > > + bools[1].bool = "g_m2_bool_2"; > > bools[1].expr_type = COND_BOOL; > > - bools[2].boolean = NULL; > > + bools[2].bool = NULL; > > bools[2].expr_type = COND_AND; > > test_cond_expr_mapping(base, d, bools, 3); > > } > > -- > > 2.41.0 > > > > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] Revert "libsepol/tests: rename bool indentifiers" 2023-12-04 18:24 ` Christian Göttsche @ 2023-12-04 18:31 ` James Carter 2023-12-04 18:37 ` Petr Lautrbach 1 sibling, 0 replies; 9+ messages in thread From: James Carter @ 2023-12-04 18:31 UTC (permalink / raw) To: Christian Göttsche; +Cc: Petr Lautrbach, selinux On Mon, Dec 4, 2023 at 1:24 PM Christian Göttsche <cgzones@googlemail.com> wrote: > > On Mon, 4 Dec 2023 at 19:20, James Carter <jwcart2@gmail.com> wrote: > > > > On Mon, Dec 4, 2023 at 11:46 AM Petr Lautrbach <lautrbach@redhat.com> wrote: > > > > > > This reverts commit 893b50c6ce661f3ee339145e76a0bbfa199671c3. > > > > > > 61f21385004 ("libsepol: rename struct member") broke build of SETools: > > > > > > setools/policyrep.c: In function ‘__pyx_pf_7setools_9policyrep_23ConditionalExprIterator___next__’: > > > setools/policyrep.c:27857:138: error: ‘cond_expr_t’ {aka ‘struct cond_expr’} has no member named ‘bool’; did you mean ‘boolean’? > > > 27857 | __pyx_t_3 = __pyx_f_7setools_9policyrep_13SELinuxPolicy_boolean_value_to_datum(__pyx_v_self->__pyx_base.policy, (__pyx_v_self->curr->bool - 1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 336, __pyx_L1_error) > > > | ^~~~ > > > | > > > > > > Signed-off-by: Petr Lautrbach <lautrbach@redhat.com> > > > > Also need to revert 513fc1570c16924080740b23fa34343ef64a90c0 > > Plus there is a couple of new uses in policy_validate.c and one in > > checkpolicy/policy_define.c that need to be corrected. > > > > Thanks, > > Jim > > Could you consider https://github.com/SELinuxProject/setools/pull/113 > as an alternative? > Obviously, not reverting would be preferable if at all possible. Jim > > > > > --- > > > libsepol/tests/test-linker-cond-map.c | 24 ++++++++++++------------ > > > 1 file changed, 12 insertions(+), 12 deletions(-) > > > > > > diff --git a/libsepol/tests/test-linker-cond-map.c b/libsepol/tests/test-linker-cond-map.c > > > index 142066669c0c..6ea0e4c2ac6b 100644 > > > --- a/libsepol/tests/test-linker-cond-map.c > > > +++ b/libsepol/tests/test-linker-cond-map.c > > > @@ -51,7 +51,7 @@ > > > */ > > > > > > typedef struct test_cond_expr { > > > - const char *boolean; > > > + const char *bool; > > > uint32_t expr_type; > > > } test_cond_expr_t; > > > > > > @@ -69,18 +69,18 @@ static void test_cond_expr_mapping(policydb_t * p, avrule_decl_t * d, test_cond_ > > > CU_ASSERT_FATAL(expr != NULL); > > > > > > CU_ASSERT(expr->expr_type == bools[i].expr_type); > > > - if (bools[i].boolean) { > > > - CU_ASSERT(strcmp(p->sym_val_to_name[SYM_BOOLS][expr->boolean - 1], bools[i].boolean) == 0); > > > + if (bools[i].bool) { > > > + CU_ASSERT(strcmp(p->sym_val_to_name[SYM_BOOLS][expr->boolean - 1], bools[i].bool) == 0); > > > } > > > expr = expr->next; > > > } > > > } > > > > > > -static void test_bool_state(policydb_t * p, const char *boolean, int state) > > > +static void test_bool_state(policydb_t * p, const char *bool, int state) > > > { > > > cond_bool_datum_t *b; > > > > > > - b = hashtab_search(p->p_bools.table, boolean); > > > + b = hashtab_search(p->p_bools.table, bool); > > > CU_ASSERT_FATAL(b != NULL); > > > CU_ASSERT(b->state == state); > > > } > > > @@ -100,7 +100,7 @@ void base_cond_tests(policydb_t * base) > > > test_sym_presence(base, "g_b_bool_1", SYM_BOOLS, SCOPE_DECL, decls, 1); > > > test_bool_state(base, "g_b_bool_1", 0); > > > /* conditional expression mapped correctly */ > > > - bools[0].boolean = "g_b_bool_1"; > > > + bools[0].bool = "g_b_bool_1"; > > > bools[0].expr_type = COND_BOOL; > > > test_cond_expr_mapping(base, d, bools, 1); > > > > > > @@ -110,7 +110,7 @@ void base_cond_tests(policydb_t * base) > > > test_sym_presence(base, "o1_b_bool_1", SYM_BOOLS, SCOPE_DECL, decls, 1); > > > test_bool_state(base, "o1_b_bool_1", 1); > > > /* conditional expression mapped correctly */ > > > - bools[0].boolean = "o1_b_bool_1"; > > > + bools[0].bool = "o1_b_bool_1"; > > > bools[0].expr_type = COND_BOOL; > > > test_cond_expr_mapping(base, d, bools, 1); > > > > > > @@ -128,7 +128,7 @@ void module_cond_tests(policydb_t * base) > > > test_sym_presence(base, "g_m1_bool_1", SYM_BOOLS, SCOPE_DECL, decls, 1); > > > test_bool_state(base, "g_m1_bool_1", 1); > > > /* conditional expression mapped correctly */ > > > - bools[0].boolean = "g_m1_bool_1"; > > > + bools[0].bool = "g_m1_bool_1"; > > > bools[0].expr_type = COND_BOOL; > > > test_cond_expr_mapping(base, d, bools, 1); > > > > > > @@ -138,7 +138,7 @@ void module_cond_tests(policydb_t * base) > > > test_sym_presence(base, "o1_m1_bool_1", SYM_BOOLS, SCOPE_DECL, decls, 1); > > > test_bool_state(base, "o1_m1_bool_1", 0); > > > /* conditional expression mapped correctly */ > > > - bools[0].boolean = "o1_m1_bool_1"; > > > + bools[0].bool = "o1_m1_bool_1"; > > > bools[0].expr_type = COND_BOOL; > > > test_cond_expr_mapping(base, d, bools, 1); > > > > > > @@ -150,11 +150,11 @@ void module_cond_tests(policydb_t * base) > > > test_bool_state(base, "g_m2_bool_1", 1); > > > test_bool_state(base, "g_m2_bool_2", 0); > > > /* conditional expression mapped correctly */ > > > - bools[0].boolean = "g_m2_bool_1"; > > > + bools[0].bool = "g_m2_bool_1"; > > > bools[0].expr_type = COND_BOOL; > > > - bools[1].boolean = "g_m2_bool_2"; > > > + bools[1].bool = "g_m2_bool_2"; > > > bools[1].expr_type = COND_BOOL; > > > - bools[2].boolean = NULL; > > > + bools[2].bool = NULL; > > > bools[2].expr_type = COND_AND; > > > test_cond_expr_mapping(base, d, bools, 3); > > > } > > > -- > > > 2.41.0 > > > > > > > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] Revert "libsepol/tests: rename bool indentifiers" 2023-12-04 18:24 ` Christian Göttsche 2023-12-04 18:31 ` James Carter @ 2023-12-04 18:37 ` Petr Lautrbach 2023-12-06 13:43 ` Chris PeBenito 1 sibling, 1 reply; 9+ messages in thread From: Petr Lautrbach @ 2023-12-04 18:37 UTC (permalink / raw) To: Christian Göttsche, James Carter, Chris PeBenito Cc: selinux, Chris PeBenito Christian Göttsche <cgzones@googlemail.com> writes: > On Mon, 4 Dec 2023 at 19:20, James Carter <jwcart2@gmail.com> wrote: >> >> On Mon, Dec 4, 2023 at 11:46 AM Petr Lautrbach <lautrbach@redhat.com> wrote: >> > >> > This reverts commit 893b50c6ce661f3ee339145e76a0bbfa199671c3. >> > >> > 61f21385004 ("libsepol: rename struct member") broke build of SETools: >> > >> > setools/policyrep.c: In function ‘__pyx_pf_7setools_9policyrep_23ConditionalExprIterator___next__’: >> > setools/policyrep.c:27857:138: error: ‘cond_expr_t’ {aka ‘struct cond_expr’} has no member named ‘bool’; did you mean ‘boolean’? >> > 27857 | __pyx_t_3 = __pyx_f_7setools_9policyrep_13SELinuxPolicy_boolean_value_to_datum(__pyx_v_self->__pyx_base.policy, (__pyx_v_self->curr->bool - 1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 336, __pyx_L1_error) >> > | ^~~~ >> > | >> > >> > Signed-off-by: Petr Lautrbach <lautrbach@redhat.com> >> >> Also need to revert 513fc1570c16924080740b23fa34343ef64a90c0 >> Plus there is a couple of new uses in policy_validate.c and one in >> checkpolicy/policy_define.c that need to be corrected. >> >> Thanks, >> Jim > > Could you consider https://github.com/SELinuxProject/setools/pull/113 > as an alternative? Nice, thanks! I need to test it, but it looks good. For me, this is better solution than reverting all the patches. But we need to release SETools together with SELinux userspace 3.6. Chris, is it feasible to release SETools with the proposed change on this Wednesday or a week later? Petr >> >> > --- >> > libsepol/tests/test-linker-cond-map.c | 24 ++++++++++++------------ >> > 1 file changed, 12 insertions(+), 12 deletions(-) >> > >> > diff --git a/libsepol/tests/test-linker-cond-map.c b/libsepol/tests/test-linker-cond-map.c >> > index 142066669c0c..6ea0e4c2ac6b 100644 >> > --- a/libsepol/tests/test-linker-cond-map.c >> > +++ b/libsepol/tests/test-linker-cond-map.c >> > @@ -51,7 +51,7 @@ >> > */ >> > >> > typedef struct test_cond_expr { >> > - const char *boolean; >> > + const char *bool; >> > uint32_t expr_type; >> > } test_cond_expr_t; >> > >> > @@ -69,18 +69,18 @@ static void test_cond_expr_mapping(policydb_t * p, avrule_decl_t * d, test_cond_ >> > CU_ASSERT_FATAL(expr != NULL); >> > >> > CU_ASSERT(expr->expr_type == bools[i].expr_type); >> > - if (bools[i].boolean) { >> > - CU_ASSERT(strcmp(p->sym_val_to_name[SYM_BOOLS][expr->boolean - 1], bools[i].boolean) == 0); >> > + if (bools[i].bool) { >> > + CU_ASSERT(strcmp(p->sym_val_to_name[SYM_BOOLS][expr->boolean - 1], bools[i].bool) == 0); >> > } >> > expr = expr->next; >> > } >> > } >> > >> > -static void test_bool_state(policydb_t * p, const char *boolean, int state) >> > +static void test_bool_state(policydb_t * p, const char *bool, int state) >> > { >> > cond_bool_datum_t *b; >> > >> > - b = hashtab_search(p->p_bools.table, boolean); >> > + b = hashtab_search(p->p_bools.table, bool); >> > CU_ASSERT_FATAL(b != NULL); >> > CU_ASSERT(b->state == state); >> > } >> > @@ -100,7 +100,7 @@ void base_cond_tests(policydb_t * base) >> > test_sym_presence(base, "g_b_bool_1", SYM_BOOLS, SCOPE_DECL, decls, 1); >> > test_bool_state(base, "g_b_bool_1", 0); >> > /* conditional expression mapped correctly */ >> > - bools[0].boolean = "g_b_bool_1"; >> > + bools[0].bool = "g_b_bool_1"; >> > bools[0].expr_type = COND_BOOL; >> > test_cond_expr_mapping(base, d, bools, 1); >> > >> > @@ -110,7 +110,7 @@ void base_cond_tests(policydb_t * base) >> > test_sym_presence(base, "o1_b_bool_1", SYM_BOOLS, SCOPE_DECL, decls, 1); >> > test_bool_state(base, "o1_b_bool_1", 1); >> > /* conditional expression mapped correctly */ >> > - bools[0].boolean = "o1_b_bool_1"; >> > + bools[0].bool = "o1_b_bool_1"; >> > bools[0].expr_type = COND_BOOL; >> > test_cond_expr_mapping(base, d, bools, 1); >> > >> > @@ -128,7 +128,7 @@ void module_cond_tests(policydb_t * base) >> > test_sym_presence(base, "g_m1_bool_1", SYM_BOOLS, SCOPE_DECL, decls, 1); >> > test_bool_state(base, "g_m1_bool_1", 1); >> > /* conditional expression mapped correctly */ >> > - bools[0].boolean = "g_m1_bool_1"; >> > + bools[0].bool = "g_m1_bool_1"; >> > bools[0].expr_type = COND_BOOL; >> > test_cond_expr_mapping(base, d, bools, 1); >> > >> > @@ -138,7 +138,7 @@ void module_cond_tests(policydb_t * base) >> > test_sym_presence(base, "o1_m1_bool_1", SYM_BOOLS, SCOPE_DECL, decls, 1); >> > test_bool_state(base, "o1_m1_bool_1", 0); >> > /* conditional expression mapped correctly */ >> > - bools[0].boolean = "o1_m1_bool_1"; >> > + bools[0].bool = "o1_m1_bool_1"; >> > bools[0].expr_type = COND_BOOL; >> > test_cond_expr_mapping(base, d, bools, 1); >> > >> > @@ -150,11 +150,11 @@ void module_cond_tests(policydb_t * base) >> > test_bool_state(base, "g_m2_bool_1", 1); >> > test_bool_state(base, "g_m2_bool_2", 0); >> > /* conditional expression mapped correctly */ >> > - bools[0].boolean = "g_m2_bool_1"; >> > + bools[0].bool = "g_m2_bool_1"; >> > bools[0].expr_type = COND_BOOL; >> > - bools[1].boolean = "g_m2_bool_2"; >> > + bools[1].bool = "g_m2_bool_2"; >> > bools[1].expr_type = COND_BOOL; >> > - bools[2].boolean = NULL; >> > + bools[2].bool = NULL; >> > bools[2].expr_type = COND_AND; >> > test_cond_expr_mapping(base, d, bools, 3); >> > } >> > -- >> > 2.41.0 >> > >> > >> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] Revert "libsepol/tests: rename bool indentifiers" 2023-12-04 18:37 ` Petr Lautrbach @ 2023-12-06 13:43 ` Chris PeBenito 0 siblings, 0 replies; 9+ messages in thread From: Chris PeBenito @ 2023-12-06 13:43 UTC (permalink / raw) To: Petr Lautrbach, Christian Göttsche, James Carter Cc: selinux, Chris PeBenito On 12/4/2023 1:37 PM, Petr Lautrbach wrote: > Christian Göttsche <cgzones@googlemail.com> writes: > >> On Mon, 4 Dec 2023 at 19:20, James Carter <jwcart2@gmail.com> wrote: >>> >>> On Mon, Dec 4, 2023 at 11:46 AM Petr Lautrbach <lautrbach@redhat.com> wrote: >>>> >>>> This reverts commit 893b50c6ce661f3ee339145e76a0bbfa199671c3. >>>> >>>> 61f21385004 ("libsepol: rename struct member") broke build of SETools: >>>> >>>> setools/policyrep.c: In function ‘__pyx_pf_7setools_9policyrep_23ConditionalExprIterator___next__’: >>>> setools/policyrep.c:27857:138: error: ‘cond_expr_t’ {aka ‘struct cond_expr’} has no member named ‘bool’; did you mean ‘boolean’? >>>> 27857 | __pyx_t_3 = __pyx_f_7setools_9policyrep_13SELinuxPolicy_boolean_value_to_datum(__pyx_v_self->__pyx_base.policy, (__pyx_v_self->curr->bool - 1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 336, __pyx_L1_error) >>>> | ^~~~ >>>> | >>>> >>>> Signed-off-by: Petr Lautrbach <lautrbach@redhat.com> >>> >>> Also need to revert 513fc1570c16924080740b23fa34343ef64a90c0 >>> Plus there is a couple of new uses in policy_validate.c and one in >>> checkpolicy/policy_define.c that need to be corrected. >>> >>> Thanks, >>> Jim >> >> Could you consider https://github.com/SELinuxProject/setools/pull/113 >> as an alternative? > > Nice, thanks! > > I need to test it, but it looks good. > > For me, this is better solution than reverting all the patches. > > But we need to release SETools together with SELinux userspace 3.6. > > Chris, is it feasible to release SETools with the proposed change on > this Wednesday or a week later? Yes, that can be done. -- Chris PeBenito ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-12-06 13:43 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-04 16:19 setools build is broken by 61f21385004 ("libsepol: rename struct member"), revert? Petr Lautrbach
2023-12-04 16:26 ` James Carter
2023-12-04 16:45 ` [PATCH 1/2] Revert "libsepol/tests: rename bool indentifiers" Petr Lautrbach
2023-12-04 16:45 ` [PATCH 2/2] Revert "libsepol: rename struct member" Petr Lautrbach
2023-12-04 18:19 ` [PATCH 1/2] Revert "libsepol/tests: rename bool indentifiers" James Carter
2023-12-04 18:24 ` Christian Göttsche
2023-12-04 18:31 ` James Carter
2023-12-04 18:37 ` Petr Lautrbach
2023-12-06 13:43 ` Chris PeBenito
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.