Skip to content

audit: disable building python bindings

struct audit_rules_data was using buf[0]; But on linux 5.17, it uses buf[]. Since linux kernel changed to using flexible array members, it resuls in the below build failure.

[  280s] audit_wrap.c: In function '_wrap_audit_rule_data_buf_set':
[  280s] audit_wrap.c:4701:17: error: cast specifies array type
[  280s]  4701 |     arg1->buf = (char [])(char *)memcpy(malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
[  280s]       |                 ^
[  280s] audit_wrap.c:4701:15: error: invalid use of flexible array member
[  280s]  4701 |     arg1->buf = (char [])(char *)memcpy(malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
[  280s]       |               ^
[  280s] audit_wrap.c:4703:15: error: invalid use of flexible array member
[  280s]  4703 |     arg1->buf = 0;
[  280s]       |               ^
[  281s] make[6]: *** [Makefile:515: _audit_la-audit_wrap.lo] Error 1

Disable building python bindings since no other packages depends on it, until a proper fix in audit-userspace is available.

https://bugs.debian.org/1010289

https://listman.redhat.com/archives/linux-audit/2022-February/018832.html

Fixes: https://phabricator.apertis.org/T9213

Edited by Vignesh Raman

Merge request reports