Resolves: #1048548 - fix problem with bad UUID error message

This commit is contained in:
Josef Ridky 2016-07-29 09:50:48 +02:00
parent 232d6b2379
commit 1a554f14e4
2 changed files with 46 additions and 0 deletions

43
dump-baduuid.patch Normal file
View File

@ -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é

View File

@ -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 <jridky@redhat.com> - 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 <releng@fedoraproject.org> - 1:0.4-0.27.b44
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild