Discussion:
Bug#934586: chkboot: flawed profile.d script breaks on non-bash shells and pollutes environment
Add Reply
r00t
2019-08-12 10:20:01 UTC
Reply
Permalink
Package: chkboot
Version: 1.3-2
Severity: important

Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: r00t <***@constancy.org>
To: Debian Bug Tracking System <***@bugs.debian.org>
Subject: chkboot: flawed profile.d script breaks on non-bash shells and pollutes environment
Bcc: r00t <***@constancy.org>
X-Debbugs-Cc: ***@constancy.org

Package: chkboot
Version: 1.3-2
Severity: important

Dear Maintainer,

i already reported this upstream two weeks ago:
https://github.com/grazzolini/chkboot/pull/17


i installed chkboot and noticed a few issues with the profilealert script:

* it uses `source`, which is not available in all shells, and will cause errors
(just set your login-shell to dash instead of bash and see yourself)
* using `#!/bin/bash` does NOT help, as profile scripts are sourced into whatever shell the user is using
* actually, `source`-ing the defaults will will load all it's settings into every shell on the system,
just try `echo $BOOTDISK` after login



-- System Information:
Debian Release: bullseye/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.15.0-2-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages chkboot depends on:
ii init-system-helpers 1.57

chkboot recommends no packages.

Versions of packages chkboot suggests:
ii x11-utils 7.7+4
pn zenity <none>

-- no debconf information

-- System Information:
Debian Release: bullseye/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.15.0-2-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages chkboot depends on:
ii init-system-helpers 1.57

chkboot recommends no packages.

Versions of packages chkboot suggests:
ii x11-utils 7.7+4
pn zenity <none>

-- no debconf information
Baptiste BEAUPLAT
2019-08-12 11:40:01 UTC
Reply
Permalink
Control: tags -1 upstream patch
Baptiste BEAUPLAT
2019-08-12 11:40:01 UTC
Reply
Permalink
Control: severity -1 normal
Control: tags upstream patch

Hello r00t,
Post by r00t
Dear Maintainer,
https://github.com/grazzolini/chkboot/pull/17
* it uses `source`, which is not available in all shells, and will cause errors
(just set your login-shell to dash instead of bash and see yourself)
* using `#!/bin/bash` does NOT help, as profile scripts are sourced into whatever shell the user is using
* actually, `source`-ing the defaults will will load all it's settings into every shell on the system,
just try `echo $BOOTDISK` after login
That is definitively an issue and your corrections looks good.

Upstream can be a bit slow for replies. If they have not merged your
pull request in a month, I'll add your modification directly to the
Debian package.

Best regards,
--
Baptiste BEAUPLAT - lyknode
Loading...