[Asterisk-code-review] dahdiras: Only set plugin dahdi.so to pppd if we're running as root. (asterisk[13])
Kevin Harwell
asteriskteam at digium.com
Wed Mar 25 17:23:57 CDT 2020
Kevin Harwell has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/13995 )
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(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved; Approved for Submit
George Joseph: Looks good to me, but someone else must approve
diff --git a/apps/app_dahdiras.c b/apps/app_dahdiras.c
index 28cf6d1..87a7faf 100644
--- a/apps/app_dahdiras.c
+++ b/apps/app_dahdiras.c
@@ -120,8 +120,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/+/13995
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I6d01ad0a10e9fea477876d0941c3f38aac357e91
Gerrit-Change-Number: 13995
Gerrit-PatchSet: 2
Gerrit-Owner: Jaco Kroon <jaco at uls.co.za>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200325/e2f834b4/attachment.html>
More information about the asterisk-code-review
mailing list