tresystechnology / setools3 Goto Github PK
View Code? Open in Web Editor NEWSELinux Policy Analysis Tools v3
Home Page: https://github.com/TresysTechnology/setools3/wiki
License: Other
SELinux Policy Analysis Tools v3
Home Page: https://github.com/TresysTechnology/setools3/wiki
License: Other
Hello,
I tried compiling SETools4.0.0-alpha with some gcc flags like the one in http://marc.info/?l=selinux&m=141073113518665&w=2 and the build failed with:
libqpol/policy_define.c: In function 'define_conditional':
libqpol/policy_define.c:3346:7: error: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Werror=parentheses]
if (!tmp->specified & AVRULE_TRANSITION)
^
libqpol/policy_define.c:3385:7: error: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Werror=parentheses]
if (!tmp->specified & AVRULE_TRANSITION)
^
In C !x&16
is understood (!x) & 16
, which is always false (AVRULE_TRANSITION
is 16). There could be missing parentheses if this expression is expected to be true in some situations.
I think it is a bug in SETools4.0.0-alpha which also exists in previous versions (cf. https://github.com/TresysTechnology/setools3/blob/setools-3.3.8/libqpol/src/policy_define.c#L2915 and https://github.com/TresysTechnology/setools3/blob/setools-3.3.8/libqpol/src/policy_define.c#L2954).
Cheers,
Nicolas
[snip]
/br/output/host/usr/bin/mips64el-ctng_n32-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -I./../include -I/br/output/host/usr/mips64el-buildroot-linux-gnu/sysroot/usr/lib/../include -I/br/output/host/usr/mips64el-buildroot-linux-gnu/sysroot/usr/include -I/br/output/host/usr/mips64el-buildroot-linux-gnu/sysroot/usr/include -fpic -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o policy_parse.o policy_parse.c
/bin/bash ../../ylwrap policy_scan.l .c policy_scan.c -- :
[snip]
Trying to compile policy_parse.c before its generated from policy_scan.l using ylwrap.
Full log can be found here:
http://autobuild.buildroot.net/results/119/1196ac448c77320b59b63b6133d2d1af1245bf69/build-end.log
Info:
policy.c: In function ‘union_multiply_declared_symbols’:
policy.c:610:36: warning: passing argument 2 of ‘qpol_type_get_isattr’ from incompatible pointer type
if (qpol_type_get_isattr(policy, attr, &isattr)) {
^
In file included from ./../include/qpol/avrule_query.h:37:0,
from ./../include/qpol/policy.h:39,
from qpol_internal.h:34,
from policy.c:29:
./../include/qpol/type_query.h:96:13: note: expected ‘const struct qpol_type_t *’ but argument is of type ‘struct type_datum_t *’
extern int qpol_type_get_isattr(const qpol_policy_t * policy, const qpol_type_
^
policy_define.c: In function ‘define_compute_type_helper’:
policy_define.c:1452:8: error: ‘class_perm_node_t’ has no member named ‘class’
perm->class = i + 1;
^
policy_define.c: In function ‘define_te_avtab_helper’:
policy_define.c:1703:12: error: ‘class_perm_node_t’ has no member named ‘class’
cur_perms->class = i + 1;
^
x86_64-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -fno-strict-aliasing -I./../include -I/usr/lib64/../include -I/usr/include -I/usr/include -fpic -O2 -pipe -march=native -mtune=native -c -o policy_extend.o policy_extend.c
Makefile:700: recipe for target 'policy_define.o' failed
make[4]: *** [policy_define.o] Error 1
make[4]: *** Waiting for unfinished jobs....
policy_extend.c: In function ‘qpol_syn_rule_table_insert_sepol_avrule’:
policy_extend.c:846:31: error: ‘class_perm_node_t’ has no member named ‘class’
key.class_val = class_node->class;
^
policy_extend.c:859:31: error: ‘class_perm_node_t’ has no member named ‘class’
key.class_val = class_node->class;
^
Makefile:700: recipe for target 'policy_extend.o' failed
make[4]: *** [policy_extend.o] Error 1
make[4]: Leaving directory '/var/tmp/portage/app-admin/setools-3.3.8-r5/work/setools-3.3.8/libqpol/src'
Makefile:581: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/var/tmp/portage/app-admin/setools-3.3.8-r5/work/setools-3.3.8/libqpol/src'
Makefile:511: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/var/tmp/portage/app-admin/setools-3.3.8-r5/work/setools-3.3.8/libqpol'
Makefile:571: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-admin/setools-3.3.8-r5/work/setools-3.3.8'
Makefile:501: recipe for target 'all' failed
make: *** [all] Error 2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.