adap 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/adap/adap.rb +8 -1
- data/lib/adap/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e4bb42dc06a861a5f1965c45dfa5d4bb0a3cb78b7243c6308b3d00554911b0f
|
4
|
+
data.tar.gz: 36bedddcc2deb57b92fa451d9c1ee736095bfc2dd5adf79a9457c887403e5f58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f07b96cbe81656483463b75f01a582514790d9fa629d7ed7a892baa2f0942008cf3222fea2c72db3673cb08628d6457476350b3a60282047697b4a53caed6830
|
7
|
+
data.tar.gz: e11fe0e9c844c0a42bd9d57f90e79b40a99fe76fe9f5e5f0233276542b07f4672e1f7339cab4fea357653765b1d8e5f44cdfd70d379050aa3473c75a33e60849
|
data/lib/adap/adap.rb
CHANGED
@@ -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(
|
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."}
|
data/lib/adap/version.rb
CHANGED