[Fontconfig-bugs] [Bug 95477] New: FcAtomicLock fails when SELinux denies link() syscall with EACCES
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed May 18 20:55:41 UTC 2016
https://bugs.freedesktop.org/show_bug.cgi?id=95477
Bug ID: 95477
Summary: FcAtomicLock fails when SELinux denies link() syscall
with EACCES
Product: fontconfig
Version: 2.11
Hardware: All
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: library
Assignee: fontconfig-bugs at lists.freedesktop.org
Reporter: rodger.combs at gmail.com
QA Contact: freedesktop at behdad.org
See also: #82358
This is an issue on Android M, which denies non-root users access to link().
Patch:
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
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/fontconfig-bugs/attachments/20160518/74f66a10/attachment.html>
More information about the Fontconfig-bugs
mailing list