aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-08-05 16:21:20 +0545
committerPhil Davis <phil.davis@inf.org>2015-08-05 16:21:20 +0545
commitdb927b55f1cbcfc2988e56a3e5fab42a752d919e (patch)
treed801aeb58dfdfd3312fe8c25c973fc4462872661 /config
parent37e90498c6c3fb56bfd28d50b8b85b12fc6fb4fb (diff)
downloadpfsense-packages-db927b55f1cbcfc2988e56a3e5fab42a752d919e.tar.gz
pfsense-packages-db927b55f1cbcfc2988e56a3e5fab42a752d919e.tar.bz2
pfsense-packages-db927b55f1cbcfc2988e56a3e5fab42a752d919e.zip
sudo package code style
Not much here - the code is really small.
Diffstat (limited to 'config')
-rw-r--r--config/sudo/sudo.inc12
-rw-r--r--config/sudo/sudo.xml2
2 files changed, 7 insertions, 7 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 @@
<description>Sudo Command Control</description>
<requirements>None</requirements>
<name>sudo</name>
- <version>0.2.6</version>
+ <version>0.2.7</version>
<title>Sudo - Shell Command Privilege Delegation Utility</title>
<include_file>/usr/local/pkg/sudo.inc</include_file>
<menu>