From 1a554f14e46c8e76fee6f9da1cca619799ea3265 Mon Sep 17 00:00:00 2001 From: Josef Ridky Date: Fri, 29 Jul 2016 09:50:48 +0200 Subject: [PATCH] Resolves: #1048548 - fix problem with bad UUID error message --- dump-baduuid.patch | 43 +++++++++++++++++++++++++++++++++++++++++++ dump.spec | 3 +++ 2 files changed, 46 insertions(+) create mode 100644 dump-baduuid.patch diff --git a/dump-baduuid.patch b/dump-baduuid.patch new file mode 100644 index 0000000..fd7be74 --- /dev/null +++ b/dump-baduuid.patch @@ -0,0 +1,43 @@ +diff -urNp orig-dump-0.4b45/dump/optr.c new-dump-0.4b45/dump/optr.c +--- orig-dump-0.4b45/dump/optr.c 2016-05-09 07:38:01.000000000 +0200 ++++ new-dump-0.4b45/dump/optr.c 2016-07-29 09:15:03.139871167 +0200 +@@ -431,6 +431,21 @@ allocfsent(struct mntent *fs) + struct stat buf, tabbuf; + struct pfstab *tabpf; + struct mntent *tabfs; ++ char **type; ++ int handle, len; ++ ++ /* Discard fstypes we don't handle */ ++ if (fs->mnt_type == NULL) ++ return NULL; ++ ++ len = strlen(fs->mnt_type); ++ ++ for (type = fstypes, handle = 0; *type != NULL && handle == 0; type++){ ++ handle = (strncmp(fs->mnt_type, *type, len) == 0); ++ } ++ ++ if (!handle) ++ return NULL; + + new = (struct mntent *)malloc(sizeof (*fs)); + if (new == NULL) +@@ -701,9 +716,15 @@ lastdump(char arg) /* w ==> just what to + for (pf = table; pf != NULL; pf = pf->pf_next) { + struct mntent *dt = pf->pf_mntent; + char **type; ++ int len; ++ ++ if (dt->mnt_type == NULL) ++ continue; ++ ++ len = strlen(dt->mnt_type); + + for (type = fstypes; *type != NULL; type++) { +- if (strcmp(dt->mnt_type, *type) == 0) { ++ if (strncmp(dt->mnt_type, *type, len) == 0) { + const char *disk = get_device_name(dt->mnt_fsname); + print_wmsg(arg, dt->mnt_freq > 0, + disk ? disk : dt->mnt_fsname, +Binární soubory orig-dump-0.4b45/dump/.optr.c.swp a new-dump-0.4b45/dump/.optr.c.swp jsou rozdílné diff --git a/dump.spec b/dump.spec index fb5b801..e2f51a9 100644 --- a/dump.spec +++ b/dump.spec @@ -25,6 +25,7 @@ Provides: dump-static Patch0: dump-buildfix.patch Patch1: dump-remove-lzo.patch +Patch2: dump-baduuid.patch %description The dump package contains both dump and restore. Dump examines files @@ -43,6 +44,7 @@ restoring filesystems after backups. %patch0 -p1 -b .buildfix %patch1 -p1 -b .remove-lzo +%patch2 -p1 -b .baduuid for i in MAINTAINERS COPYING ChangeLog; do iconv -f iso-8859-1 -t utf-8 $i -o $i.new @@ -111,6 +113,7 @@ rm -rf %{buildroot} %changelog * Fri Jul 29 2016 Josef Ridky - 1:0.4-0.1.b45 - New upstream release 0.4b45 (#1361495) +- Fix issue with bad UUID error message (#1048548) * Wed Feb 03 2016 Fedora Release Engineering - 1:0.4-0.27.b44 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild