Issue #20877 has been reported by Aristarkh Zagorodnikov.
----------------------------------------
Bug #20877: Broken "user" resource under Windows
https://projects.puppetlabs.com/issues/20877
* Author: Aristarkh Zagorodnikov
* Status: Unreviewed
* Priority: High
* Assignee:
* Category: windows
* Target version:
* Affected Puppet version: 3.2.1
* Keywords:
* Branch:
----------------------------------------
Consider the following session:
<pre>
C:\Program Files (x86)\Puppet Labs\Puppet\bin>puppet apply -e "user { test:
password => 'test' }"
Notice: /User[test]/ensure: created
Notice: Finished catalog run in 4.94 seconds
C:\Program Files (x86)\Puppet Labs\Puppet\bin>puppet apply -e "user { test:
password => 'test' }"
Error: /User[test]: Could not evaluate: can't convert Fixnum into String
Notice: Finished catalog run in 2.55 seconds
</pre>
Any attempt to set password for an existing user fails with the same error.
I traced it to the following piece of code in lib/puppet/util/windows/user.rb:
<pre><code class="ruby"> begin
yield token.unpack('L')[0] if block_given?
ensure
close_handle.call(token.unpack('L')[0])
end
</code></pre>
I'm not sure how this worked before (maybe Win32API.rb used to accept integers
instead of packed strings), but unless I'm missing something, the close_handle
line should be like this:
<pre><code class="ruby">close_handle.call(token)
</code></pre>
3.1.1 worked fine, but I suspect that it might be the ruby standard library
that changed.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.