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
This commit is contained in:
Akira TAGOH 2016-05-19 11:11:46 +09:00
parent 560506b3bb
commit 9ab7633f2f
1 changed files with 1 additions and 1 deletions

View File

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