summaryrefslogtreecommitdiff
path: root/lib/chef/util/windows
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-02-09 07:53:56 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-02-09 07:53:56 -0800
commitf073747786abbe6ada55ed24b696a03e39c3c45d (patch)
tree7971d871e89d522a58291713761a6c83f68e8d19 /lib/chef/util/windows
parentc6e69783705cfd48bfea0c943dc071964dd21311 (diff)
downloadchef-f073747786abbe6ada55ed24b696a03e39c3c45d.tar.gz
auto fixing some rubocops
Style/NegatedWhile Style/ParenthesesAroundCondition Style/WhileUntilDo Style/WordArray Performance/ReverseEach Style/ColonMethodCall
Diffstat (limited to 'lib/chef/util/windows')
-rw-r--r--lib/chef/util/windows/net_group.rb12
-rw-r--r--lib/chef/util/windows/net_user.rb12
2 files changed, 12 insertions, 12 deletions
diff --git a/lib/chef/util/windows/net_group.rb b/lib/chef/util/windows/net_group.rb
index 6dd6e39f2b..0a351fbc6f 100644
--- a/lib/chef/util/windows/net_group.rb
+++ b/lib/chef/util/windows/net_group.rb
@@ -36,7 +36,7 @@ class Chef::Util::Windows::NetGroup
def local_get_members
begin
- Chef::ReservedNames::Win32::NetUser::net_local_group_get_members(nil, groupname)
+ Chef::ReservedNames::Win32::NetUser.net_local_group_get_members(nil, groupname)
rescue Chef::Exceptions::Win32APIError => e
raise ArgumentError, e
end
@@ -44,7 +44,7 @@ class Chef::Util::Windows::NetGroup
def local_add
begin
- Chef::ReservedNames::Win32::NetUser::net_local_group_add(nil, groupname)
+ Chef::ReservedNames::Win32::NetUser.net_local_group_add(nil, groupname)
rescue Chef::Exceptions::Win32APIError => e
raise ArgumentError, e
end
@@ -52,7 +52,7 @@ class Chef::Util::Windows::NetGroup
def local_set_members(members)
begin
- Chef::ReservedNames::Win32::NetUser::net_local_group_set_members(nil, groupname, members)
+ Chef::ReservedNames::Win32::NetUser.net_local_group_set_members(nil, groupname, members)
rescue Chef::Exceptions::Win32APIError => e
raise ArgumentError, e
end
@@ -60,7 +60,7 @@ class Chef::Util::Windows::NetGroup
def local_add_members(members)
begin
- Chef::ReservedNames::Win32::NetUser::net_local_group_add_members(nil, groupname, members)
+ Chef::ReservedNames::Win32::NetUser.net_local_group_add_members(nil, groupname, members)
rescue Chef::Exceptions::Win32APIError => e
raise ArgumentError, e
end
@@ -68,7 +68,7 @@ class Chef::Util::Windows::NetGroup
def local_delete_members(members)
begin
- Chef::ReservedNames::Win32::NetUser::net_local_group_del_members(nil, groupname, members)
+ Chef::ReservedNames::Win32::NetUser.net_local_group_del_members(nil, groupname, members)
rescue Chef::Exceptions::Win32APIError => e
raise ArgumentError, e
end
@@ -76,7 +76,7 @@ class Chef::Util::Windows::NetGroup
def local_delete
begin
- Chef::ReservedNames::Win32::NetUser::net_local_group_del(nil, groupname)
+ Chef::ReservedNames::Win32::NetUser.net_local_group_del(nil, groupname)
rescue Chef::Exceptions::Win32APIError => e
raise ArgumentError, e
end
diff --git a/lib/chef/util/windows/net_user.rb b/lib/chef/util/windows/net_user.rb
index f2edeacf17..b0a779e44a 100644
--- a/lib/chef/util/windows/net_user.rb
+++ b/lib/chef/util/windows/net_user.rb
@@ -79,7 +79,7 @@ class Chef::Util::Windows::NetUser < Chef::Util::Windows
def set_info(args)
begin
- rc = NetUser::net_user_set_info_l3(nil, @username, transform_usri3(args))
+ rc = NetUser.net_user_set_info_l3(nil, @username, transform_usri3(args))
rescue Chef::Exceptions::Win32APIError => e
raise ArgumentError, e
end
@@ -96,7 +96,7 @@ class Chef::Util::Windows::NetUser < Chef::Util::Windows
#XXX for an extra painful alternative, see: http://support.microsoft.com/kb/180548
def validate_credentials(passwd)
begin
- token = Security::logon_user(@username, nil, passwd,
+ token = Security.logon_user(@username, nil, passwd,
LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT)
return true
rescue Chef::Exceptions::Win32APIError
@@ -106,7 +106,7 @@ class Chef::Util::Windows::NetUser < Chef::Util::Windows
def get_info
begin
- ui3 = NetUser::net_user_get_info_l3(nil, @username)
+ ui3 = NetUser.net_user_get_info_l3(nil, @username)
rescue Chef::Exceptions::Win32APIError => e
raise ArgumentError, e
end
@@ -115,8 +115,8 @@ class Chef::Util::Windows::NetUser < Chef::Util::Windows
def add(args)
transformed_args = transform_usri3(args)
- NetUser::net_user_add_l3(nil, transformed_args)
- NetUser::net_local_group_add_member(nil, "Users", args[:name])
+ NetUser.net_user_add_l3(nil, transformed_args)
+ NetUser.net_local_group_add_member(nil, "Users", args[:name])
end
def user_modify(&proc)
@@ -137,7 +137,7 @@ class Chef::Util::Windows::NetUser < Chef::Util::Windows
def delete
begin
- NetUser::net_user_del(nil, @username)
+ NetUser.net_user_del(nil, @username)
rescue Chef::Exceptions::Win32APIError => e
raise ArgumentError, e
end