Author: jfthomps
Date: Fri May 18 00:53:28 2012
New Revision: 1339939

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



Modified:
    incubator/vcl/trunk/managementnode/lib/VCL/Module/OS.pm
    incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm
    incubator/vcl/trunk/managementnode/lib/VCL/utils.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=1339939&r1=1339938&r2=1339939&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS.pm Fri May 18 00:53:28 
2012
@@ -2297,8 +2297,8 @@ sub manage_server_access {
                }
                my $standalone = 0;
                if(!$self->user_exists($user_hash{$userid}{username})){
-         delete($res_accounts{$userid});
-      }
+                       delete($res_accounts{$userid});
+               }
                if(!exists($res_accounts{$userid})){
                        # check affiliation
                        notify($ERRORS{'DEBUG'}, 0, "checking affiliation for 
$userid");

Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm?rev=1339939&r1=1339938&r2=1339939&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm Fri May 18 
00:53:28 2012
@@ -3902,7 +3902,7 @@ sub get_firewall_configuration {
                        }
                        
                        my $services_cmd = "cat /etc/services";
-                       my ($services_status, $service_output) = 
$self->execute($services_cmd);
+                       my ($services_status, $service_output) = 
$self->execute($services_cmd,0);
                        if (!defined($service_output)) {
                notify($ERRORS{'DEBUG'}, 0, "failed to get /etc/services");
                }
@@ -4401,17 +4401,17 @@ sub user_exists {
                 $username = $self->data->get_user_login_id();
         }
 
-                 notify($ERRORS{'DEBUG'}, 0, "checking if user $username 
exists on $computer_node_name");
+       notify($ERRORS{'DEBUG'}, 0, "checking if user $username exists on 
$computer_node_name");
 
         # Attempt to query the user account
         my $query_user_command = "id $username";
         my ($query_user_exit_status, $query_user_output) = 
$self->execute($query_user_command,1);
                        
-               if (grep(/uid/, $query_user_output)) {
+       if (grep(/uid/, @$query_user_output)) {
                notify($ERRORS{'DEBUG'}, 0, "user $username exists on 
$computer_node_name");
                return 1;
        }
-       elsif (grep(/No such user/i, $query_user_output)) {
+       elsif (grep(/No such user/i, @$query_user_output)) {
                notify($ERRORS{'DEBUG'}, 0, "user $username does not exist on 
$computer_node_name");
                return 0;
        }

Modified: incubator/vcl/trunk/managementnode/lib/VCL/utils.pm
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/utils.pm?rev=1339939&r1=1339938&r2=1339939&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/utils.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/utils.pm Fri May 18 00:53:28 2012
@@ -2098,6 +2098,7 @@ VALUES
        '$user_id',
        '$password'
 )
+ON DUPLICATE KEY UPDATE password = '$password'
 EOF
        }
        elsif ($mode =~ /delete/i) {
@@ -2108,7 +2109,7 @@ FROM
 reservationaccounts
 WHERE
 reservationid = '$reservation_id' AND
-userid = '$user_id'
+userid = '$user_id' 
 EOF
        }
        


Reply via email to