[Asterisk-code-review] dahdiras: Only set plugin dahdi.so to pppd if we're running as root. (asterisk[master])
Jaco Kroon
asteriskteam at digium.com
Wed Mar 18 04:21:30 CDT 2020
Jaco Kroon has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/13947 )
Change subject: dahdiras: Only set plugin dahdi.so to pppd if we're running as root.
......................................................................
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
---
M apps/app_dahdiras.c
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/47/13947/1
diff --git a/apps/app_dahdiras.c b/apps/app_dahdiras.c
index dffa2a4..b5b1ae9 100644
--- a/apps/app_dahdiras.c
+++ b/apps/app_dahdiras.c
@@ -113,8 +113,10 @@
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 */
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13947
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I6d01ad0a10e9fea477876d0941c3f38aac357e91
Gerrit-Change-Number: 13947
Gerrit-PatchSet: 1
Gerrit-Owner: Jaco Kroon <jaco at uls.co.za>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200318/b6369f76/attachment.html>
More information about the asterisk-code-review
mailing list