mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
Make -1 mean "current group/user" so that some platform dependent calls
can be centralised. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1113 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
7ba93ebae2
commit
a3e7595ac1
4 changed files with 7 additions and 3 deletions
|
|
@ -157,6 +157,10 @@ int pa_make_secure_dir(const char* dir, mode_t m, uid_t uid, gid_t gid) {
|
|||
return -1;
|
||||
|
||||
#ifdef HAVE_CHOWN
|
||||
if (uid == (uid_t)-1)
|
||||
uid = getuid();
|
||||
if (gid == (gid_t)-1)
|
||||
gid = getgid();
|
||||
chown(dir, uid, gid);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue