[Fakeroot-commits] [SCM] fakeroot branch, upstream, updated. 08ed00124d8b6b445d3b91a9aa15eec638b02f05
Clint Adams
schizo at debian.org
Sun Nov 15 03:17:18 UTC 2009
The following commit has been merged in the upstream branch:
commit 422972a336f56a4eb2df87c79d690faefe703bcd
Author: Clint Adams <schizo at debian.org>
Date: Mon Oct 8 00:26:06 2007 +0000
Apply patch from Jan Kluka to avoid possibility of faked dropping into an endless loop with nonexistent save file.
git-archimport-id: fakeroot at packages.debian.org--fakeroot/fakeroot--main--0.0--patch-132
diff --git a/faked.c b/faked.c
index c289c8f..33763f9 100644
--- a/faked.c
+++ b/faked.c
@@ -468,7 +468,12 @@ int save_database(const uint32_t remote)
int r,fd=0;
struct stat s;
r=stat(save_file,&s);
- if (r<0 && errno != ENOENT) return EOF;
+ if (r<0) {
+ if (errno == ENOENT)
+ break;
+ else
+ return EOF;
+ }
if (!(s.st_mode&S_IFIFO)) break;
fd=open(save_file,O_WRONLY|O_NONBLOCK);
if (fd<0) {
--
fakeroot
More information about the Fakeroot-commits
mailing list