aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-08-05 16:21:20 +0545
committerRenato Botelho <renato@netgate.com>2015-08-05 14:09:45 -0300
commitfb9fa554b76ad373dfa3b42d7c9606df2cb557f4 (patch)
tree232587c64368242557aa851ee8e83162cc5b29dd /config
parent2dd48285852125cffce5aa20ec7a4969f2751f3b (diff)
downloadpfsense-packages-fb9fa554b76ad373dfa3b42d7c9606df2cb557f4.tar.gz
pfsense-packages-fb9fa554b76ad373dfa3b42d7c9606df2cb557f4.tar.bz2
pfsense-packages-fb9fa554b76ad373dfa3b42d7c9606df2cb557f4.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>