freeswitch: Show user/group name in error message if change_user_group() fails.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
This commit is contained in:
Stefan Knoblich 2012-07-11 00:16:21 +02:00
parent edfbbb127c
commit aeb4b31063
1 changed files with 3 additions and 1 deletions

View File

@ -858,7 +858,9 @@ int main(int argc, char *argv[])
#ifndef WIN32
if (runas_user || runas_group) {
if (change_user_group(runas_user, runas_group) < 0) {
fprintf(stderr, "Failed to switch user / group\n");
fprintf(stderr, "Failed to switch user [%s] / group [%s]\n",
switch_strlen_zero(runas_user) ? "-" : runas_user,
switch_strlen_zero(runas_group) ? "-" : runas_group);
return 255;
}
}