summaryrefslogtreecommitdiffstats
path: root/src/polypcore/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/polypcore/util.c')
-rw-r--r--src/polypcore/util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/polypcore/util.c b/src/polypcore/util.c
index 615ea881..191fa809 100644
--- a/src/polypcore/util.c
+++ b/src/polypcore/util.c
@@ -140,8 +140,12 @@ int pa_make_secure_dir(const char* dir) {
if (errno != EEXIST)
return -1;
+#ifdef HAVE_CHOWN
chown(dir, getuid(), getgid());
+#endif
+#ifdef HAVE_CHMOD
chmod(dir, 0700);
+#endif
#ifdef HAVE_LSTAT
if (lstat(dir, &st) < 0)