summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkira TAGOH <akira@tagoh.org>2016-05-19 11:11:46 +0900
committerAkira TAGOH <akira@tagoh.org>2016-05-19 11:11:46 +0900
commit9ab7633f2f752203de75a902c5031b0cf4bbe548 (patch)
treee10821b74451ff343f4011bcc6e1995a46c498f8
parent560506b3bbf2f829d57bdaa17add99367d6dedba (diff)
Bug 95477 - FcAtomicLock fails when SELinux denies link() syscall with EACCES
This is an issue on Android M, which denies non-root users access to link(). Patch from Rodger Combs
-rw-r--r--src/fcatomic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fcatomic.c b/src/fcatomic.c
index 2ce419f..d12d324 100644
--- a/src/fcatomic.c
+++ b/src/fcatomic.c
@@ -131,7 +131,7 @@ FcAtomicLock (FcAtomic *atomic)
return FcFalse;
}
ret = link ((char *) atomic->tmp, (char *) atomic->lck);
- if (ret < 0 && (errno == EPERM || errno == ENOTSUP))
+ if (ret < 0 && (errno == EPERM || errno == ENOTSUP || errno == EACCES))
{
/* the filesystem where atomic->lck points to may not supports
* the hard link. so better try to fallback