You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by ju...@apache.org on 2019/03/21 20:30:26 UTC
[vcl] 03/04: use shorter name for database field as it was causing
issue with managementnode code
This is an automated email from the ASF dual-hosted git repository.
junaid pushed a commit to branch VCL-1116_use_database_hostnames_for_ad_joined_computers
in repository https://gitbox.apache.org/repos/asf/vcl.git
commit 5d84193dfafacb6f68fd65505e7defc6fab9b000
Author: Junaid Ali <ju...@apache.org>
AuthorDate: Thu Mar 21 13:30:54 2019 -0500
use shorter name for database field as it was causing issue with managementnode code
---
managementnode/lib/VCL/DataStructure.pm | 2 +-
managementnode/lib/VCL/Module/OS/Windows.pm | 6 +++---
web/.ht-inc/addomain.php | 4 ++--
web/.ht-inc/utils.php | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/managementnode/lib/VCL/DataStructure.pm b/managementnode/lib/VCL/DataStructure.pm
index 0068546..6ab5421 100644
--- a/managementnode/lib/VCL/DataStructure.pm
+++ b/managementnode/lib/VCL/DataStructure.pm
@@ -404,7 +404,7 @@ $SUBROUTINE_MAPPINGS{image_domain_owner_id} = '$self->request_data->{reservation
#$SUBROUTINE_MAPPINGS{image_domain_password} = '$self->request_data->{reservation}{RESERVATION_ID}{image}{imagedomain}{password}'; # Explicit subroutine
$SUBROUTINE_MAPPINGS{image_domain_secret_id} = '$self->request_data->{reservation}{RESERVATION_ID}{image}{imagedomain}{secretid}';
$SUBROUTINE_MAPPINGS{image_domain_username} = '$self->request_data->{reservation}{RESERVATION_ID}{image}{imagedomain}{username}';
-$SUBROUTINE_MAPPINGS{image_domain_usedatabasehostnamesforcomputerobjects} = '$self->request_data->{reservation}{RESERVATION_ID}{image}{imagedomain}{usedatabasehostnamesforcomputerobjects}';
+$SUBROUTINE_MAPPINGS{image_domain_usedbhostname} = '$self->request_data->{reservation}{RESERVATION_ID}{image}{imagedomain}{usedbhostname}';
$SUBROUTINE_MAPPINGS{image_domain_base_ou} = '$self->request_data->{reservation}{RESERVATION_ID}{image}{imagedomain}{imageaddomain}{baseOU}';
$SUBROUTINE_MAPPINGS{image_domain_cryptsecret} = '$self->request_data->{reservation}{RESERVATION_ID}{image}{imagedomain}{cryptsecret}{cryptsecret}';
diff --git a/managementnode/lib/VCL/Module/OS/Windows.pm b/managementnode/lib/VCL/Module/OS/Windows.pm
index 5451d4a..16118a0 100644
--- a/managementnode/lib/VCL/Module/OS/Windows.pm
+++ b/managementnode/lib/VCL/Module/OS/Windows.pm
@@ -3929,8 +3929,8 @@ sub reboot {
}
# Set sshd service startup mode to auto
- if (!$self->set_service_startup_mode('sshd', 'auto')) {
- notify($ERRORS{'WARNING'}, 0, "reboot not attempted, unable to set sshd service startup mode to auto");
+ if (!$self->set_service_startup_mode('sshd', 'manual')) {
+ notify($ERRORS{'WARNING'}, 0, "reboot not attempted, unable to set sshd service startup mode to manual");
return 0;
}
@@ -12731,7 +12731,7 @@ sub set_computer_hostname {
return;
}
- my $use_database_hostnames = $self->data->image_domain_usedatabasehostnamesforcomputerobjects();
+ my $use_database_hostnames = $self->data->get_image_domain_usedbhostname();
my $database_computer_hostname = $self->data->get_computer_hostname();
my $system32_path = $self->get_system32_path() || return;
diff --git a/web/.ht-inc/addomain.php b/web/.ht-inc/addomain.php
index 997362c..c4fba74 100644
--- a/web/.ht-inc/addomain.php
+++ b/web/.ht-inc/addomain.php
@@ -244,7 +244,7 @@ class ADdomain extends Resource {
$updates[] = "dnsServers = '{$data['dnsservers']}'";
# useDatabaseHostnamesForComputerObjects
if($data['useDatabaseHostnamesForComputerObjects'] != $olddata['useDatabaseHostnamesForComputerObjects'])
- $updates[] = "useDatabaseHostnamesForComputerObjects = {$data['useDatabaseHostnamesForComputerObjects']}";
+ $updates[] = "usedbhostname = {$data['useDatabaseHostnamesForComputerObjects']}";
if(count($updates)) {
$query = "UPDATE addomain SET "
. implode(', ', $updates)
@@ -350,7 +350,7 @@ class ADdomain extends Resource {
. "password, "
. "secretid, "
. "dnsServers, "
- . "useDatabaseHostnamesForComputerObjects) "
+ . "usedbhostname) "
. "VALUES ('{$data['name']}', "
. "$ownerid, "
. "'{$data['domaindnsname']}', "
diff --git a/web/.ht-inc/utils.php b/web/.ht-inc/utils.php
index c81f7bf..1550297 100644
--- a/web/.ht-inc/utils.php
+++ b/web/.ht-inc/utils.php
@@ -9504,7 +9504,7 @@ function getADdomains($addomainid=0) {
. "ad.username, "
. "ad.dnsServers AS dnsservers, "
. "ad.secretid, "
- . "ad.useDatabaseHostnamesForComputerObjects AS useDatabaseHostnamesForComputerObjects "
+ . "ad.usedbhostname AS useDatabaseHostnamesForComputerObjects "
. "FROM addomain ad, "
. "affiliation a, "
. "user u, "