summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Isorce <julien.isorce@gmail.com>2015-10-10 20:11:21 +0100
committerArun Raghavan <git@arunraghavan.net>2015-10-19 08:53:40 +0530
commitc021bfc6e06035d6b913cc6a05df1ee7ee2588f2 (patch)
tree941d986c2dc0adeb6b4b89f0e7c08f176c701f33
parent336a2cc6f05bb6b2ea35aab9172445b0830c553a (diff)
core-util: avoid calling fchmod if already right mode
fchmod is denied in chromium sandbox.
-rw-r--r--src/pulsecore/core-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index 278ad63cf..20996860f 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -343,7 +343,7 @@ again:
#endif
#ifdef HAVE_FCHMOD
- if (fchmod(fd, m) < 0) {
+ if ((st.st_mode & 07777) != m && fchmod(fd, m) < 0) {
pa_assert_se(pa_close(fd) >= 0);
goto fail;
};