From fb9fa554b76ad373dfa3b42d7c9606df2cb557f4 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Wed, 5 Aug 2015 16:21:20 +0545 Subject: sudo package code style Not much here - the code is really small. --- config/sudo/sudo.inc | 12 ++++++------ config/sudo/sudo.xml | 2 +- pkg_config.10.xml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/sudo/sudo.inc b/config/sudo/sudo.inc index ed0feb9c..ccbda309 100644 --- a/config/sudo/sudo.inc +++ b/config/sudo/sudo.inc @@ -30,7 +30,7 @@ require_once("config.inc"); global $pfs_version; -$pfs_version = substr(trim(file_get_contents("/etc/version")),0,3); +$pfs_version = substr(trim(file_get_contents("/etc/version")), 0, 3); switch ($pfs_version) { case "2.1": /* Hackish way to detect if someone manually did pkg_add rather than use pbi. */ @@ -38,7 +38,7 @@ switch ($pfs_version) { define('SUDO_BASE', '/usr/pbi/sudo-' . php_uname("m")); define('SUDO_LIBEXEC_DIR', '/usr/local/libexec/'); } else { - define('SUDO_BASE','/usr/local'); + define('SUDO_BASE', '/usr/local'); define('SUDO_LIBEXEC_DIR', '/usr/local/libexec/sudo'); } break; @@ -66,17 +66,17 @@ function sudo_install() { if (!is_array($config['installedpackages']['sudo']['config'][0]['row'])) { $config['installedpackages']['sudo']['config'][0]['row'] = array( 0 => array( - "username" => "user:root", + "username" => "user:root", "runas" => "user:root", "cmdlist" => "ALL" ), 1 => array( - "username" => "user:admin", + "username" => "user:admin", "runas" => "user:root", "cmdlist" => "ALL" ), 2 => array( - "username" => "group:admins", + "username" => "group:admins", "runas" => "user:root", "cmdlist" => "ALL" ) @@ -196,7 +196,7 @@ This also forces the user to give full paths to executables, which they should b */ function sudo_validate_commands(&$input_errors) { $idx = 0; - while(isset($_POST["cmdlist{$idx}"])) { + while (isset($_POST["cmdlist{$idx}"])) { $commands = $_POST["cmdlist" . $idx++]; if (strtoupper($commands) == "ALL") { continue; diff --git a/config/sudo/sudo.xml b/config/sudo/sudo.xml index e9b4dcbb..6124a641 100644 --- a/config/sudo/sudo.xml +++ b/config/sudo/sudo.xml @@ -42,7 +42,7 @@ Sudo Command Control None sudo - 0.2.6 + 0.2.7 Sudo - Shell Command Privilege Delegation Utility /usr/local/pkg/sudo.inc diff --git a/pkg_config.10.xml b/pkg_config.10.xml index eaf4b77a..d24bd8b8 100644 --- a/pkg_config.10.xml +++ b/pkg_config.10.xml @@ -1570,7 +1570,7 @@ https://doc.pfsense.org/index.php/Sudo_Package Security - 0.2.6 + 0.2.7 Beta 2.2 https://packages.pfsense.org/packages/config/sudo/sudo.xml -- cgit v1.2.3