[kernel] r15488 - dists/sid/linux-2.6/debian

Ben Hutchings benh at alioth.debian.org
Mon Apr 5 18:12:53 UTC 2010


Author: benh
Date: Mon Apr  5 18:12:44 2010
New Revision: 15488

Log:
linux-base: Do not use device labels including certain unsafe characters (Closes: #576537)

Modified:
   dists/sid/linux-2.6/debian/changelog
   dists/sid/linux-2.6/debian/linux-base.postinst

Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog	Mon Apr  5 17:42:31 2010	(r15487)
+++ dists/sid/linux-2.6/debian/changelog	Mon Apr  5 18:12:44 2010	(r15488)
@@ -16,6 +16,8 @@
       (Closes: #576442)
     - Where a device has both a UUID and a label, prefer to identify it by
       UUID, consistent with fresh installations
+    - Do not use device labels including certain unsafe characters
+      (Closes: #576537)
   * iwlwifi: Fix repeated warnings about tfds_in_queue (Closes: #574526)
   * eeepc-laptop: Disable CPU speed control on 701 and 702 since it can
     cause the system to hang (Closes: #559578)

Modified: dists/sid/linux-2.6/debian/linux-base.postinst
==============================================================================
--- dists/sid/linux-2.6/debian/linux-base.postinst	Mon Apr  5 17:42:31 2010	(r15487)
+++ dists/sid/linux-2.6/debian/linux-base.postinst	Mon Apr  5 18:12:44 2010	(r15488)
@@ -1230,12 +1230,15 @@
     }
 
     # Discard all labels and UUIDs(!) that are ambiguous.
+    # Discard all labels with 'unsafe' characters (escaped by blkid using
+    # backslashes) as they will not be usable in all configuration files.
     # Sort each device's IDs in reverse lexical order so that UUIDs are
     # preferred.
     for my $bdev (keys(%bdev_map)) {
 	@{$bdev_map{$bdev}->{ids}} =
 	    sort({$b cmp $a}
-		 grep({ $#{$id_map{$_}} == 0 } @{$bdev_map{$bdev}->{ids}}));
+		 grep({ @{$id_map{$_}} == 1 && $_ !~ /\\/ }
+		      @{$bdev_map{$bdev}->{ids}}));
     }
 
     # Add persistent aliases for CD/DVD/BD drives



More information about the Kernel-svn-changes mailing list