opennebula 4.90.0.beta1 → 4.90.10.rc1

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
  SHA1:
3
- metadata.gz: e860fb8028ca5276c55c13bb41ce2661310ecc33
4
- data.tar.gz: 1fbbe122e328a30e83a6fa7cd3408efea2710610
3
+ metadata.gz: c03ee98531e1a62d3b49aaf94ba9095902f47705
4
+ data.tar.gz: 1e78cdfffd8f093032950c10187c08d9001d5974
5
5
  SHA512:
6
- metadata.gz: 9d6281be6b49fb27cb38cfa03d79c9d6c5addb7615b164202c07150e60b4e5a1429afd07d587dc9200f15d0b0639b5c3abbff6307238232b680f965e063c98d3
7
- data.tar.gz: 0bcb4214d63d82cf507d8c952126b510f6257b38a4e5b5b95bfa2731480141888a6f7d060573d00be1f8fb392eecaf5aeddc512c67caa29faec680ca1d1221c3
6
+ metadata.gz: a5cdec6a7a768b3c5b909d79cc6a945b8d84e1826940a4faa55a3d1ef7d107e1ec4a5760e9186aa6d824341cca7aef8c3bff7e71c23dcb99dd8d0cf5c240a941
7
+ data.tar.gz: 21ae1b74c18aec9e508c4e0a570d3159fa6e7b606bf03800643b447a5eea1dc3cb19418ce535fc4e2944fb70d735f88986348dd854e9a775ae57b61d408c29b9
@@ -50,7 +50,7 @@ end
50
50
  module CloudClient
51
51
 
52
52
  # OpenNebula version
53
- VERSION = '4.90.0'
53
+ VERSION = '4.90.10'
54
54
 
55
55
  # #########################################################################
56
56
  # Default location for the authentication file
@@ -85,7 +85,8 @@ module OpenNebula
85
85
  # Allocates a new Datastore in OpenNebula
86
86
  #
87
87
  # @param description [String] The template of the Datastore.
88
- # @param cluster_id [Integer] Id of the cluster, -1 to use default
88
+ # @param cluster_id [Integer] Id of the cluster. If it is -1,
89
+ # this datastore won't be added to any cluster.
89
90
  #
90
91
  # @return [Integer, OpenNebula::Error] the new ID in case of
91
92
  # success, error otherwise
@@ -122,10 +122,13 @@ class OpenNebula::LdapAuth
122
122
 
123
123
  def find_user(name)
124
124
  begin
125
- result=@ldap.search(
126
- :base => @options[:base],
125
+ filter = "#{@options[:user_field]}=#{escape(name)}"
126
+
127
+ result = @ldap.search(
128
+ :base => @options[:base],
127
129
  :attributes => @options[:attributes],
128
- :filter => "#{@options[:user_field]}=#{name}")
130
+ :filter => filter
131
+ )
129
132
 
130
133
  if result && result.first
131
134
  @user = result.first
@@ -187,5 +190,24 @@ class OpenNebula::LdapAuth
187
190
  groups.delete(false)
188
191
  groups.compact.uniq
189
192
  end
193
+
194
+ private
195
+
196
+ # The escapes code has been copied from <net-ldap>/lib/net/ldap/filter.rb
197
+ FILTER_ESCAPES = {
198
+ "\0" => '00',
199
+ '*' => '2A',
200
+ '(' => '28',
201
+ ')' => '29',
202
+ '\\' => '5C',
203
+ '?' => '3F',
204
+ '=' => '3D'
205
+ }
206
+
207
+ FILTER_ESCAPE_RE = Regexp.new("[" + FILTER_ESCAPES.keys.map { |e| Regexp.escape(e) }.join + "]")
208
+
209
+ def escape(string)
210
+ string.gsub(FILTER_ESCAPE_RE) { |char| "\\" + FILTER_ESCAPES[char] }
211
+ end
190
212
  end
191
213
 
@@ -76,7 +76,8 @@ module OpenNebula
76
76
  # Allocates a new VirtualNetwork in OpenNebula
77
77
  #
78
78
  # @param description [String] The template of the VirtualNetwork.
79
- # @param cluster_id [Integer] Id of the cluster, -1 to use default
79
+ # @param cluster_id [Integer] Id of the cluster. If it is -1,
80
+ # this VirtualNetwork won't be added to any cluster.
80
81
  #
81
82
  # @return [Integer, OpenNebula::Error] the new ID in case of
82
83
  # success, error otherwise
data/lib/opennebula.rb CHANGED
@@ -66,5 +66,5 @@ require 'opennebula/marketplaceapp_pool'
66
66
  module OpenNebula
67
67
 
68
68
  # OpenNebula version
69
- VERSION = '4.90.0'
69
+ VERSION = '4.90.10'
70
70
  end
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: 4.90.0.beta1
4
+ version: 4.90.10.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenNebula
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-18 00:00:00.000000000 Z
11
+ date: 2016-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri