summaryrefslogtreecommitdiff
path: root/lib/chef/util/windows
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/util/windows')
-rw-r--r--lib/chef/util/windows/net_group.rb2
-rw-r--r--lib/chef/util/windows/net_use.rb6
-rw-r--r--lib/chef/util/windows/net_user.rb22
-rw-r--r--lib/chef/util/windows/volume.rb4
4 files changed, 17 insertions, 17 deletions
diff --git a/lib/chef/util/windows/net_group.rb b/lib/chef/util/windows/net_group.rb
index 214881df56..efe2561bf2 100644
--- a/lib/chef/util/windows/net_group.rb
+++ b/lib/chef/util/windows/net_group.rb
@@ -19,7 +19,7 @@
require "chef/util/windows"
require "chef/win32/net"
-#wrapper around a subset of the NetGroup* APIs.
+# wrapper around a subset of the NetGroup* APIs.
class Chef::Util::Windows::NetGroup
private
diff --git a/lib/chef/util/windows/net_use.rb b/lib/chef/util/windows/net_use.rb
index 196ce42215..99626371a0 100644
--- a/lib/chef/util/windows/net_use.rb
+++ b/lib/chef/util/windows/net_use.rb
@@ -16,9 +16,9 @@
# limitations under the License.
#
-#the Win32 Volume APIs do not support mapping network drives. not supported by WMI either.
-#see also: WNetAddConnection2 and WNetAddConnection3
-#see also cmd.exe: net use /?
+# the Win32 Volume APIs do not support mapping network drives. not supported by WMI either.
+# see also: WNetAddConnection2 and WNetAddConnection3
+# see also cmd.exe: net use /?
require "chef/util/windows"
require "chef/win32/net"
diff --git a/lib/chef/util/windows/net_user.rb b/lib/chef/util/windows/net_user.rb
index cf8bf3615a..d282ba9046 100644
--- a/lib/chef/util/windows/net_user.rb
+++ b/lib/chef/util/windows/net_user.rb
@@ -21,8 +21,8 @@ require "chef/exceptions"
require "chef/win32/net"
require "chef/win32/security"
-#wrapper around a subset of the NetUser* APIs.
-#nothing Chef specific, but not complete enough to be its own gem, so util for now.
+# wrapper around a subset of the NetUser* APIs.
+# nothing Chef specific, but not complete enough to be its own gem, so util for now.
class Chef::Util::Windows::NetUser < Chef::Util::Windows
private
@@ -91,7 +91,7 @@ class Chef::Util::Windows::NetUser < Chef::Util::Windows
LOGON32_PROVIDER_DEFAULT = Security::LOGON32_PROVIDER_DEFAULT
LOGON32_LOGON_NETWORK = Security::LOGON32_LOGON_NETWORK
- #XXX for an extra painful alternative, see: http://support.microsoft.com/kb/180548
+ # XXX for an extra painful alternative, see: http://support.microsoft.com/kb/180548
def validate_credentials(passwd)
token = Security.logon_user(@username, nil, passwd,
LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT)
@@ -118,8 +118,8 @@ class Chef::Util::Windows::NetUser < Chef::Util::Windows
# FIXME: yard with @yield
def user_modify
user = get_info
- user[:last_logon] = user[:units_per_week] = 0 #ignored as per USER_INFO_3 doc
- user[:logon_hours] = nil #PBYTE field; \0 == no changes
+ user[:last_logon] = user[:units_per_week] = 0 # ignored as per USER_INFO_3 doc
+ user[:logon_hours] = nil # PBYTE field; \0 == no changes
yield(user)
set_info(user)
end
@@ -141,9 +141,9 @@ class Chef::Util::Windows::NetUser < Chef::Util::Windows
def disable_account
user_modify do |user|
user[:flags] |= NetUser::UF_ACCOUNTDISABLE
- #This does not set the password to nil. It (for some reason) means to ignore updating the field.
- #See similar behavior for the logon_hours field documented at
- #http://msdn.microsoft.com/en-us/library/windows/desktop/aa371338%28v=vs.85%29.aspx
+ # This does not set the password to nil. It (for some reason) means to ignore updating the field.
+ # See similar behavior for the logon_hours field documented at
+ # http://msdn.microsoft.com/en-us/library/windows/desktop/aa371338%28v=vs.85%29.aspx
user[:password] = nil
end
end
@@ -151,9 +151,9 @@ class Chef::Util::Windows::NetUser < Chef::Util::Windows
def enable_account
user_modify do |user|
user[:flags] &= ~NetUser::UF_ACCOUNTDISABLE
- #This does not set the password to nil. It (for some reason) means to ignore updating the field.
- #See similar behavior for the logon_hours field documented at
- #http://msdn.microsoft.com/en-us/library/windows/desktop/aa371338%28v=vs.85%29.aspx
+ # This does not set the password to nil. It (for some reason) means to ignore updating the field.
+ # See similar behavior for the logon_hours field documented at
+ # http://msdn.microsoft.com/en-us/library/windows/desktop/aa371338%28v=vs.85%29.aspx
user[:password] = nil
end
end
diff --git a/lib/chef/util/windows/volume.rb b/lib/chef/util/windows/volume.rb
index 358a3f4bb8..ff5f46163f 100644
--- a/lib/chef/util/windows/volume.rb
+++ b/lib/chef/util/windows/volume.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-#simple wrapper around Volume APIs. might be possible with WMI, but possibly more complex.
+# simple wrapper around Volume APIs. might be possible with WMI, but possibly more complex.
require "chef/win32/api/file"
require "chef/util/windows"
@@ -25,7 +25,7 @@ class Chef::Util::Windows::Volume < Chef::Util::Windows
attr_reader :mount_point
def initialize(name)
- name += "\\" unless name =~ /\\$/ #trailing slash required
+ name += "\\" unless name =~ /\\$/ # trailing slash required
@mount_point = name
end