Bug#1008910: mount-functions: Only allows for LABEL/UUID

2022-04-04 Thread Mark Hindley
Control: tags -1 patch

Thanks,

On Mon, Apr 04, 2022 at 12:48:07AM +0200, Thorsten Glaser wrote:
> On Sun, 3 Apr 2022, Elliott Mitchell wrote:
> 
> > Perhaps the test should be: "[A-Z][A-Z]*[A-Z][A-Z]=*"?
> 
> No, that’s a shellglob, no BRE.
> 
> I think it’s best here to update the list with whatever findfs(8)
> comes up when it does come up; anything else would require either
> ksh extglobs or really excessive parsing attempts few would want
> to maintain.

How the attached patch this seem?

I will look at  #677420/#724959

Mark
>From f2bb3c4db3b4b336f8bd74356ad13f2a24918f10 Mon Sep 17 00:00:00 2001
From: Mark Hindley 
Date: Mon, 4 Apr 2022 10:08:38 +0100
Subject: [PATCH] mount-functions.sh: add PARTUUID and PARTLABEL support.

Closes: #1008910
---
 debian/src/initscripts/lib/init/mount-functions.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/debian/src/initscripts/lib/init/mount-functions.sh b/debian/src/initscripts/lib/init/mount-functions.sh
index 709323af..454006f0 100644
--- a/debian/src/initscripts/lib/init/mount-functions.sh
+++ b/debian/src/initscripts/lib/init/mount-functions.sh
@@ -32,8 +32,8 @@ selinux_enabled () {
 }
 
 # Read /etc/fstab, looking for:
-# 1) The root filesystem, resolving LABEL=*|UUID=* entries to the
-#	device node,
+# 1) The root filesystem, resolving LABEL=*|UUID=*|PARTUUID=*|PARTLABEL=* entries
+#	to the device node,
 # 2) Swap that is on a md device or a file that may be on a md
 #	device,
 _read_fstab () {
@@ -58,7 +58,7 @@ _read_fstab () {
 	;;
   /dev/*)
 	;;
-  LABEL=*|UUID=*)
+  LABEL=*|UUID=*|PARTUUID=*|PARTLABEL=*)
 	if [ "$MTPT" = "/" ] && [ -x /sbin/findfs ]
 	then
 		DEV="$(findfs "$DEV")"
-- 
2.35.1



Bug#1008910: mount-functions: Only allows for LABEL/UUID

2022-04-03 Thread Elliott Mitchell
found 1008910 3.02-1
found 1008910 2.96-7+deb11u1
found 1008910 2.93-8
quit

On Mon, Apr 04, 2022 at 12:48:07AM +0200, Thorsten Glaser wrote:
> On Sun, 3 Apr 2022, Elliott Mitchell wrote:
> 
> > Perhaps the test should be: "[A-Z][A-Z]*[A-Z][A-Z]=*"?
> 
> No, that???s a shellglob, no BRE.

Indeed.  That was the strictest pattern I could come up with likely to
match new additions and exclude other things.  All other matches start
with "/" so nominally "[A-Z]*" would be enough by itself.

> I think it???s best here to update the list with whatever findfs(8)
> comes up when it does come up; anything else would require either
> ksh extglobs or really excessive parsing attempts few would want
> to maintain.
> 
> -  LABEL=*|UUID=*)
> +  LABEL=*|UUID=*|PARTUUID=*|PARTLABEL=*)

Not my decision to make, I simply narrowed down the issue and stated it
was a problem.


-- 
(\___(\___(\__  --=> 8-) EHM <=--  __/)___/)___/)
 \BS (| ehem+sig...@m5p.com  PGP 87145445 |)   /
  \_CS\   |  _  -O #include  O-   _  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445



Bug#1008910: mount-functions: Only allows for LABEL/UUID

2022-04-03 Thread Thorsten Glaser
On Sun, 3 Apr 2022, Elliott Mitchell wrote:

> Perhaps the test should be: "[A-Z][A-Z]*[A-Z][A-Z]=*"?

No, that’s a shellglob, no BRE.

I think it’s best here to update the list with whatever findfs(8)
comes up when it does come up; anything else would require either
ksh extglobs or really excessive parsing attempts few would want
to maintain.

-  LABEL=*|UUID=*)
+  LABEL=*|UUID=*|PARTUUID=*|PARTLABEL=*)

bye,
//mirabilos (developer of a shell, so I’d know)
-- 
Infrastrukturexperte • tarent solutions GmbH
Am Dickobskreuz 10, D-53121 Bonn • http://www.tarent.de/
Telephon +49 228 54881-393 • Fax: +49 228 54881-235
HRB AG Bonn 5168 • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg


/⁀\ The UTF-8 Ribbon
╲ ╱ Campaign against  Mit dem tarent-Newsletter nichts mehr verpassen:
 ╳  HTML eMail! Also, https://www.tarent.de/newsletter
╱ ╲ header encryption!




Bug#1008910: mount-functions: Only allows for LABEL/UUID

2022-04-03 Thread Elliott Mitchell
Package: initscripts
Version: 3.01-1

This is *almost* #677420, but not quite.

The test in /lib/init/mount-functions.sh, _read_fstab() tests for
"LABEL=*|UUID=*" before resorting to `findfs`.  Thing is `findfs` has
two other cases it can handle and that test misses those two.

Perhaps the test should be: "[A-Z][A-Z]*[A-Z][A-Z]=*"?

That matches the two currently supported extra cases and would hopefully
catch further additions to what `findfs` can handle.


-- 
(\___(\___(\__  --=> 8-) EHM <=--  __/)___/)___/)
 \BS (| ehem+sig...@m5p.com  PGP 87145445 |)   /
  \_CS\   |  _  -O #include  O-   _  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445