smeserver-phpvirtualbox/smeserver-phpvirtualbox-5.2.1-remove_vbox_passwd.patch

50 lines
2.0 KiB
Diff
Raw Permalink Normal View History

diff -urN smeserver-phpvirtualbox-5.2.1.old/root/etc/e-smith/db/accounts/defaults/phpvirtualbox/type smeserver-phpvirtualbox-5.2.1/root/etc/e-smith/db/accounts/defaults/phpvirtualbox/type
--- smeserver-phpvirtualbox-5.2.1.old/root/etc/e-smith/db/accounts/defaults/phpvirtualbox/type 2022-10-20 12:29:51.000000000 +1100
+++ smeserver-phpvirtualbox-5.2.1/root/etc/e-smith/db/accounts/defaults/phpvirtualbox/type 2015-08-08 21:37:59.000000000 +1000
@@ -1 +1 @@
-url
+reserved
diff -urN smeserver-phpvirtualbox-5.2.1.old/root/etc/e-smith/templates/opt/phpvirtualbox/config.php/config.php smeserver-phpvirtualbox-5.2.1/root/etc/e-smith/templates/opt/phpvirtualbox/config.php/config.php
--- smeserver-phpvirtualbox-5.2.1.old/root/etc/e-smith/templates/opt/phpvirtualbox/config.php/config.php 2022-10-20 12:29:51.000000000 +1100
+++ smeserver-phpvirtualbox-5.2.1/root/etc/e-smith/templates/opt/phpvirtualbox/config.php/config.php 2022-10-20 15:29:49.978343497 +1100
@@ -1,13 +1,9 @@
{
- use esmith::AccountsDB;
- my $adb = esmith::AccountsDB->open_ro or die "Couldn't open Accounst DB\n";
- my $passwd = do{local(@ARGV,$/)="/home/vbox/.virtualbox/vbox.passwd";<>} or die "vbox credentials NOT found\n";
$OUT .=<<_PARMS;
class phpVBoxConfig {
var \$username = 'vbox';
-var \$password = '$passwd';
var \$location = 'http://127.0.0.1:18083/';
var \$language = 'en';
var \$vrdeports = '9000-9100';
@@ -20,10 +16,12 @@
var \$nicMax = 4;
_PARMS
- my $authtype = $phpvirtualbox{'authtype'};
+ my $authtype = $phpvirtualbox{'authtype'} || 'disabled';
if ($authtype eq 'webauth') {
$OUT .= "var \$authLib = 'WebAuth';\n";
$OUT .= "var \$authConfig = array('adminUser' => 'admin');\n";
+ } elsif ($authtype eq 'Builtin') {
+ $OUT .= "var \$authLib = 'Builtin';\n";
} elsif ($authtype eq 'LDAP') {
$OUT .= "var \$authLib = 'LDAP';\n";
$OUT .= "var \$authConfig = array(\n";
@@ -34,10 +32,7 @@
$OUT .= "var \$noAuth=true;\n";
}
- $OUT .=<<_EOF;
-}
-
-_EOF
+ $OUT .= "}\n";
}