Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Herbster0815:pihole
pi-hole-web
001_pi-hole-web_fix_php_sudo.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 001_pi-hole-web_fix_php_sudo.patch of Package pi-hole-web
diff -uNr AdminLTE-5.18.1.orig/login.php AdminLTE-5.18.1/login.php --- AdminLTE-5.18.1.orig/login.php 2023-01-19 08:44:34.057972374 +0100 +++ AdminLTE-5.18.1/login.php 2023-01-19 08:45:07.106711976 +0100 @@ -74,7 +74,7 @@ a new password (or explicitly disable the password by setting an empty password) using the command </p> - <pre>sudo pihole -a -p</pre> + <pre>sudo /usr/bin/pihole -a -p</pre> </div> </div> </div> diff -uNr AdminLTE-5.18.1.orig/scripts/pi-hole/php/debug.php AdminLTE-5.18.1/scripts/pi-hole/php/debug.php --- AdminLTE-5.18.1.orig/scripts/pi-hole/php/debug.php 2023-01-19 08:44:34.073972248 +0100 +++ AdminLTE-5.18.1/scripts/pi-hole/php/debug.php 2023-01-19 08:45:07.216711110 +0100 @@ -52,7 +52,7 @@ } // Execute "pihole" using Web option -$command = 'export TERM=dumb && sudo pihole -d -w'; +$command = 'export TERM=dumb && sudo /usr/bin/pihole -d -w'; // Add auto-upload option if (isset($_GET['upload'])) { diff -uNr AdminLTE-5.18.1.orig/scripts/pi-hole/php/func.php AdminLTE-5.18.1/scripts/pi-hole/php/func.php --- AdminLTE-5.18.1.orig/scripts/pi-hole/php/func.php 2023-01-19 08:44:34.074972240 +0100 +++ AdminLTE-5.18.1/scripts/pi-hole/php/func.php 2023-01-19 08:45:07.220711079 +0100 @@ -154,7 +154,7 @@ * * would execute command * - * sudo pihole -h + * sudo /usr/bin/pihole -h * * and returns output of that command as a string. * @@ -165,7 +165,7 @@ $escaped = escapeshellcmd($argument_string); $output = null; $return_status = -1; - $command = 'sudo pihole '.$escaped; + $command = 'sudo /usr/bin/pihole '.$escaped; exec($command, $output, $return_status); if ($return_status !== 0) { trigger_error("Executing {$command} failed.", E_USER_WARNING); diff -uNr AdminLTE-5.18.1.orig/scripts/pi-hole/php/gravity.sh.php AdminLTE-5.18.1/scripts/pi-hole/php/gravity.sh.php --- AdminLTE-5.18.1.orig/scripts/pi-hole/php/gravity.sh.php 2023-01-19 08:44:34.074972240 +0100 +++ AdminLTE-5.18.1/scripts/pi-hole/php/gravity.sh.php 2023-01-19 08:45:07.224711048 +0100 @@ -34,7 +34,7 @@ echo 'data: '.implode("\ndata: ", explode("\n", $datatext))."\n\n"; } -$proc = popen('sudo pihole -g', 'r'); +$proc = popen('sudo /usr/bin/pihole -g', 'r'); while (!feof($proc)) { echoEvent(fread($proc, 4096)); } diff -uNr AdminLTE-5.18.1.orig/scripts/pi-hole/php/queryads.php AdminLTE-5.18.1/scripts/pi-hole/php/queryads.php --- AdminLTE-5.18.1.orig/scripts/pi-hole/php/queryads.php 2023-01-19 08:44:34.075972232 +0100 +++ AdminLTE-5.18.1/scripts/pi-hole/php/queryads.php 2023-01-19 08:45:07.238710938 +0100 @@ -61,7 +61,7 @@ $options .= ' -all'; } -$proc = popen('sudo pihole -q '.$url.$options, 'r'); +$proc = popen('sudo /usr/bin/pihole -q '.$url.$options, 'r'); while (!feof($proc)) { echoEvent(fread($proc, 4096), $url); } diff -uNr AdminLTE-5.18.1.orig/scripts/pi-hole/php/savesettings.php AdminLTE-5.18.1/scripts/pi-hole/php/savesettings.php --- AdminLTE-5.18.1.orig/scripts/pi-hole/php/savesettings.php 2023-01-19 08:44:34.075972232 +0100 +++ AdminLTE-5.18.1/scripts/pi-hole/php/savesettings.php 2023-01-19 08:45:07.240710922 +0100 @@ -424,7 +424,7 @@ if (isset($_POST['webtheme'])) { global $available_themes; if (array_key_exists($_POST['webtheme'], $available_themes)) { - exec('sudo pihole -a theme '.$_POST['webtheme']); + exec('sudo /usr/bin/pihole -a theme '.$_POST['webtheme']); } } $success .= 'The webUI settings have been updated';
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor