diff options
author | Matt Wrock <matt@mattwrock.com> | 2015-10-06 22:38:59 -0700 |
---|---|---|
committer | Matt Wrock <matt@mattwrock.com> | 2015-10-06 22:38:59 -0700 |
commit | 8316119c56d1b38916a61d33b2dab3a42fcd5350 (patch) | |
tree | 533e2e0f3238ff5af54cd3612b2cb8654f468066 | |
parent | 41769e2498206d3c192d0b35b9fbcc6eda7c7431 (diff) | |
download | chef-8316119c56d1b38916a61d33b2dab3a42fcd5350.tar.gz |
add error message for existing user/group association
-rw-r--r-- | lib/chef/win32/api/net.rb | 1 | ||||
-rw-r--r-- | lib/chef/win32/net.rb | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/chef/win32/api/net.rb b/lib/chef/win32/api/net.rb index d6f8ba99ae..966622df15 100644 --- a/lib/chef/win32/api/net.rb +++ b/lib/chef/win32/api/net.rb @@ -46,6 +46,7 @@ class Chef USE_LOTS_OF_FORCE = 2 #every windows API should support this flag NERR_Success = 0 + NERR_MEMBER_IN_ALIAS = 1378 NERR_InvalidComputer = 2351 NERR_NotPrimary = 2226 NERR_SpeGroupOp = 2234 diff --git a/lib/chef/win32/net.rb b/lib/chef/win32/net.rb index a5ee1a00a1..410b7f9c16 100644 --- a/lib/chef/win32/net.rb +++ b/lib/chef/win32/net.rb @@ -71,6 +71,8 @@ class Chef def self.net_api_error!(code) msg = case code + when NERR_MEMBER_IN_ALIAS + "The specified account name is already a member of the group." when NERR_InvalidComputer "The user does not have access to the requested information." when NERR_NotPrimary |