Package: fapolicyd
Version: 1.1.7-5
Severity: serious
Tags: patch ftbfs
Justification: fails to build from source (but built successfully in the past)

# TOTAL: 2
# PASS:  1
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: gid_proc_test
===================

./gid_proc_test: Too many groups
FAIL gid_proc_test (exit status: 1)

Above are the relevant parts of the compile output when trying to build it by a
user with more than 16 supplementary groups.

Below is the patch to fix this:


Index: fapolicyd-1.1.7/src/tests/gid_proc_test.c
===================================================================
--- fapolicyd-1.1.7.orig/src/tests/gid_proc_test.c
+++ fapolicyd-1.1.7/src/tests/gid_proc_test.c
@@ -2,6 +2,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <grp.h>
+#include <limits.h>
 #include <error.h>
 #include "attr-sets.h"
 #include "process.h"
@@ -9,7 +10,7 @@
 int main(void)
 {
        int res, num, i, check_intersect = 0;
-       gid_t gid, gids[16];
+       gid_t gid, gids[NGROUPS_MAX];
        attr_sets_entry_t *groups = get_gid_set_from_pid(getpid());
 
        gid = getgid();
@@ -17,7 +18,7 @@ int main(void)
        if (!res)
                error(1, 0, "Group %d not found", gid);
 
-       num = getgroups(16, gids);
+       num = getgroups(NGROUPS_MAX, gids);
        if (num < 0)
                error(1, 0, "Too many groups");
 

-- System Information:
Debian Release: trixie/sid
Architecture: amd64 (x86_64)

Kernel: Linux 6.4.0-4-amd64 (SMP w/2 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_AU:en
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect

  • Bug#1051181: FTBFS: can't build package when user has more t... Russell Coker

Reply via email to