[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#987787: libdebuginfod-common: wrong permissions on /etc/profile.d/debuginfod.{c,}sh (and odd content)



Control: found -1 0.185-2

gdb depends on this package in sid now, and:
-- >8 --
nabijaczleweli@szarotka:~$ l /etc/profile.d/
total 20K
-rw-r--r-- 1 root root  726 Aug 12  2020 bash_completion.sh
-rw------- 1 root root  357 Aug 16 15:20 debuginfod.csh
-rw------- 1 root root  190 Aug 16 15:20 debuginfod.sh
-rw-r--r-- 1 root root 1.1K Nov  3  2019 gawk.csh
-rw-r--r-- 1 root root  757 Nov  3  2019 gawk.sh

nabijaczleweli@szarotka:~$ sudo cat /etc/profile.d/debuginfod.csh
if ("https://debuginfod.debian.net"; != "") then
        if ($?DEBUGINFOD_URLS) then
                if ($%DEBUGINFOD_URLS) then
                        setenv DEBUGINFOD_URLS "$DEBUGINFOD_URLS https://debuginfod.debian.net";
                else
                        setenv DEBUGINFOD_URLS "https://debuginfod.debian.net";
                endif
        else
                setenv DEBUGINFOD_URLS "https://debuginfod.debian.net";
        endif
endif
setenv DEBUGINFOD_URLS ""

nabijaczleweli@szarotka:~$ sudo cat /etc/profile.d/debuginfod.sh
if [ -n "https://debuginfod.debian.net"; ]; then
        DEBUGINFOD_URLS="${DEBUGINFOD_URLS-}${DEBUGINFOD_URLS:+ }https://debuginfod.debian.net";
        export DEBUGINFOD_URLS
fi
export DEBUGINFOD_URLS=""
-- >8 --

And, /much more worryingly/:
-- >8 --
nabijaczleweli@szarotka:~$ sudo dpkg-reconfigure libdebuginfod-common
Configuring libdebuginfod-common
--------------------------------

While debugging programs (with GDB, for example) or using debuginfo-consumer applications, it is possible to connect to
Debian's debuginfod server and download the necessary debug information for the program you are debugging on-the-fly,
without the need to configure the debian-debug apt repository nor installing any dbgsym packages.  This service is
maintained by Debian, and the only information you will have to send to it is the Build-ID hash of the
program(s)/library(ies) being debugged.

Connect to Debian's debuginfod server to download debug symbols? [yes/no] no

nabijaczleweli@szarotka:~$ debconf-show libdebuginfod-common
* libdebuginfod/usedebiandebuginfod: false

nabijaczleweli@szarotka:~$ sudo cat /etc/profile.d/debuginfod.*
if ("https://debuginfod.debian.net"; != "") then
        if ($?DEBUGINFOD_URLS) then
                if ($%DEBUGINFOD_URLS) then
                        setenv DEBUGINFOD_URLS "$DEBUGINFOD_URLS https://debuginfod.debian.net";
                else
                        setenv DEBUGINFOD_URLS "https://debuginfod.debian.net";
                endif
        else
                setenv DEBUGINFOD_URLS "https://debuginfod.debian.net";
        endif
endif
setenv DEBUGINFOD_URLS ""
if [ -n "https://debuginfod.debian.net"; ]; then
        DEBUGINFOD_URLS="${DEBUGINFOD_URLS-}${DEBUGINFOD_URLS:+ }https://debuginfod.debian.net";
        export DEBUGINFOD_URLS
fi
export DEBUGINFOD_URLS=""
-- >8 --

Yes ‒ they don't get removed after I *explicitly say no*.
BTW: didn't get prompted on install, but I have my priority set to high,
so meh.

dpkg -L libdebuginfod-common reveals:
	/usr/share/libdebuginfod-common/debuginfod.csh
	/usr/share/libdebuginfod-common/debuginfod.sh
And, indeed:
	nabijaczleweli@szarotka:~$ l /usr/share/libdebuginfod-common/debuginfod.*
	-rw-r--r-- 1 root root 331 Aug 15 18:27 /usr/share/libdebuginfod-common/debuginfod.csh
	-rw-r--r-- 1 root root 164 Aug 15 18:27 /usr/share/libdebuginfod-common/debuginfod.sh
So I think /etc/profile.d/* should be links to these files.

But wait, the sizes are different! What does this mean?
-- >8 --
nabijaczleweli@szarotka:~$ for f in sh csh; do sudo git diff {/usr/share/libdebuginfod-common,/etc/profile.d}/debuginfod.$f; done
diff --git a/usr/share/libdebuginfod-common/debuginfod.sh b/etc/profile.d/debuginfod.sh
index 801d47a..62cb4f4 100644
--- a/usr/share/libdebuginfod-common/debuginfod.sh
+++ b/etc/profile.d/debuginfod.sh
@@ -2,3 +2,4 @@ if [ -n "https://debuginfod.debian.net"; ]; then
        DEBUGINFOD_URLS="${DEBUGINFOD_URLS-}${DEBUGINFOD_URLS:+ }https://debuginfod.debian.net";
        export DEBUGINFOD_URLS
 fi
+export DEBUGINFOD_URLS=""
diff --git a/usr/share/libdebuginfod-common/debuginfod.csh b/etc/profile.d/debuginfod.csh
index 17f15bb..11a5f63 100644
--- a/usr/share/libdebuginfod-common/debuginfod.csh
+++ b/etc/profile.d/debuginfod.csh
@@ -9,3 +9,4 @@ if ("https://debuginfod.debian.net"; != "") then
                setenv DEBUGINFOD_URLS "https://debuginfod.debian.net";
        endif
 endif
+setenv DEBUGINFOD_URLS ""
-- >8 --

Hm. And...
-- >8 --
nabijaczleweli@szarotka:~$ debconf-show libdebuginfod-common
* libdebuginfod/usedebiandebuginfod: true

nabijaczleweli@szarotka:~$ for f in sh csh; do sudo git diff {/usr/share/libdebuginfod-common,/etc/profile.d}/debuginfod.$f; done
diff --git a/usr/share/libdebuginfod-common/debuginfod.sh b/etc/profile.d/debuginfod.sh
index 801d47a..a8ff502 100644
--- a/usr/share/libdebuginfod-common/debuginfod.sh
+++ b/etc/profile.d/debuginfod.sh
@@ -2,3 +2,4 @@ if [ -n "https://debuginfod.debian.net"; ]; then
        DEBUGINFOD_URLS="${DEBUGINFOD_URLS-}${DEBUGINFOD_URLS:+ }https://debuginfod.debian.net";
        export DEBUGINFOD_URLS
 fi
+export DEBUGINFOD_URLS="$DEBUGINFOD_URLS"
diff --git a/usr/share/libdebuginfod-common/debuginfod.csh b/etc/profile.d/debuginfod.csh
index 17f15bb..186fa6d 100644
--- a/usr/share/libdebuginfod-common/debuginfod.csh
+++ b/etc/profile.d/debuginfod.csh
@@ -9,3 +9,4 @@ if ("https://debuginfod.debian.net"; != "") then
                setenv DEBUGINFOD_URLS "https://debuginfod.debian.net";
        endif
 endif
+setenv DEBUGINFOD_URLS "$DEBUGINFOD_URLS"
-- >8 --

This is, uh. yeah. I'll try to produce a patch.

Best,
наб

Attachment: signature.asc
Description: PGP signature


Reply to: