From: Jaco Kroon Date: Wed, 18 Mar 2020 09:21:21 +0000 (+0200) Subject: dahdiras: Only set plugin dahdi.so to pppd if we're running as root. X-Git-Tag: 13.33.0-rc1~41 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=96efd5246008c38e399bd7cad2c019b4eb6cac39;p=thirdparty%2Fasterisk.git dahdiras: Only set plugin dahdi.so to pppd if we're running as root. Users of this should set plugin dahdi.so in their options file. ASTERISK-16676 Change-Id: I6d01ad0a10e9fea477876d0941c3f38aac357e91 --- diff --git a/apps/app_dahdiras.c b/apps/app_dahdiras.c index 28cf6d19b1..87a7fafd34 100644 --- a/apps/app_dahdiras.c +++ b/apps/app_dahdiras.c @@ -120,8 +120,10 @@ static pid_t spawn_ras(struct ast_channel *chan, char *args) c = strsep(&stringp, ","); } - argv[argc++] = "plugin"; - argv[argc++] = "dahdi.so"; + if (geteuid() == 0) { + argv[argc++] = "plugin"; + argv[argc++] = "dahdi.so"; + } argv[argc++] = "stdin"; /* Finally launch PPP */