Skip to content

Update for libsepol 3.6 #113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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