[PATCH 1/2] pa_make_secure_dir: avoid calling fchmod if already right mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



fchmod is denied in chromium sandbox.
---
 src/pulsecore/core-util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index 278ad63..f694347 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 & 0x0FFF) != m && fchmod(fd, m) < 0) {
         pa_assert_se(pa_close(fd) >= 0);
         goto fail;
     };
-- 
1.9.1



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux