26 lines
846 B
Diff
26 lines
846 B
Diff
From 3ccd774255b8215733e0bdfdf5a683da9dd10923 Mon Sep 17 00:00:00 2001
|
|
From: Panu Matilainen <pmatilai@redhat.com>
|
|
Date: Wed, 24 Sep 2014 10:31:51 +0300
|
|
Subject: [PATCH] Handle directory replaced with a symlink to one in verify
|
|
(RhBug:1101861)
|
|
|
|
- An unforced installation must not cause verification failures - we
|
|
permit directories to be replaced by directory symlinks during
|
|
install so we need to do the same in verify too.
|
|
|
|
--- a/lib/verify.c
|
|
+++ b/lib/verify.c
|
|
@@ -78,6 +78,12 @@ int rpmVerifyFile(const rpmts ts, const rpmfi fi,
|
|
return 1;
|
|
}
|
|
|
|
+ /* If we expected a directory but got a symlink to one, follow the link */
|
|
+ if (S_ISDIR(fmode) && S_ISLNK(sb.st_mode) && stat(fn, &sb) != 0) {
|
|
+ *res |= RPMVERIFY_LSTATFAIL;
|
|
+ return 1;
|
|
+ }
|
|
+
|
|
/*
|
|
* Not all attributes of non-regular files can be verified.
|
|
*/
|