On Thu, 2016-01-21 at 01:33 +0100, Christoph Anton Mitterer wrote:
> Since the new version:
> $ beep
> bash: /usr/bin/beep: Permission denied
> 
> even though:
> $ groups 
> ... cdrom floppy audio video users

I'm seeing the same issue on my system.  It looks like the problem is
that /usr/bin/beep is no longer owned by group audio, so the group
execute permission set based on the debconf choice is irrelevant.  For
comparison:

$ dpkg -c beep_1.3-3+b1_amd64.deb | grep bin/beep
-rwxr-xr-x root/audio    10080 2012-06-24 05:28 ./usr/bin/beep

$ dpkg -c beep_1.3-4_amd64.deb | grep bin/beep
-rwxr-xr-x root/root     11112 2016-01-17 06:56 ./usr/bin/beep

Thanks,
Kevin


P.S.  It also appears that the code which calls chmod in postinst is
duplicated.  You could combine the conditional into a single branch by
combining

if pathfind dpkg-statoverride ; then
        if ! dpkg-statoverride --list /usr/bin/beep >/dev/null ; then

into

if ! pathfind dpkg-statoverride || \
    ! dpkg-statoverride --list /usr/bin/beep >/dev/null ; then

then removing the duplicated else block.  (If you wanted to cut down
on code, you could also replace `pathfind` with `command -v` and
remove the pathfind function.)

P.P.S.  Sorry to pile on, but one other thing that I noticed while
investigating is that Vcs-Git appears to be out of date (since
git://git.deb.at/pkg/beep.git only contains up to 1.3-3).  You may
want to fix that as well.  Thanks again!

Reply via email to