Author: fapeeler
Date: Tue May  1 18:20:22 2012
New Revision: 1332769

URL: http://svn.apache.org/viewvc?rev=1332769&view=rev
Log:
VCL-463

fixed an issue when dealing with windows and non-standalone user accounts.
The non-owner users in both the admin and login user groups, did not have 
passwords presented to them under current
reservations.


Modified:
    incubator/vcl/trunk/managementnode/lib/VCL/Module/OS.pm

Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/OS.pm
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/OS.pm?rev=1332769&r1=1332768&r2=1332769&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS.pm Tue May  1 18:20:22 
2012
@@ -1801,7 +1801,7 @@ sub get_file_contents {
 =cut
 
 sub execute {
-#return execute_new(@_);
+return execute_new(@_);
        my $self = shift;
        unless (ref($self) && $self->isa('VCL::Module')) {
                notify($ERRORS{'CRITICAL'}, 0, "subroutine can only be called 
as an object method");
@@ -2116,6 +2116,7 @@ sub manage_server_access {
        my $server_request_logingroupid = 
$self->data->get_server_request_logingroupid();
        my $user_login_id_owner         = $self->data->get_user_login_id();
        my $user_id_owner                          = $self->data->get_user_id();
+       my $image_os_type               = $self->data->get_image_os_type();
 
        # Build list of users.
        # If in admin group set admin flag
@@ -2194,13 +2195,11 @@ sub manage_server_access {
                                }
                        }
                        
-                       # IF standalone - generate password
-                       if($standalone) {
+                       $user_hash{$userid}{"passwd"} = 0;
+                       # Generate password if linux and standalone affiliation
+                       unless ($image_os_type =~ /linux/ && !$standalone) {
                                $user_hash{$userid}{"passwd"} = getpw();
                        }
-                       else {
-                               $user_hash{$userid}{"passwd"} = 0;
-                       }
                        
                        if 
(update_reservation_accounts($reservation_id,$userid,$user_hash{$userid}{passwd},"add"))
 {
                                notify($ERRORS{'OK'}, 0, "Inserted 
$reservation_id,$userid,$user_hash{$userid}{passwd} into reservationsaccounts 
table");


Reply via email to