From aeb4b31063e5378dbd41061b488f0daa8f8fb190 Mon Sep 17 00:00:00 2001 From: Stefan Knoblich Date: Wed, 11 Jul 2012 00:16:21 +0200 Subject: [PATCH] freeswitch: Show user/group name in error message if change_user_group() fails. Signed-off-by: Stefan Knoblich --- src/switch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/switch.c b/src/switch.c index fc076fe709..93ae47cfd5 100644 --- a/src/switch.c +++ b/src/switch.c @@ -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; } }