[Bug 291618] [NEW] Leaks way too much environment

Loïc Minier lool at dooz.org
Fri Oct 31 15:11:01 UTC 2008


*** This bug is a duplicate of bug 291619 ***
    https://bugs.launchpad.net/bugs/291619

Public bug reported:

Hi,

initramfs scripts leak plenty of environment variables to init.

This isn't a problem for upstart systems such as Ubuntu systems as
upstart clearenv()s in init/process.c (with the comment that initramfs
is leaking env!), but it is a problem for sysvinit systems such as
Debian.

Adding env >"$(mktemp -t foobar.env.XXXXXXXX)" in /etc/init.d/foobar started on boot exposes the following env vars:
CONSOLE=/dev/console
ROOTFSTYPE=
HOME=/
DPKG_ARCH=amd64
init=/sbin/init
runlevel=2
ROOTFLAGS=
panic=
ROOTDELAY=
INIT_VERSION=sysvinit-2.86
break=
TERM=linux
quiet=y
SELINUX_INIT=YES
PATH=/sbin:/usr/sbin:/bin:/usr/bin
RUNLEVEL=2
PREVLEVEL=N
resume=
resume_offset=
blacklist=
MODPROBE_OPTIONS=-Qb
PWD=/
previous=N
readonly=y
rootmnt=/root
ROOT=/dev/disk/by-uuid/0b808ebe-1c11-4c2d-90b9-dc297ac0430c
BOOT=local
VERBOSE=no

I noticed this issue in initramfs-tools while chasing while "modprobe
--all foo bar" worked differently during boot and after boot, so this
bug can cause subtle disturbances later on.

I think it's safe to cleanup the environment in initramfs-tools as
upstart clears it anyway.

Cheers,

** Affects: initramfs-tools (Ubuntu)
     Importance: Undecided
         Status: New

** This bug has been marked a duplicate of bug 291619
   Leaks way too much environment

-- 
Leaks way too much environment
https://bugs.launchpad.net/bugs/291618
You received this bug notification because you are a member of Kernel
Bugs, which is subscribed to initramfs-tools in ubuntu.




More information about the kernel-bugs mailing list