Skip to content

Commit

Permalink
Merge pull request #113 from cgzones/libsepol_boolean
Browse files Browse the repository at this point in the history
Update for libsepol 3.6
  • Loading branch information
pebenito authored Dec 6, 2023
2 parents 7d0b69b + f84bc83 commit 4d0e13b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setools/policyrep/boolcond.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ cdef class ConditionalExprIterator(PolicyIterator):

if self.curr.expr_type == sepol.COND_BOOL:
item = Boolean.factory(self.policy,
self.policy.boolean_value_to_datum(self.curr.bool - 1))
self.policy.boolean_value_to_datum(self.curr.boolean - 1))
else:
item = ConditionalOperator.factory(self.policy, self.curr)

Expand Down
10 changes: 9 additions & 1 deletion setools/policyrep/sepol.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,14 @@ cdef extern from "<sepol/policydb/sidtab.h>":


cdef extern from "<sepol/policydb/conditional.h>":
"""
#if defined(COND_EXPR_T_RENAME_BOOL_BOOLEAN)
#define COND_EXPR_T_RENAME_BOOL_NAME boolean
#else
#define COND_EXPR_T_RENAME_BOOL_NAME bool
#endif
"""

cdef int COND_EXPR_MAXDEPTH
cdef int COND_MAX_BOOLS

Expand All @@ -309,7 +317,7 @@ cdef extern from "<sepol/policydb/conditional.h>":

cdef struct cond_expr:
uint32_t expr_type
uint32_t bool
uint32_t boolean "COND_EXPR_T_RENAME_BOOL_NAME"
cond_expr *next

ctypedef cond_expr cond_expr_t
Expand Down

0 comments on commit 4d0e13b

Please sign in to comment.