mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-16 03:42:09 +00:00
fix restart + -u issue FSCORE-199
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9892 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
e4dfe9ffd4
commit
c07d3c5eb3
@ -564,6 +564,11 @@ SWITCH_DECLARE(int32_t) change_user_group(const char *user, const char *group)
|
|||||||
runas_gid = gr->gr_gid;
|
runas_gid = gr->gr_gid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (runas_uid && getuid() == runas_uid && (!runas_gid || runas_gid == getgid())) {
|
||||||
|
/* already running as the right user and group, nothing to do! */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (runas_uid) {
|
if (runas_uid) {
|
||||||
#ifdef HAVE_SETGROUPS
|
#ifdef HAVE_SETGROUPS
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user