From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Brewer To: development@lists.ipfire.org Subject: Re: Peeking at unbound statistics from WUI Date: Sat, 19 Jan 2019 10:44:03 +0000 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4529385733989354113==" List-Id: --===============4529385733989354113== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Michael Tremer wrote: >> Can someone point me in the right direction for peeking unbound >> statistics from perl/cgi scripts? I=E2=80=99ve tried sudo-ing (I=E2=80=99d= rather not, >> for security reasons), separate bash scripts and qx/backticks, they all >> seem to fail with exit code 256 which seems to be a permission problem. >> Running anything from an SSH session obviously succeeds, because then I >> have all the rights I need. >=20 > Depending how fit you are with C, you can build such a =E2=80=9Csetuid bina= ry=E2=80=9D > yourself. There is plenty of inspiration here: >=20 I had the same problem when porting the IPCop Banish addon to IPFire because = the setuid binary program that was bundled with the original Banish addon=20 did not run on a lot of the hardware I was using for testing.=20 As a workaround I added my update command to /etc/sudoers as nobody ALL=3DNOPASSWD: /your/command/here so it can be run from the cgi with sudo.=20 I suspect that this has security implications so use at your own risk. > https://git.ipfire.org/?p=3Dipfire-2.x.git;a=3Dtree;f=3Dsrc/misc-progs;h=3D= a1a3f2c9ca75d8077a6f3d122b7a5e7ffaa71432;hb=3DHEAD >=20 > But since you have said that you are not a developer, this might be a > little bit hard :) Let me know where I can help out. >=20 Thank you for the links Michael this should be the way I should go with=20 Banish. I'll see if get something compiled for my prog. HTH Rob --===============4529385733989354113==--