Version in base suite: 6.2.0-4 Base version: ebook-speaker_6.2.0-4 Target version: ebook-speaker_6.2.0-4+deb12u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/e/ebook-speaker/ebook-speaker_6.2.0-4.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/e/ebook-speaker/ebook-speaker_6.2.0-4+deb12u1.dsc changelog | 6 ++++++ patches/long-logins | 47 +++++++++++++++++++++++++++++++++++++++++++++++ patches/series | 1 + salsa-ci.yml | 3 +++ 4 files changed, 57 insertions(+) diff -Nru ebook-speaker-6.2.0/debian/changelog ebook-speaker-6.2.0/debian/changelog --- ebook-speaker-6.2.0/debian/changelog 2022-01-08 17:01:53.000000000 +0000 +++ ebook-speaker-6.2.0/debian/changelog 2022-02-06 00:10:26.000000000 +0000 @@ -1,3 +1,9 @@ +ebook-speaker (6.2.0-4+deb12u1) bookworm; urgency=medium + + * patches/long-logins: Fix testing belonging to the audio group. + + -- Samuel Thibault Sun, 06 Feb 2022 01:10:26 +0100 + ebook-speaker (6.2.0-4) unstable; urgency=medium * control: Bump Standards-Version to 4.6.0 (no change) diff -Nru ebook-speaker-6.2.0/debian/patches/long-logins ebook-speaker-6.2.0/debian/patches/long-logins --- ebook-speaker-6.2.0/debian/patches/long-logins 1970-01-01 00:00:00.000000000 +0000 +++ ebook-speaker-6.2.0/debian/patches/long-logins 2022-02-06 00:10:26.000000000 +0000 @@ -0,0 +1,47 @@ +commit b29f4884e9a7637e09f93f8d53973c83a69670d9 +Author: Samuel Thibault +Date: Sun Feb 11 21:32:24 2024 +0100 + + Fix testing belonging to the audio group + + cuserid() is limited to L_cuserid characters, which is 9. This means that + users with a longer login were never seen as belonging to the group. + + Let us just replace with using getgroups, which allows + - to actually check the current allowed groups, + - to compare gids, which don't pose length limitations. + + Fixes #4 + +diff --git a/src/common.c b/src/common.c +index a580153..6658c40 100644 +--- a/src/common.c ++++ b/src/common.c +@@ -911,17 +911,18 @@ void get_list_of_sound_devices (misc_t *misc, audio_info_t *sound_devices) + char *str, *orig_language; + struct group *grp; + FILE *p; ++ int ngroups; ++ ++ ngroups = getgroups (0, NULL); ++ gid_t groups[ngroups]; ++ getgroups (ngroups, groups); + + grp = getgrnam ("audio"); +- found = 0; +- for (g = 0; grp->gr_mem[g]; g++) +- { +- if (strcmp (grp->gr_mem[g], cuserid (NULL)) == 0) +- { +- found = 1; +- break; +- } // if +- } // for ++ found = getegid () == grp->gr_gid; ++ ++ for (g = 0; !found && g < ngroups; g++) ++ found = groups[g] == grp->gr_gid; ++ + if (found == 0) + { + beep (); diff -Nru ebook-speaker-6.2.0/debian/patches/series ebook-speaker-6.2.0/debian/patches/series --- ebook-speaker-6.2.0/debian/patches/series 2021-10-23 19:25:33.000000000 +0000 +++ ebook-speaker-6.2.0/debian/patches/series 2022-02-06 00:10:26.000000000 +0000 @@ -2,3 +2,4 @@ path-fix format automake +long-logins diff -Nru ebook-speaker-6.2.0/debian/salsa-ci.yml ebook-speaker-6.2.0/debian/salsa-ci.yml --- ebook-speaker-6.2.0/debian/salsa-ci.yml 2021-09-26 09:05:02.000000000 +0000 +++ ebook-speaker-6.2.0/debian/salsa-ci.yml 2022-02-06 00:10:26.000000000 +0000 @@ -3,6 +3,9 @@ - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml +variables: + RELEASE: bookworm + test-crossbuild-arm64: allow_failure: false