mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
use setreuid() instead of setuid()/seteuid() when dropping root
chdir to / on daemon startup (both are suggestions by alan cox) git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@267 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
e34c65d042
commit
4e5c44de30
2 changed files with 4 additions and 2 deletions
|
|
@ -43,8 +43,9 @@ void pa_drop_root(void) {
|
|||
|
||||
pa_log(__FILE__": dropping root rights.\n");
|
||||
|
||||
setuid(uid);
|
||||
seteuid(uid);
|
||||
setreuid(uid, uid);
|
||||
/* setuid(uid);
|
||||
seteuid(uid);*/
|
||||
}
|
||||
|
||||
#ifdef HAVE_SYS_CAPABILITY_H
|
||||
|
|
|
|||
|
|
@ -259,6 +259,7 @@ int main(int argc, char *argv[]) {
|
|||
close(1);
|
||||
}
|
||||
|
||||
chdir("/");
|
||||
|
||||
pa_log(__FILE__": sizeof(pa_usec_t) = %u\n", sizeof(pa_usec_t));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue