summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/core-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsecore/core-util.c')
-rw-r--r--src/pulsecore/core-util.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index b5043a38..13d0bb5e 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -259,11 +259,12 @@ int pa_make_secure_dir(const char* dir, mode_t m, uid_t uid, gid_t gid) {
}
#ifdef HAVE_FCHOWN
- if (uid == (uid_t)-1)
+ if (uid == (uid_t) -1)
uid = getuid();
- if (gid == (gid_t)-1)
+ if (gid == (gid_t) -1)
gid = getgid();
- (void) fchown(fd, uid, gid);
+ if (fchown(fd, uid, gid) < 0)
+ goto fail;
#endif
#ifdef HAVE_FCHMOD