Contents of /trunk/hal/patches/hal-0.5.12-storage-mount-fix.patch
Parent Directory | Revision Log
Revision 854 -
(show annotations)
(download)
Tue Jun 16 23:05:48 2009 UTC (15 years, 3 months ago) by niro
File size: 1619 byte(s)
Tue Jun 16 23:05:48 2009 UTC (15 years, 3 months ago) by niro
File size: 1619 byte(s)
fixes segfault on mount, see http://bugs.frugalware.org/task/3783
1 | From e4ac5deba9287ea6b66b7b9c1f4c4d2ee1cc69b4 Mon Sep 17 00:00:00 2001 |
2 | From: Simon Munton <simon-hal@munton.demon.co.uk> |
3 | Date: Sun, 24 May 2009 16:01:51 +0000 |
4 | Subject: fixed segfault in hal-storage-mount |
5 | |
6 | Fixed segfault in hal-storage-mount and don't lose fstype in |
7 | probe-volume. |
8 | --- |
9 | diff --git a/hald/linux/probing/probe-volume.c b/hald/linux/probing/probe-volume.c |
10 | index 882de88..13c775a 100644 |
11 | --- a/hald/linux/probing/probe-volume.c |
12 | +++ b/hald/linux/probing/probe-volume.c |
13 | @@ -97,7 +97,7 @@ set_blkid_values (LibHalChangeSet *cs, blkid_probe pr) |
14 | |
15 | if (blkid_probe_lookup_value(pr, "TYPE", &type, NULL)) |
16 | type = ""; |
17 | - if (libhal_changeset_set_property_string (cs, "volume.fstype", type)) |
18 | + if (!libhal_changeset_set_property_string (cs, "volume.fstype", type)) |
19 | libhal_changeset_set_property_string (cs, "volume.fstype", ""); |
20 | HAL_DEBUG(("volume.fstype = '%s'", type)); |
21 | |
22 | --- hal-0.5.11/tools/hal-storage-mount.c 2009-05-31 17:18:32.000000000 +0200 |
23 | +++ hal-0.5.11.new/tools/hal-storage-mount.c 2009-05-31 17:33:48.000000000 +0200 |
24 | @@ -719,7 +719,8 @@ |
25 | /* don't consider uid= on vfat, iso9660, hfs and udf change-uid for the purpose of policy |
26 | * (since these doesn't contain uid/gid bits) |
27 | */ |
28 | - if (strcmp (libhal_volume_get_fstype (volume), "vfat") != 0 && |
29 | + if (libhal_volume_get_fstype (volume) != NULL && |
30 | + strcmp (libhal_volume_get_fstype (volume), "vfat") != 0 && |
31 | strcmp (libhal_volume_get_fstype (volume), "iso9660") != 0 && |
32 | strcmp (libhal_volume_get_fstype (volume), "hfs") != 0 && |
33 | strcmp (libhal_volume_get_fstype (volume), "udf") != 0) { |