summaryrefslogtreecommitdiff
path: root/lib/chef/util
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-07-29 13:20:08 -0700
committerJay Mundrawala <jdmundrawala@gmail.com>2015-07-29 13:20:08 -0700
commited8410999f190de51e082c4c4f5a8a8e2704f7e2 (patch)
tree68e7526806cacaf9fa92ac0b480f4e40af59bf7b /lib/chef/util
parent7982fa19f67fb15b29ed8559ea81b5e19bc91380 (diff)
downloadchef-ed8410999f190de51e082c4c4f5a8a8e2704f7e2.tar.gz
Rewrite NetLocalGroupDel to use FFI
Diffstat (limited to 'lib/chef/util')
-rw-r--r--lib/chef/util/windows/net_group.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/chef/util/windows/net_group.rb b/lib/chef/util/windows/net_group.rb
index 24ee29257c..9e7d3cbc36 100644
--- a/lib/chef/util/windows/net_group.rb
+++ b/lib/chef/util/windows/net_group.rb
@@ -101,9 +101,10 @@ class Chef::Util::Windows::NetGroup < Chef::Util::Windows
end
def local_delete
- rc = NetLocalGroupDel.call(nil, @name)
- if rc != NERR_Success
- raise ArgumentError, get_last_error(rc)
+ begin
+ Chef::ReservedNames::Win32::NetUser::net_local_group_del(nil, @groupname)
+ rescue Chef::Exceptions::Win32APIError => e
+ raise ArgumentError, e
end
end
end