summaryrefslogtreecommitdiffstats
path: root/fix_devt.patch
diff options
context:
space:
mode:
authorBenjamin Marzinski <bmarzins@fedoraproject.org>2008-08-20 21:48:41 +0000
committerBenjamin Marzinski <bmarzins@fedoraproject.org>2008-08-20 21:48:41 +0000
commit4fa3700b25f28485679b1caf4a9ff46adbfb8602 (patch)
tree7281ada6cdfe4a9bd6e849724110ae0f2f0d44c8 /fix_devt.patch
parent4b4f4537f2a13f1db49ededb48a0797e2f1cd255 (diff)
Updated to latest upstream 0.4.8 code: multipath-tools-080804.tgz (gitdevice-mapper-multipath-0_4_8-6_fc10
commit id: eb87cbd0df8adf61d1c74c025f7326d833350f78) fixed 451817, 456397 (scsi_id_change.patch), 457530 (config_space_fix.patch) 457589 (static_libaio.patch)
Diffstat (limited to 'fix_devt.patch')
-rw-r--r--fix_devt.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/fix_devt.patch b/fix_devt.patch
new file mode 100644
index 0000000..26239a2
--- /dev/null
+++ b/fix_devt.patch
@@ -0,0 +1,25 @@
+Index: multipath-tools/libmultipath/discovery.c
+===================================================================
+--- multipath-tools.orig/libmultipath/discovery.c
++++ multipath-tools/libmultipath/discovery.c
+@@ -252,7 +252,11 @@ devt2devname (char *devname, char *devt)
+ continue;
+
+ if ((major == tmpmaj) && (minor == tmpmin)) {
+- sprintf(block_path, "/sys/block/%s", dev);
++ if (snprintf(block_path, FILE_NAME_SIZE, "/sys/block/%s", dev) >= FILE_NAME_SIZE) {
++ condlog(0, "device name %s is too long\n", dev);
++ fclose(fd);
++ return 1;
++ }
+ break;
+ }
+ }
+@@ -270,6 +274,7 @@ devt2devname (char *devname, char *devt)
+ condlog(0, "sysfs entry %s is not a directory\n", block_path);
+ return 1;
+ }
++ basename(block_path, devname);
+ return 0;
+ }
+