vcl-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arku...@apache.org
Subject svn commit: r1147965 - /incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm
Date Mon, 18 Jul 2011 16:45:49 GMT
Author: arkurth
Date: Mon Jul 18 16:45:48 2011
New Revision: 1147965

URL: http://svn.apache.org/viewvc?rev=1147965&view=rev
Log:
VCL-463
Updated Windows.pm::create_user. Set $adminoverride argument to 0 if the argument was not
supplied to prevent "Use of uninitialized value" warnings.

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

Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm?rev=1147965&r1=1147964&r2=1147965&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm Mon Jul 18 16:45:48 2011
@@ -1703,14 +1703,12 @@ sub create_user {
 	my $system32_path        = $self->get_system32_path() || return;
 	
 	my $imagemeta_rootaccess = $self->data->get_imagemeta_rootaccess();
-
+	
 	# Attempt to get the username from the arguments
 	# If no argument was supplied, use the user specified in the DataStructure
 	my $username = shift;
 	my $password = shift;
-	my $user_uid = shift;
-        my $adminoverride = shift;
-        my $user_standalone = shift;
+	my $adminoverride = shift || 0;
 
 	if (!$username) {
 		$username = $self->data->get_user_login_id();
@@ -1719,20 +1717,16 @@ sub create_user {
 		$password = $self->data->get_reservation_password();
 	}
 	
-	#adminoverride, if 0 use value from database for $imagemeta_rootaccess
-        # if 1 or 2 override database
-        # 1 - allow admin access, set $imagemeta_rootaccess=1
-        # 2 - disallow admin access, set $imagemeta_rootaccess=0
-        if ($adminoverride eq '1') {
-                $imagemeta_rootaccess = 1;
-        }
-        elsif ($adminoverride eq '2') {
-                $imagemeta_rootaccess = 0;
-        }
-        else {
-                #no override detected, do not change database value
-        }
-
+	# adminoverride, if 0 use value from database for $imagemeta_rootaccess
+	# If 1 or 2 override database value:
+	# 1 - allow admin access, set $imagemeta_rootaccess=1
+	# 2 - disallow admin access, set $imagemeta_rootaccess=0
+	if ($adminoverride eq '1') {
+		$imagemeta_rootaccess = 1;
+	}
+	elsif ($adminoverride eq '2') {
+		$imagemeta_rootaccess = 0;
+	}
 
 	# Check if user already exists
 	if ($self->user_exists($username)) {



Mime
View raw message