[Pkg-sysvinit-devel] Bug#872039: initscripts: umountfs leaves /var mounted (rw)

Elrond elrond+bugs.debian.org at samba-tng.org
Sun Aug 13 17:46:35 UTC 2017


Package: initscripts
Version: 2.88dsf-59.9
Severity: serious
Tags: patch


Hi,


Reason for Severity=serious: This leaves /var (or other
filesystems) in an unclean state, so could possibly lead to
data loss!
(not to mention the lengthy fsck at every boot.)


umountfs in stretch changed the sed-calculation of
ROTECTED_MOUNTS. The new one includes /var on my system:

# sed -n ':a;/^[^ ]* \(\/\|\/usr\) /!{H;n;ba};{H;s/.*//;x;s/\n//;p}' /proc/mounts
/dev/root / ext2 rw,relatime,errors=continue 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=305176k,mode=755 0 0
tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
devtmpfs /dev devtmpfs rw,relatime,size=10240k,nr_inodes=381118,mode=755 0 0
tmpfs /run/shm tmpfs rw,nosuid,nodev,noexec,relatime,size=610340k 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
/dev/mapper/intvg1-sys_var /var ext2 rw,relatime,errors=continue 0 0
/dev/md3 /boot ext2 ro,relatime,errors=continue 0 0
/dev/mapper/intvg1-sys_usr /usr ext2 rw,relatime,errors=continue 0 0

The new sed was likely changed to include /usr in the list
of protected filesystems (it's remounted ro later).
But the new version basicly means (at least, I understand
it that way): Include all filesystems in ROTECTED_MOUNTS,
that are above the last mention of / or /usr.  While the
old one was about / only.


I propose to undo the sed changes and include /usr in the
specific list of filesystems to exclude from unmounting.

See attached patch.


Can you please try to include a fix in the next point
release of stretch?


Cheers

    Elrond
-------------- next part --------------
A non-text attachment was scrubbed...
Name: umountfs-fix-usr.diff
Type: text/x-diff
Size: 765 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20170813/8dd8f5c6/attachment.diff>


More information about the Pkg-sysvinit-devel mailing list