Skip to content

Commit aaa2aee

Browse files
committed
treat windows service accounts as case insensitive
Windows service accounts are *case preserving* but not *case sensitive*. Before this change, Windows service logon account names were compared directly as case sensitive. When there was a case mismatch, it was treated as a change to the account and the service was restarted. This now normalizes case before comparing, reducing spurious restarts.
1 parent 2aee693 commit aaa2aee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/puppet/provider/service/windows.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def logonaccount_insync?(current)
127127
@normalized_logon_account ||= normalize_logonaccount
128128
@resource[:logonaccount] = @normalized_logon_account
129129

130-
insync = @resource[:logonaccount] == current
130+
insync = @resource[:logonaccount].downcase == current.downcase
131131
self.logonpassword = @resource[:logonpassword] if insync
132132
insync
133133
end

0 commit comments

Comments
 (0)