adap 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3158307760aaffe02f99a06d508783b569321759652824029bf91615cdfea9ea
4
- data.tar.gz: 96bf2d0170c919e0a1946d5532c1d9e929dba0003548d6b091ba7d242d3238fd
3
+ metadata.gz: 1e4bb42dc06a861a5f1965c45dfa5d4bb0a3cb78b7243c6308b3d00554911b0f
4
+ data.tar.gz: 36bedddcc2deb57b92fa451d9c1ee736095bfc2dd5adf79a9457c887403e5f58
5
5
  SHA512:
6
- metadata.gz: b22800cef66237c05002282ee1b63cc2e6070d151ef899ed67af75a4069b994aeb2f11987b13ff2882864b237fccc8dca9274dba0a35fa25b8da897618dc998e
7
- data.tar.gz: fd5bbdb231aa7c046335c8849af2898c30dd0e564a6b82faab86a4a63a77c8ebd2bd63611c28c8fe5c7ea70bcbad35019ec843497ef54f187051f1034cf2c775
6
+ metadata.gz: f07b96cbe81656483463b75f01a582514790d9fa629d7ed7a892baa2f0942008cf3222fea2c72db3673cb08628d6457476350b3a60282047697b4a53caed6830
7
+ data.tar.gz: e11fe0e9c844c0a42bd9d57f90e79b40a99fe76fe9f5e5f0233276542b07f4672e1f7339cab4fea357653765b1d8e5f44cdfd70d379050aa3473c75a33e60849
@@ -36,6 +36,8 @@ class Adap
36
36
  :virtual_crypt_sha256 => "virtualCryptSHA256",
37
37
  :virtual_crypt_sha512 => "virtualCryptSHA512"
38
38
  }
39
+ # List of unsupported hash algorithms in AD but OpenLDAP support
40
+ @unsupported_hash_algorithms_in_ad = [:md5, :sha, :ssha]
39
41
 
40
42
  @ad_host = params[:ad_host]
41
43
  @ad_port = (params[:ad_port] ? params[:ad_port] : 389)
@@ -192,7 +194,12 @@ class Adap
192
194
  elsif ad_entry.nil? and !ldap_entry.nil? then
193
195
  ret = delete_user(ldap_dn)
194
196
  elsif !ad_entry.nil? and !ldap_entry.nil? then
195
- ret = modify_user(ldap_dn, ad_entry, ldap_entry, get_password_hash(uid, password))
197
+ ret = modify_user(
198
+ ldap_dn,
199
+ ad_entry,
200
+ ldap_entry,
201
+ ( password.nil? and (@unsupported_hash_algorithms_in_ad.include?(@password_hash_algorithm)) ) ? nil : get_password_hash(uid, password)
202
+ )
196
203
  else
197
204
  # ad_entry.nil? and ldap_entry.nil? then
198
205
  return {:code => 0, :operations => nil, :message => "There are not any data of #{uid} to sync."}
@@ -1,3 +1,3 @@
1
1
  module ModAdap
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tsutomu Nakamura