rkerberos 0.1.2 → 0.1.3

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: fad6b2ef21cbb2b32b0e4e3f82bf721bc9f2657d
4
+ data.tar.gz: f24b854f2280641f2637007142a94a765f95682a
5
+ SHA512:
6
+ metadata.gz: e4c5d5c5e95e59d2916f2e0cdc77df87c6df0e23b0d6f0c4edf148cc62316f6d150665de63d61f7954c25b5b7f5802e4ff970a5865b82857607af126403f68c6
7
+ data.tar.gz: b0c3e66a5d700d4426a05b801124309411bfe78bb60dce5d2cc90f92a3c399b31c4c5eb13892751a7085d23416049d90840a89a818bce1544799181139f768bf
data/CHANGES CHANGED
@@ -1,3 +1,7 @@
1
+ = 0.1.3 - 07-Sep-2013
2
+ * Add optional 'service' argument to get_init_creds_password (fixes #3)
3
+ * Artistic License 2.0 text now included (fixes #2)
4
+
1
5
  = 0.1.2 - 24-Jun-2013
2
6
  * Fix kadm5clnt build issue on EL6
3
7
  * Remove admin_keytab references for krb5 1.11
data/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ The Artistic License 2.0
2
+
3
+ Copyright (c) 2000-2006, The Perl Foundation.
4
+
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ This license establishes the terms under which a given free software
11
+ Package may be copied, modified, distributed, and/or redistributed.
12
+ The intent is that the Copyright Holder maintains some artistic
13
+ control over the development of that Package while still keeping the
14
+ Package available as open source and free software.
15
+
16
+ You are always permitted to make arrangements wholly outside of this
17
+ license directly with the Copyright Holder of a given Package. If the
18
+ terms of this license do not permit the full use that you propose to
19
+ make of the Package, you should contact the Copyright Holder and seek
20
+ a different licensing arrangement.
21
+
22
+ Definitions
23
+
24
+ "Copyright Holder" means the individual(s) or organization(s)
25
+ named in the copyright notice for the entire Package.
26
+
27
+ "Contributor" means any party that has contributed code or other
28
+ material to the Package, in accordance with the Copyright Holder's
29
+ procedures.
30
+
31
+ "You" and "your" means any person who would like to copy,
32
+ distribute, or modify the Package.
33
+
34
+ "Package" means the collection of files distributed by the
35
+ Copyright Holder, and derivatives of that collection and/or of
36
+ those files. A given Package may consist of either the Standard
37
+ Version, or a Modified Version.
38
+
39
+ "Distribute" means providing a copy of the Package or making it
40
+ accessible to anyone else, or in the case of a company or
41
+ organization, to others outside of your company or organization.
42
+
43
+ "Distributor Fee" means any fee that you charge for Distributing
44
+ this Package or providing support for this Package to another
45
+ party. It does not mean licensing fees.
46
+
47
+ "Standard Version" refers to the Package if it has not been
48
+ modified, or has been modified only in ways explicitly requested
49
+ by the Copyright Holder.
50
+
51
+ "Modified Version" means the Package, if it has been changed, and
52
+ such changes were not explicitly requested by the Copyright
53
+ Holder.
54
+
55
+ "Original License" means this Artistic License as Distributed with
56
+ the Standard Version of the Package, in its current version or as
57
+ it may be modified by The Perl Foundation in the future.
58
+
59
+ "Source" form means the source code, documentation source, and
60
+ configuration files for the Package.
61
+
62
+ "Compiled" form means the compiled bytecode, object code, binary,
63
+ or any other form resulting from mechanical transformation or
64
+ translation of the Source form.
65
+
66
+
67
+ Permission for Use and Modification Without Distribution
68
+
69
+ (1) You are permitted to use the Standard Version and create and use
70
+ Modified Versions for any purpose without restriction, provided that
71
+ you do not Distribute the Modified Version.
72
+
73
+
74
+ Permissions for Redistribution of the Standard Version
75
+
76
+ (2) You may Distribute verbatim copies of the Source form of the
77
+ Standard Version of this Package in any medium without restriction,
78
+ either gratis or for a Distributor Fee, provided that you duplicate
79
+ all of the original copyright notices and associated disclaimers. At
80
+ your discretion, such verbatim copies may or may not include a
81
+ Compiled form of the Package.
82
+
83
+ (3) You may apply any bug fixes, portability changes, and other
84
+ modifications made available from the Copyright Holder. The resulting
85
+ Package will still be considered the Standard Version, and as such
86
+ will be subject to the Original License.
87
+
88
+
89
+ Distribution of Modified Versions of the Package as Source
90
+
91
+ (4) You may Distribute your Modified Version as Source (either gratis
92
+ or for a Distributor Fee, and with or without a Compiled form of the
93
+ Modified Version) provided that you clearly document how it differs
94
+ from the Standard Version, including, but not limited to, documenting
95
+ any non-standard features, executables, or modules, and provided that
96
+ you do at least ONE of the following:
97
+
98
+ (a) make the Modified Version available to the Copyright Holder
99
+ of the Standard Version, under the Original License, so that the
100
+ Copyright Holder may include your modifications in the Standard
101
+ Version.
102
+
103
+ (b) ensure that installation of your Modified Version does not
104
+ prevent the user installing or running the Standard Version. In
105
+ addition, the Modified Version must bear a name that is different
106
+ from the name of the Standard Version.
107
+
108
+ (c) allow anyone who receives a copy of the Modified Version to
109
+ make the Source form of the Modified Version available to others
110
+ under
111
+
112
+ (i) the Original License or
113
+
114
+ (ii) a license that permits the licensee to freely copy,
115
+ modify and redistribute the Modified Version using the same
116
+ licensing terms that apply to the copy that the licensee
117
+ received, and requires that the Source form of the Modified
118
+ Version, and of any works derived from it, be made freely
119
+ available in that license fees are prohibited but Distributor
120
+ Fees are allowed.
121
+
122
+
123
+ Distribution of Compiled Forms of the Standard Version
124
+ or Modified Versions without the Source
125
+
126
+ (5) You may Distribute Compiled forms of the Standard Version without
127
+ the Source, provided that you include complete instructions on how to
128
+ get the Source of the Standard Version. Such instructions must be
129
+ valid at the time of your distribution. If these instructions, at any
130
+ time while you are carrying out such distribution, become invalid, you
131
+ must provide new instructions on demand or cease further distribution.
132
+ If you provide valid instructions or cease distribution within thirty
133
+ days after you become aware that the instructions are invalid, then
134
+ you do not forfeit any of your rights under this license.
135
+
136
+ (6) You may Distribute a Modified Version in Compiled form without
137
+ the Source, provided that you comply with Section 4 with respect to
138
+ the Source of the Modified Version.
139
+
140
+
141
+ Aggregating or Linking the Package
142
+
143
+ (7) You may aggregate the Package (either the Standard Version or
144
+ Modified Version) with other packages and Distribute the resulting
145
+ aggregation provided that you do not charge a licensing fee for the
146
+ Package. Distributor Fees are permitted, and licensing fees for other
147
+ components in the aggregation are permitted. The terms of this license
148
+ apply to the use and Distribution of the Standard or Modified Versions
149
+ as included in the aggregation.
150
+
151
+ (8) You are permitted to link Modified and Standard Versions with
152
+ other works, to embed the Package in a larger work of your own, or to
153
+ build stand-alone binary or bytecode versions of applications that
154
+ include the Package, and Distribute the result without restriction,
155
+ provided the result does not expose a direct interface to the Package.
156
+
157
+
158
+ Items That are Not Considered Part of a Modified Version
159
+
160
+ (9) Works (including, but not limited to, modules and scripts) that
161
+ merely extend or make use of the Package, do not, by themselves, cause
162
+ the Package to be a Modified Version. In addition, such works are not
163
+ considered parts of the Package itself, and are not subject to the
164
+ terms of this license.
165
+
166
+
167
+ General Provisions
168
+
169
+ (10) Any use, modification, and distribution of the Standard or
170
+ Modified Versions is governed by this Artistic License. By using,
171
+ modifying or distributing the Package, you accept this license. Do not
172
+ use, modify, or distribute the Package, if you do not accept this
173
+ license.
174
+
175
+ (11) If your Modified Version has been derived from a Modified
176
+ Version made by someone other than you, you are nevertheless required
177
+ to ensure that your Modified Version complies with the requirements of
178
+ this license.
179
+
180
+ (12) This license does not grant you the right to use any trademark,
181
+ service mark, tradename, or logo of the Copyright Holder.
182
+
183
+ (13) This license includes the non-exclusive, worldwide,
184
+ free-of-charge patent license to make, have made, use, offer to sell,
185
+ sell, import and otherwise transfer the Package with respect to any
186
+ patent claims licensable by the Copyright Holder that are necessarily
187
+ infringed by the Package. If you institute patent litigation
188
+ (including a cross-claim or counterclaim) against any party alleging
189
+ that the Package constitutes direct or contributory patent
190
+ infringement, then this Artistic License to you shall terminate on the
191
+ date that such litigation is filed.
192
+
193
+ (14) Disclaimer of Warranty:
194
+ THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS
195
+ IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED
196
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
197
+ NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL
198
+ LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL
199
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
200
+ DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF
201
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README.md CHANGED
@@ -53,11 +53,13 @@
53
53
  with the Heimdal Kerberos library.
54
54
 
55
55
  # TODO
56
- Create a separate class for the replay cache.
57
- Better credentials cache support.
58
- Ability to add and delete keytab entries.
56
+ * Create a separate class for the replay cache.
57
+ * Better credentials cache support.
58
+ * Ability to add and delete keytab entries.
59
59
 
60
60
  # Authors
61
- Daniel Berger
62
- Dominic Cleal (maintainer)
61
+ * Daniel Berger
62
+ * Dominic Cleal (maintainer)
63
63
 
64
+ # License
65
+ rkerberos is distributed under the Artistic 2.0 license.
@@ -322,19 +322,18 @@ static VALUE rkrb5_change_password(VALUE self, VALUE v_old, VALUE v_new){
322
322
 
323
323
  /*
324
324
  * call-seq:
325
- * krb5.get_init_creds_password(user, password)
325
+ * krb5.get_init_creds_password(user, password, service = nil)
326
326
  *
327
- * Authenticates the credentials of +user+ using +password+, and has the effect
328
- * of setting the principal and context internally. This method must typically
329
- * be called before using other methods.
327
+ * Authenticates the credentials of +user+ using +password+ against +service+,
328
+ * and has the effect of setting the principal and context internally. This method
329
+ * must typically be called before using other methods.
330
330
  */
331
- static VALUE rkrb5_get_init_creds_passwd(VALUE self, VALUE v_user, VALUE v_pass){
332
- Check_Type(v_user, T_STRING);
333
- Check_Type(v_pass, T_STRING);
334
-
331
+ static VALUE rkrb5_get_init_creds_passwd(int argc, VALUE* argv, VALUE self){
335
332
  RUBY_KRB5* ptr;
336
- char* user = StringValuePtr(v_user);
337
- char* pass = StringValuePtr(v_pass);
333
+ VALUE v_user, v_pass, v_service;
334
+ char* user;
335
+ char* pass;
336
+ char* service;
338
337
  krb5_error_code kerror;
339
338
 
340
339
  Data_Get_Struct(self, RUBY_KRB5, ptr);
@@ -342,6 +341,21 @@ static VALUE rkrb5_get_init_creds_passwd(VALUE self, VALUE v_user, VALUE v_pass)
342
341
  if(!ptr->ctx)
343
342
  rb_raise(cKrb5Exception, "no context has been established");
344
343
 
344
+ rb_scan_args(argc, argv, "21", &v_user, &v_pass, &v_service);
345
+
346
+ Check_Type(v_user, T_STRING);
347
+ Check_Type(v_pass, T_STRING);
348
+ user = StringValuePtr(v_user);
349
+ pass = StringValuePtr(v_pass);
350
+
351
+ if(NIL_P(v_service)){
352
+ service = NULL;
353
+ }
354
+ else{
355
+ Check_Type(v_service, T_STRING);
356
+ service = StringValuePtr(v_service);
357
+ }
358
+
345
359
  kerror = krb5_parse_name(ptr->ctx, user, &ptr->princ);
346
360
 
347
361
  if(kerror)
@@ -355,7 +369,7 @@ static VALUE rkrb5_get_init_creds_passwd(VALUE self, VALUE v_user, VALUE v_pass)
355
369
  0,
356
370
  NULL,
357
371
  0,
358
- NULL,
372
+ service,
359
373
  NULL
360
374
  );
361
375
 
@@ -504,7 +518,7 @@ void Init_rkerberos(){
504
518
  rb_define_method(cKrb5, "change_password", rkrb5_change_password, 2);
505
519
  rb_define_method(cKrb5, "close", rkrb5_close, 0);
506
520
  rb_define_method(cKrb5, "get_default_realm", rkrb5_get_default_realm, 0);
507
- rb_define_method(cKrb5, "get_init_creds_password", rkrb5_get_init_creds_passwd, 2);
521
+ rb_define_method(cKrb5, "get_init_creds_password", rkrb5_get_init_creds_passwd, -1);
508
522
  rb_define_method(cKrb5, "get_init_creds_keytab", rkrb5_get_init_creds_keytab, -1);
509
523
  rb_define_method(cKrb5, "get_default_principal", rkrb5_get_default_principal, 0);
510
524
  rb_define_method(cKrb5, "get_permitted_enctypes", rkrb5_get_permitted_enctypes, 0);
data/rkerberos.gemspec CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'rkerberos'
5
- spec.version = '0.1.2'
5
+ spec.version = '0.1.3'
6
6
  spec.authors = ['Daniel Berger', 'Dominic Cleal']
7
7
  spec.license = 'Artistic 2.0'
8
8
  spec.email = ['djberg96@gmail.com', 'dcleal@redhat.com']
@@ -10,9 +10,9 @@ Gem::Specification.new do |spec|
10
10
  spec.summary = 'A Ruby interface for the the Kerberos library'
11
11
  spec.test_files = Dir['test/test*']
12
12
  spec.extensions = ['ext/rkerberos/extconf.rb']
13
- spec.files = Dir['**/*'].reject{ |f| f.include?('git') || f.include?('tmp') }
13
+ spec.files = `git ls-files`.split("\n").reject { |f| f.include?('git') }
14
14
 
15
- spec.extra_rdoc_files = ['README.md', 'CHANGES', 'MANIFEST'] + Dir['ext/rkerberos/*.c']
15
+ spec.extra_rdoc_files = ['README.md', 'CHANGES', 'MANIFEST', 'LICENSE'] + Dir['ext/rkerberos/*.c']
16
16
 
17
17
  spec.add_dependency('rake-compiler')
18
18
 
data/test/test_krb5.rb CHANGED
@@ -84,14 +84,16 @@ class TC_Krb5 < Test::Unit::TestCase
84
84
  assert_respond_to(@krb5, :get_init_creds_password)
85
85
  end
86
86
 
87
- test "get_init_creds_password requires two arguments" do
87
+ test "get_init_creds_password requires two or three arguments" do
88
88
  assert_raise(ArgumentError){ @krb5.get_init_creds_password }
89
89
  assert_raise(ArgumentError){ @krb5.get_init_creds_password('test') }
90
+ assert_raise(ArgumentError){ @krb5.get_init_creds_password('test', 'foo', 'bar', 'baz') }
90
91
  end
91
92
 
92
93
  test "get_init_creds_password requires string arguments" do
93
94
  assert_raise(TypeError){ @krb5.get_init_creds_password(1, 2) }
94
95
  assert_raise(TypeError){ @krb5.get_init_creds_password('test', 1) }
96
+ assert_raise(TypeError){ @krb5.get_init_creds_password('test', 'foo', 1) }
95
97
  end
96
98
 
97
99
  test "calling get_init_creds_password after closing the object raises an error" do
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rkerberos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
5
- prerelease:
4
+ version: 0.1.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Daniel Berger
@@ -10,12 +9,11 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-06-24 00:00:00.000000000 Z
12
+ date: 2013-09-07 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: rake-compiler
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
18
  - - '>='
21
19
  - !ruby/object:Gem::Version
@@ -23,7 +21,6 @@ dependencies:
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
25
  - - '>='
29
26
  - !ruby/object:Gem::Version
@@ -31,7 +28,6 @@ dependencies:
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: test-unit
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
32
  - - '>='
37
33
  - !ruby/object:Gem::Version
@@ -39,7 +35,6 @@ dependencies:
39
35
  type: :development
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
39
  - - '>='
45
40
  - !ruby/object:Gem::Version
@@ -47,7 +42,6 @@ dependencies:
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: dbi-dbrc
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
46
  - - '>='
53
47
  - !ruby/object:Gem::Version
@@ -55,7 +49,6 @@ dependencies:
55
49
  type: :development
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
53
  - - '>='
61
54
  - !ruby/object:Gem::Version
@@ -73,81 +66,75 @@ extra_rdoc_files:
73
66
  - README.md
74
67
  - CHANGES
75
68
  - MANIFEST
69
+ - LICENSE
70
+ - ext/rkerberos/ccache.c
76
71
  - ext/rkerberos/context.c
77
- - ext/rkerberos/keytab.c
72
+ - ext/rkerberos/rkerberos.c
73
+ - ext/rkerberos/config.c
78
74
  - ext/rkerberos/principal.c
79
75
  - ext/rkerberos/kadm5.c
80
- - ext/rkerberos/keytab_entry.c
81
- - ext/rkerberos/config.c
82
- - ext/rkerberos/rkerberos.c
83
- - ext/rkerberos/ccache.c
84
76
  - ext/rkerberos/policy.c
77
+ - ext/rkerberos/keytab.c
78
+ - ext/rkerberos/keytab_entry.c
85
79
  files:
80
+ - CHANGES
81
+ - Gemfile
82
+ - LICENSE
86
83
  - MANIFEST
87
84
  - README.md
88
- - test/test_config.rb
89
- - test/test_krb5_keytab.rb
90
- - test/test_keytab_entry.rb
91
- - test/test_context.rb
92
- - test/test_principal.rb
93
- - test/test_credentials_cache.rb
94
- - test/test_krb5.rb
95
- - test/test_kadm5.rb
96
- - test/test_policy.rb
97
- - Gemfile.lock
98
85
  - Rakefile
99
- - ext/rkerberos/extconf.rb
100
- - ext/rkerberos/rkerberos.h
86
+ - ext/rkerberos/ccache.c
87
+ - ext/rkerberos/config.c
101
88
  - ext/rkerberos/context.c
102
- - ext/rkerberos/keytab.c
103
- - ext/rkerberos/principal.c
89
+ - ext/rkerberos/extconf.rb
104
90
  - ext/rkerberos/kadm5.c
91
+ - ext/rkerberos/keytab.c
105
92
  - ext/rkerberos/keytab_entry.c
106
- - ext/rkerberos/config.c
107
- - ext/rkerberos/rkerberos.c
108
- - ext/rkerberos/ccache.c
109
93
  - ext/rkerberos/policy.c
94
+ - ext/rkerberos/principal.c
95
+ - ext/rkerberos/rkerberos.c
96
+ - ext/rkerberos/rkerberos.h
110
97
  - rkerberos.gemspec
111
- - Gemfile
112
- - CHANGES
98
+ - test/test_config.rb
99
+ - test/test_context.rb
100
+ - test/test_credentials_cache.rb
101
+ - test/test_kadm5.rb
102
+ - test/test_keytab_entry.rb
103
+ - test/test_krb5.rb
104
+ - test/test_krb5_keytab.rb
105
+ - test/test_policy.rb
106
+ - test/test_principal.rb
113
107
  homepage: http://github.com/domcleal/rkerberos
114
108
  licenses:
115
109
  - Artistic 2.0
110
+ metadata: {}
116
111
  post_install_message:
117
112
  rdoc_options: []
118
113
  require_paths:
119
114
  - lib
120
115
  required_ruby_version: !ruby/object:Gem::Requirement
121
- none: false
122
116
  requirements:
123
117
  - - '>='
124
118
  - !ruby/object:Gem::Version
125
119
  version: '0'
126
- segments:
127
- - 0
128
- hash: 775144890459674853
129
120
  required_rubygems_version: !ruby/object:Gem::Requirement
130
- none: false
131
121
  requirements:
132
122
  - - '>='
133
123
  - !ruby/object:Gem::Version
134
124
  version: '0'
135
- segments:
136
- - 0
137
- hash: 775144890459674853
138
125
  requirements: []
139
126
  rubyforge_project:
140
- rubygems_version: 1.8.25
127
+ rubygems_version: 2.0.5
141
128
  signing_key:
142
- specification_version: 3
129
+ specification_version: 4
143
130
  summary: A Ruby interface for the the Kerberos library
144
131
  test_files:
145
- - test/test_config.rb
146
- - test/test_krb5_keytab.rb
132
+ - test/test_policy.rb
147
133
  - test/test_keytab_entry.rb
148
134
  - test/test_context.rb
135
+ - test/test_kadm5.rb
149
136
  - test/test_principal.rb
150
137
  - test/test_credentials_cache.rb
138
+ - test/test_config.rb
151
139
  - test/test_krb5.rb
152
- - test/test_kadm5.rb
153
- - test/test_policy.rb
140
+ - test/test_krb5_keytab.rb
data/Gemfile.lock DELETED
@@ -1,26 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- rkerberos (0.1.2)
5
- rake-compiler
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- dbi-dbrc (1.1.9)
11
- sys-admin (>= 1.5.2)
12
- ffi (1.9.0)
13
- rake (10.1.0)
14
- rake-compiler (0.8.3)
15
- rake
16
- sys-admin (1.6.0)
17
- ffi (>= 1.1.0)
18
- test-unit (2.5.5)
19
-
20
- PLATFORMS
21
- ruby
22
-
23
- DEPENDENCIES
24
- dbi-dbrc (>= 1.1.6)
25
- rkerberos!
26
- test-unit (>= 2.1.0)