From 9ab7633f2f752203de75a902c5031b0cf4bbe548 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 19 May 2016 11:11:46 +0900 Subject: [PATCH] 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 --- src/fcatomic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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