diff options
author | Simon Munton <simon-hal@munton.demon.co.uk> | 2009-05-24 18:01:51 +0200 |
---|---|---|
committer | Danny Kukawka <danny.kukawka@web.de> | 2009-05-24 18:04:49 +0200 |
commit | 369affe38b0d6ebe9932d11e7f59a747c7155b79 (patch) | |
tree | 97fe2a3a6db500ae401949aa323921859d60ef9b | |
parent | edc3228180711a526286009d1d80a90c1e7931d8 (diff) |
fixed segfault in hal-storage-mounthal-0_5_12-branch
Fixed segfault in hal-storage-mount and don't lose fstype in
probe-volume.
-rw-r--r-- | hald/linux/probing/probe-volume.c | 2 | ||||
-rw-r--r-- | tools/hal-storage-mount.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/hald/linux/probing/probe-volume.c b/hald/linux/probing/probe-volume.c index 882de885..13c775aa 100644 --- a/hald/linux/probing/probe-volume.c +++ b/hald/linux/probing/probe-volume.c @@ -97,7 +97,7 @@ set_blkid_values (LibHalChangeSet *cs, blkid_probe pr) if (blkid_probe_lookup_value(pr, "TYPE", &type, NULL)) type = ""; - if (libhal_changeset_set_property_string (cs, "volume.fstype", type)) + if (!libhal_changeset_set_property_string (cs, "volume.fstype", type)) libhal_changeset_set_property_string (cs, "volume.fstype", ""); HAL_DEBUG(("volume.fstype = '%s'", type)); diff --git a/tools/hal-storage-mount.c b/tools/hal-storage-mount.c index e48b4b9e..78e01603 100644 --- a/tools/hal-storage-mount.c +++ b/tools/hal-storage-mount.c @@ -786,7 +786,8 @@ handle_mount (LibHalContext *hal_ctx, /* don't consider uid= on vfat, iso9660, hfs and udf change-uid for the purpose of policy * (since these doesn't contain uid/gid bits) */ - if (strcmp (libhal_volume_get_fstype (volume), "vfat") != 0 && + if (libhal_volume_get_fstype (volume) != NULL && + strcmp (libhal_volume_get_fstype (volume), "vfat") != 0 && strcmp (libhal_volume_get_fstype (volume), "ntfs") != 0 && strcmp (libhal_volume_get_fstype (volume), "ntfs-3g") != 0 && strcmp (libhal_volume_get_fstype (volume), "iso9660") != 0 && |