projects
/
profile
/
ivi
/
pulseaudio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7c5ed1
)
chown() and chmod() /tmp/.esd/ before checking if everything is ok with it
author
Lennart Poettering
<lennart@poettering.net>
Sat, 22 Apr 2006 14:31:47 +0000
(14:31 +0000)
committer
Lennart Poettering
<lennart@poettering.net>
Sat, 22 Apr 2006 14:31:47 +0000
(14:31 +0000)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@770
fefdeb5f
-60dc-0310-8127-
8f9354f1896f
src/polypcore/util.c
patch
|
blob
|
history
diff --git
a/src/polypcore/util.c
b/src/polypcore/util.c
index
b37a25a
..
8418a69
100644
(file)
--- a/
src/polypcore/util.c
+++ b/
src/polypcore/util.c
@@
-140,13
+140,16
@@
int pa_make_secure_dir(const char* dir) {
if (errno != EEXIST)
return -1;
+ chown(dir, getuid(), getgid());
+ chmod(dir, 0700);
+
#ifdef HAVE_LSTAT
if (lstat(dir, &st) < 0)
#else
if (stat(dir, &st) < 0)
#endif
goto fail;
-
+
#ifndef OS_IS_WIN32
if (!S_ISDIR(st.st_mode) || (st.st_uid != getuid()) || ((st.st_mode & 0777) != 0700))
goto fail;