[2019-02-19 04:46] Pierre Ynard <linkfa...@yahoo.fr>
>
> part       text/plain                 571
> > Probably we could just pass -F option to grep?
>
> grep -F would seem a lot safer in many places, yes.

Okay, collegues, what do you think about this patch? It solves problem
at hand, but would introduce another false-positive, if mount options
can look like absolute file path. Can they?

From 16e9c7ba09032523c209aab79b3e3f774ce49a9b Mon Sep 17 00:00:00 2001
From: Dmitry Bogatov <kact...@debian.org>
Date: Fri, 5 Apr 2019 19:18:06 +0000
Subject: [PATCH] Correctly quote arguments to grep in umountfs script (Closes:
 #575204)

---
 debian/src/initscripts/etc/init.d/umountfs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/src/initscripts/etc/init.d/umountfs 
b/debian/src/initscripts/etc/init.d/umountfs
index b75095ee..633a3f6d 100755
--- a/debian/src/initscripts/etc/init.d/umountfs
+++ b/debian/src/initscripts/etc/init.d/umountfs
@@ -23,7 +23,7 @@ do_stop () {
        TMPFS_MTPTS=""
        while read -r DEV MTPT FSTYPE REST
        do
-               echo "$PROTECTED_MOUNTS" | grep -qs "^$DEV $MTPT " && continue
+               echo "$PROTECTED_MOUNTS" | grep -qsF "$DEV $MTPT " && continue
                case "$MTPT" in
                  
/|/usr|/proc|/dev|/.dev|/dev/pts|/dev/shm|/dev/.static/dev|/proc/*|/sys|/sys/*|/run|/run/lock|/run/shm|/run/rpc_pipefs|/dev/vcs)
                        continue
-- 
        Note, that I send and fetch email in batch, once every 24 hours.
                 If matter is urgent, try https://t.me/kaction
                                                                             --

Reply via email to