opennebula 5.4.0 → 5.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cloud/CloudClient.rb +1 -1
- data/lib/opennebula/ldap_auth.rb +4 -4
- data/lib/opennebula.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 431c4988cf999d8a9df28c42f9d09823b7936d7a
|
4
|
+
data.tar.gz: d88e09f974fa057c7f5c58ef132c252d4b4aff35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ea99cea006d15c16544c289f979367146eac1a9e64880cbd51b4e3ca7dbb8545232317f0490485fc54cb62ef49439ec3ef00dce0b04e959dcb5f413953751fe
|
7
|
+
data.tar.gz: 32e3c9ce684dfd4583dbc288072f7decc0805c94591787653e2802b222bc2dea3650bdebac19eeacb088917e648aaf0fc19c45a19f603ba0cf1b2ef34f5c3f59
|
data/lib/cloud/CloudClient.rb
CHANGED
data/lib/opennebula/ldap_auth.rb
CHANGED
@@ -127,7 +127,7 @@ class OpenNebula::LdapAuth
|
|
127
127
|
|
128
128
|
def find_user(name)
|
129
129
|
begin
|
130
|
-
filter =
|
130
|
+
filter = Net::LDAP::Filter.eq(@options[:user_field], escape(name))
|
131
131
|
|
132
132
|
result = @ldap.search(
|
133
133
|
:base => @options[:base],
|
@@ -155,10 +155,11 @@ class OpenNebula::LdapAuth
|
|
155
155
|
end
|
156
156
|
|
157
157
|
def is_in_group?(user, group)
|
158
|
+
username = user.first.force_encoding(Encoding::UTF_8)
|
158
159
|
result=@ldap.search(
|
159
160
|
:base => group,
|
160
161
|
:attributes => [@options[:group_field]],
|
161
|
-
:filter => "(#{@options[:group_field]}=#{
|
162
|
+
:filter => "(#{@options[:group_field]}=#{username})")
|
162
163
|
|
163
164
|
if result && result.first
|
164
165
|
true
|
@@ -196,7 +197,7 @@ class OpenNebula::LdapAuth
|
|
196
197
|
filter = "(#{@options[:group_field]}=#{@user[@options[:user_field]].first})"
|
197
198
|
@ldap.search(
|
198
199
|
:base => @options[:base],
|
199
|
-
:attributes => "dn",
|
200
|
+
:attributes => [ "dn" ],
|
200
201
|
:filter => filter
|
201
202
|
) do |entry|
|
202
203
|
if @mapping[entry.dn]
|
@@ -228,4 +229,3 @@ private
|
|
228
229
|
string.gsub(FILTER_ESCAPE_RE) { |char| "\\" + FILTER_ESCAPES[char] }
|
229
230
|
end
|
230
231
|
end
|
231
|
-
|
data/lib/opennebula.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opennebula
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.4.
|
4
|
+
version: 5.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenNebula
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|