net-ldap 0.1.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of net-ldap might be problematic. Click here for more details.

Files changed (58) hide show
  1. data/.autotest +11 -0
  2. data/.gemtest +0 -0
  3. data/.rspec +2 -0
  4. data/Contributors.rdoc +21 -0
  5. data/Hacking.rdoc +68 -0
  6. data/{History.txt → History.rdoc} +65 -1
  7. data/License.rdoc +29 -0
  8. data/Manifest.txt +25 -14
  9. data/README.rdoc +52 -0
  10. data/Rakefile +52 -96
  11. data/autotest/discover.rb +1 -0
  12. data/lib/net-ldap.rb +1 -0
  13. data/lib/net/ber.rb +302 -81
  14. data/lib/net/ber/ber_parser.rb +153 -97
  15. data/lib/net/ber/core_ext.rb +62 -0
  16. data/lib/net/ber/core_ext/array.rb +82 -0
  17. data/lib/net/ber/core_ext/bignum.rb +22 -0
  18. data/lib/net/ber/core_ext/false_class.rb +10 -0
  19. data/lib/net/ber/core_ext/fixnum.rb +66 -0
  20. data/lib/net/ber/core_ext/string.rb +48 -0
  21. data/lib/net/ber/core_ext/true_class.rb +12 -0
  22. data/lib/net/ldap.rb +1455 -1475
  23. data/lib/net/ldap/dataset.rb +134 -79
  24. data/lib/net/ldap/dn.rb +225 -0
  25. data/lib/net/ldap/entry.rb +168 -249
  26. data/lib/net/ldap/filter.rb +654 -387
  27. data/lib/net/ldap/password.rb +31 -0
  28. data/lib/net/ldap/pdu.rb +232 -233
  29. data/lib/net/snmp.rb +4 -31
  30. data/net-ldap.gemspec +59 -0
  31. data/spec/integration/ssl_ber_spec.rb +3 -0
  32. data/spec/spec_helper.rb +2 -2
  33. data/spec/unit/ber/ber_spec.rb +82 -6
  34. data/spec/unit/ber/core_ext/string_spec.rb +51 -0
  35. data/spec/unit/ldap/dn_spec.rb +80 -0
  36. data/spec/unit/ldap/entry_spec.rb +51 -0
  37. data/spec/unit/ldap/filter_spec.rb +84 -0
  38. data/spec/unit/ldap_spec.rb +48 -0
  39. data/test/test_entry.rb +54 -2
  40. data/test/test_filter.rb +93 -54
  41. data/test/test_ldap_connection.rb +24 -0
  42. data/test/test_ldif.rb +31 -23
  43. data/test/test_rename.rb +77 -0
  44. data/test/test_snmp.rb +34 -33
  45. metadata +88 -52
  46. data/COPYING +0 -272
  47. data/LICENSE +0 -56
  48. data/README.txt +0 -68
  49. data/lib/net/ldap/core_ext/all.rb +0 -43
  50. data/lib/net/ldap/core_ext/array.rb +0 -42
  51. data/lib/net/ldap/core_ext/bignum.rb +0 -25
  52. data/lib/net/ldap/core_ext/false_class.rb +0 -11
  53. data/lib/net/ldap/core_ext/fixnum.rb +0 -74
  54. data/lib/net/ldap/core_ext/string.rb +0 -40
  55. data/lib/net/ldap/core_ext/true_class.rb +0 -11
  56. data/lib/net/ldap/psw.rb +0 -57
  57. data/lib/net/ldif.rb +0 -34
  58. data/test/test_ber.rb +0 -78
@@ -4,29 +4,38 @@ require 'common'
4
4
  require 'net/snmp'
5
5
 
6
6
  class TestSnmp < Test::Unit::TestCase
7
-
8
7
  SnmpGetRequest = "0'\002\001\000\004\006public\240\032\002\002?*\002\001\000\002\001\0000\0160\f\006\b+\006\001\002\001\001\001\000\005\000"
9
8
  SnmpGetResponse = "0+\002\001\000\004\006public\242\036\002\002'\017\002\001\000\002\001\0000\0220\020\006\b+\006\001\002\001\001\001\000\004\004test"
10
9
 
11
10
  SnmpGetRequestXXX = "0'\002\001\000\004\006xxxxxx\240\032\002\002?*\002\001\000\002\001\0000\0160\f\006\b+\006\001\002\001\001\001\000\005\000"
12
11
 
13
-
14
- def setup
15
- end
16
-
17
- def teardown
18
- end
19
-
20
12
  def test_invalid_packet
21
13
  data = "xxxx"
22
- assert_raise( Net::BER::BerError ) {
14
+ assert_raise(Net::BER::BerError) {
23
15
  ary = data.read_ber(Net::SNMP::AsnSyntax)
24
16
  }
17
+ end
25
18
 
19
+ # The method String#read_ber! added by Net::BER consumes a well-formed BER
20
+ # object from the head of a string. If it doesn't find a complete,
21
+ # well-formed BER object, it returns nil and leaves the string unchanged.
22
+ # If it finds an object, it returns the object and removes it from the
23
+ # head of the string. This is good for handling partially-received data
24
+ # streams, such as from network connections.
25
+ def _test_consume_string
26
+ data = "xxx"
27
+ assert_equal(nil, data.read_ber!)
28
+ assert_equal("xxx", data)
29
+
30
+ data = SnmpGetRequest + "!!!"
31
+ ary = data.read_ber!(Net::SNMP::AsnSyntax)
32
+ assert_equal("!!!", data)
33
+ assert ary.is_a?(Array)
34
+ assert ary.is_a?(Net::BER::BerIdentifiedArray)
26
35
  end
27
36
 
28
37
  def test_weird_packet
29
- assert_raise( Net::SnmpPdu::Error ) {
38
+ assert_raise(Net::SnmpPdu::Error) {
30
39
  Net::SnmpPdu.parse("aaaaaaaaaaaaaa")
31
40
  }
32
41
  end
@@ -35,39 +44,33 @@ Net::SnmpPdu.parse("aaaaaaaaaaaaaa")
35
44
  data = SnmpGetRequest.dup
36
45
  pkt = data.read_ber(Net::SNMP::AsnSyntax)
37
46
  assert pkt.is_a?(Net::BER::BerIdentifiedArray)
38
- assert_equal( 48, pkt.ber_identifier) # Constructed [0], signifies GetRequest
47
+ assert_equal(48, pkt.ber_identifier) # Constructed [0], signifies GetRequest
39
48
 
40
49
  pdu = Net::SnmpPdu.parse(pkt)
41
- assert_equal(:get_request, pdu.pdu_type )
42
- assert_equal(16170, pdu.request_id ) # whatever was in the test data. 16170 is not magic.
43
- assert_equal( [[[1,3,6,1,2,1,1,1,0],nil]], pdu.variables )
50
+ assert_equal(:get_request, pdu.pdu_type)
51
+ assert_equal(16170, pdu.request_id) # whatever was in the test data. 16170 is not magic.
52
+ assert_equal([[[1, 3, 6, 1, 2, 1, 1, 1, 0], nil]], pdu.variables)
44
53
 
45
- assert_equal( pdu.to_ber_string, SnmpGetRequest )
54
+ assert_equal(pdu.to_ber_string, SnmpGetRequest)
46
55
  end
47
56
 
48
57
  def test_empty_pdu
49
58
  pdu = Net::SnmpPdu.new
50
- assert_raise( Net::SnmpPdu::Error ) {
51
- pdu.to_ber_string
52
- }
59
+ assert_raise(Net::SnmpPdu::Error) { pdu.to_ber_string }
53
60
  end
54
61
 
55
62
  def test_malformations
56
63
  pdu = Net::SnmpPdu.new
57
64
  pdu.version = 0
58
65
  pdu.version = 2
59
- assert_raise( Net::SnmpPdu::Error ) {
60
- pdu.version = 100
61
- }
66
+ assert_raise(Net::SnmpPdu::Error) { pdu.version = 100 }
62
67
 
63
68
  pdu.pdu_type = :get_request
64
69
  pdu.pdu_type = :get_next_request
65
70
  pdu.pdu_type = :get_response
66
71
  pdu.pdu_type = :set_request
67
72
  pdu.pdu_type = :trap
68
- assert_raise( Net::SnmpPdu::Error ) {
69
- pdu.pdu_type = :something_else
70
- }
73
+ assert_raise(Net::SnmpPdu::Error) { pdu.pdu_type = :something_else }
71
74
  end
72
75
 
73
76
  def test_make_response
@@ -78,9 +81,9 @@ pdu.to_ber_string
78
81
  pdu.request_id = 9999
79
82
  pdu.error_status = 0
80
83
  pdu.error_index = 0
81
- pdu.add_variable_binding [1,3,6,1,2,1,1,1,0], "test"
84
+ pdu.add_variable_binding [1, 3, 6, 1, 2, 1, 1, 1, 0], "test"
82
85
 
83
- assert_equal( SnmpGetResponse, pdu.to_ber_string )
86
+ assert_equal(SnmpGetResponse, pdu.to_ber_string)
84
87
  end
85
88
 
86
89
  def test_make_bad_response
@@ -94,20 +97,18 @@ pdu.to_ber_string
94
97
 
95
98
  def test_snmp_integers
96
99
  c32 = Net::SNMP::Counter32.new(100)
97
- assert_equal( "A\001d", c32.to_ber )
100
+ assert_equal("A\001d", c32.to_ber)
98
101
  g32 = Net::SNMP::Gauge32.new(100)
99
- assert_equal( "B\001d", g32.to_ber )
102
+ assert_equal("B\001d", g32.to_ber)
100
103
  t32 = Net::SNMP::TimeTicks32.new(100)
101
- assert_equal( "C\001d", t32.to_ber )
104
+ assert_equal("C\001d", t32.to_ber)
102
105
  end
103
106
 
104
107
  def test_community
105
108
  data = SnmpGetRequestXXX.dup
106
109
  ary = data.read_ber(Net::SNMP::AsnSyntax)
107
- pdu = Net::SnmpPdu.parse( ary )
108
- assert_equal( "xxxxxx", pdu.community )
110
+ pdu = Net::SnmpPdu.parse(ary)
111
+ assert_equal("xxxxxx", pdu.community)
109
112
  end
110
113
 
111
114
  end
112
-
113
-
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-ldap
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ hash: 15
5
+ prerelease:
5
6
  segments:
6
7
  - 0
7
- - 1
8
- - 1
9
- version: 0.1.1
8
+ - 2
9
+ version: "0.2"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Francis Cianfrocca
@@ -18,92 +18,108 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2010-03-18 00:00:00 -04:00
21
+ date: 2011-03-22 00:00:00 -04:00
22
22
  default_executable:
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency
25
- name: rubyforge
25
+ name: hoe-git
26
26
  prerelease: false
27
27
  requirement: &id001 !ruby/object:Gem::Requirement
28
+ none: false
28
29
  requirements:
29
- - - ">="
30
+ - - ~>
30
31
  - !ruby/object:Gem::Version
32
+ hash: 1
31
33
  segments:
32
- - 2
33
- - 0
34
- - 4
35
- version: 2.0.4
34
+ - 1
35
+ version: "1"
36
36
  type: :development
37
37
  version_requirements: *id001
38
38
  - !ruby/object:Gem::Dependency
39
- name: gemcutter
39
+ name: hoe-gemspec
40
40
  prerelease: false
41
41
  requirement: &id002 !ruby/object:Gem::Requirement
42
+ none: false
42
43
  requirements:
43
- - - ">="
44
+ - - ~>
44
45
  - !ruby/object:Gem::Version
46
+ hash: 1
45
47
  segments:
46
- - 0
47
- - 5
48
- - 0
49
- version: 0.5.0
48
+ - 1
49
+ version: "1"
50
50
  type: :development
51
51
  version_requirements: *id002
52
52
  - !ruby/object:Gem::Dependency
53
- name: archive-tar-minitar
53
+ name: metaid
54
54
  prerelease: false
55
55
  requirement: &id003 !ruby/object:Gem::Requirement
56
+ none: false
56
57
  requirements:
57
58
  - - ~>
58
59
  - !ruby/object:Gem::Version
60
+ hash: 1
59
61
  segments:
60
- - 0
61
- - 5
62
62
  - 1
63
- version: 0.5.1
63
+ version: "1"
64
64
  type: :development
65
65
  version_requirements: *id003
66
66
  - !ruby/object:Gem::Dependency
67
- name: hanna
67
+ name: flexmock
68
68
  prerelease: false
69
69
  requirement: &id004 !ruby/object:Gem::Requirement
70
+ none: false
70
71
  requirements:
71
72
  - - ~>
72
73
  - !ruby/object:Gem::Version
74
+ hash: 59
73
75
  segments:
74
76
  - 0
75
- - 1
76
- - 2
77
- version: 0.1.2
77
+ - 9
78
+ - 0
79
+ version: 0.9.0
78
80
  type: :development
79
81
  version_requirements: *id004
80
82
  - !ruby/object:Gem::Dependency
81
- name: hoe-git
83
+ name: rspec
82
84
  prerelease: false
83
85
  requirement: &id005 !ruby/object:Gem::Requirement
86
+ none: false
84
87
  requirements:
85
88
  - - ~>
86
89
  - !ruby/object:Gem::Version
90
+ hash: 3
87
91
  segments:
88
- - 1
89
- version: "1"
92
+ - 2
93
+ - 0
94
+ version: "2.0"
90
95
  type: :development
91
96
  version_requirements: *id005
92
97
  - !ruby/object:Gem::Dependency
93
98
  name: hoe
94
99
  prerelease: false
95
100
  requirement: &id006 !ruby/object:Gem::Requirement
101
+ none: false
96
102
  requirements:
97
103
  - - ">="
98
104
  - !ruby/object:Gem::Version
105
+ hash: 41
99
106
  segments:
100
107
  - 2
101
- - 5
102
- - 0
103
- version: 2.5.0
108
+ - 9
109
+ - 1
110
+ version: 2.9.1
104
111
  type: :development
105
112
  version_requirements: *id006
106
- description: Pure Ruby LDAP library.
113
+ description: "Net::LDAP for Ruby (also called net-ldap) implements client access for the\n\
114
+ Lightweight Directory Access Protocol (LDAP), an IETF standard protocol for\n\
115
+ accessing distributed directory services. Net::LDAP is written completely in\n\
116
+ Ruby with no external dependencies. It supports most LDAP client features and a\n\
117
+ subset of server features as well.\n\n\
118
+ Net::LDAP has been tested against modern popular LDAP servers including\n\
119
+ OpenLDAP and Active Directory. The current release is mostly compliant with\n\
120
+ earlier versions of the IETF LDAP RFCs (2251\xE2\x80\x932256, 2829\xE2\x80\x932830, 3377, and 3771).\n\
121
+ Our roadmap for Net::LDAP 1.0 is to gain full <em>client</em> compliance with\n\
122
+ the most recent LDAP RFCs (4510\xE2\x80\x934519, plus portions of 4520\xE2\x80\x934532)."
107
123
  email:
108
124
  - blackhedd@rubyforge.org
109
125
  - gemiel@gmail.com
@@ -115,48 +131,63 @@ executables: []
115
131
  extensions: []
116
132
 
117
133
  extra_rdoc_files:
118
- - History.txt
119
134
  - Manifest.txt
120
- - README.txt
135
+ - Contributors.rdoc
136
+ - Hacking.rdoc
137
+ - History.rdoc
138
+ - License.rdoc
139
+ - README.rdoc
121
140
  files:
122
- - COPYING
123
- - History.txt
124
- - LICENSE
141
+ - .autotest
142
+ - .rspec
143
+ - Contributors.rdoc
144
+ - Hacking.rdoc
145
+ - History.rdoc
146
+ - License.rdoc
125
147
  - Manifest.txt
126
- - README.txt
148
+ - README.rdoc
127
149
  - Rakefile
150
+ - autotest/discover.rb
128
151
  - lib/net-ldap.rb
129
152
  - lib/net/ber.rb
130
153
  - lib/net/ber/ber_parser.rb
154
+ - lib/net/ber/core_ext.rb
155
+ - lib/net/ber/core_ext/array.rb
156
+ - lib/net/ber/core_ext/bignum.rb
157
+ - lib/net/ber/core_ext/false_class.rb
158
+ - lib/net/ber/core_ext/fixnum.rb
159
+ - lib/net/ber/core_ext/string.rb
160
+ - lib/net/ber/core_ext/true_class.rb
131
161
  - lib/net/ldap.rb
132
- - lib/net/ldap/core_ext/all.rb
133
- - lib/net/ldap/core_ext/array.rb
134
- - lib/net/ldap/core_ext/bignum.rb
135
- - lib/net/ldap/core_ext/false_class.rb
136
- - lib/net/ldap/core_ext/fixnum.rb
137
- - lib/net/ldap/core_ext/string.rb
138
- - lib/net/ldap/core_ext/true_class.rb
139
162
  - lib/net/ldap/dataset.rb
163
+ - lib/net/ldap/dn.rb
140
164
  - lib/net/ldap/entry.rb
141
165
  - lib/net/ldap/filter.rb
166
+ - lib/net/ldap/password.rb
142
167
  - lib/net/ldap/pdu.rb
143
- - lib/net/ldap/psw.rb
144
- - lib/net/ldif.rb
145
168
  - lib/net/snmp.rb
169
+ - net-ldap.gemspec
146
170
  - spec/integration/ssl_ber_spec.rb
147
171
  - spec/spec.opts
148
172
  - spec/spec_helper.rb
149
173
  - spec/unit/ber/ber_spec.rb
174
+ - spec/unit/ber/core_ext/string_spec.rb
175
+ - spec/unit/ldap/dn_spec.rb
176
+ - spec/unit/ldap/entry_spec.rb
177
+ - spec/unit/ldap/filter_spec.rb
178
+ - spec/unit/ldap_spec.rb
150
179
  - test/common.rb
151
- - test/test_ber.rb
152
180
  - test/test_entry.rb
153
181
  - test/test_filter.rb
182
+ - test/test_ldap_connection.rb
154
183
  - test/test_ldif.rb
155
184
  - test/test_password.rb
185
+ - test/test_rename.rb
156
186
  - test/test_snmp.rb
157
187
  - test/testdata.ldif
158
188
  - testserver/ldapserver.rb
159
189
  - testserver/testdata.ldif
190
+ - .gemtest
160
191
  has_rdoc: true
161
192
  homepage: http://net-ldap.rubyforge.org/
162
193
  licenses: []
@@ -164,36 +195,41 @@ licenses: []
164
195
  post_install_message:
165
196
  rdoc_options:
166
197
  - --main
167
- - README.txt
198
+ - README.rdoc
168
199
  require_paths:
169
200
  - lib
170
201
  required_ruby_version: !ruby/object:Gem::Requirement
202
+ none: false
171
203
  requirements:
172
204
  - - ">="
173
205
  - !ruby/object:Gem::Version
206
+ hash: 57
174
207
  segments:
175
208
  - 1
176
209
  - 8
177
210
  - 7
178
211
  version: 1.8.7
179
212
  required_rubygems_version: !ruby/object:Gem::Requirement
213
+ none: false
180
214
  requirements:
181
215
  - - ">="
182
216
  - !ruby/object:Gem::Version
217
+ hash: 3
183
218
  segments:
184
219
  - 0
185
220
  version: "0"
186
221
  requirements: []
187
222
 
188
223
  rubyforge_project: net-ldap
189
- rubygems_version: 1.3.6
224
+ rubygems_version: 1.5.2
190
225
  signing_key:
191
226
  specification_version: 3
192
- summary: Pure Ruby LDAP support library with most client features and some server features.
227
+ summary: Net::LDAP for Ruby (also called net-ldap) implements client access for the Lightweight Directory Access Protocol (LDAP), an IETF standard protocol for accessing distributed directory services
193
228
  test_files:
194
- - test/test_ber.rb
195
229
  - test/test_entry.rb
196
230
  - test/test_filter.rb
231
+ - test/test_ldap_connection.rb
197
232
  - test/test_ldif.rb
198
233
  - test/test_password.rb
234
+ - test/test_rename.rb
199
235
  - test/test_snmp.rb
data/COPYING DELETED
@@ -1,272 +0,0 @@
1
- GNU GENERAL PUBLIC LICENSE
2
- Version 2, June 1991
3
-
4
- Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street,
5
- Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and
6
- distribute verbatim copies of this license document, but changing it is not
7
- allowed.
8
-
9
- Preamble
10
-
11
- The licenses for most software are designed to take away your freedom to
12
- share and change it. By contrast, the GNU General Public License is
13
- intended to guarantee your freedom to share and change free software--to
14
- make sure the software is free for all its users. This General Public
15
- License applies to most of the Free Software Foundation's software and to
16
- any other program whose authors commit to using it. (Some other Free
17
- Software Foundation software is covered by the GNU Lesser General Public
18
- License instead.) You can apply it to your programs, too.
19
-
20
- When we speak of free software, we are referring to freedom, not price. Our
21
- General Public Licenses are designed to make sure that you have the freedom
22
- to distribute copies of free software (and charge for this service if you
23
- wish), that you receive source code or can get it if you want it, that you
24
- can change the software or use pieces of it in new free programs; and that
25
- you know you can do these things.
26
-
27
- To protect your rights, we need to make restrictions that forbid anyone to
28
- deny you these rights or to ask you to surrender the rights. These
29
- restrictions translate to certain responsibilities for you if you distribute
30
- copies of the software, or if you modify it.
31
-
32
- For example, if you distribute copies of such a program, whether gratis or
33
- for a fee, you must give the recipients all the rights that you have. You
34
- must make sure that they, too, receive or can get the source code. And you
35
- must show them these terms so they know their rights.
36
-
37
- We protect your rights with two steps: (1) copyright the software, and (2)
38
- offer you this license which gives you legal permission to copy, distribute
39
- and/or modify the software.
40
-
41
- Also, for each author's protection and ours, we want to make certain that
42
- everyone understands that there is no warranty for this free software. If
43
- the software is modified by someone else and passed on, we want its
44
- recipients to know that what they have is not the original, so that any
45
- problems introduced by others will not reflect on the original authors'
46
- reputations.
47
-
48
- Finally, any free program is threatened constantly by software patents. We
49
- wish to avoid the danger that redistributors of a free program will
50
- individually obtain patent licenses, in effect making the program
51
- proprietary. To prevent this, we have made it clear that any patent must be
52
- licensed for everyone's free use or not licensed at all.
53
-
54
- The precise terms and conditions for copying, distribution and modification
55
- follow.
56
-
57
- GNU GENERAL PUBLIC LICENSE
58
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
59
-
60
- 0. This License applies to any program or other work which contains a notice
61
- placed by the copyright holder saying it may be distributed under the
62
- terms of this General Public License. The "Program", below, refers to
63
- any such program or work, and a "work based on the Program" means either
64
- the Program or any derivative work under copyright law: that is to say, a
65
- work containing the Program or a portion of it, either verbatim or with
66
- modifications and/or translated into another language. (Hereinafter,
67
- translation is included without limitation in the term "modification".)
68
- Each licensee is addressed as "you".
69
-
70
- Activities other than copying, distribution and modification are not
71
- covered by this License; they are outside its scope. The act of running
72
- the Program is not restricted, and the output from the Program is covered
73
- only if its contents constitute a work based on the Program (independent
74
- of having been made by running the Program). Whether that is true depends
75
- on what the Program does.
76
-
77
- 1. You may copy and distribute verbatim copies of the Program's source code
78
- as you receive it, in any medium, provided that you conspicuously and
79
- appropriately publish on each copy an appropriate copyright notice and
80
- disclaimer of warranty; keep intact all the notices that refer to this
81
- License and to the absence of any warranty; and give any other recipients
82
- of the Program a copy of this License along with the Program.
83
-
84
- You may charge a fee for the physical act of transferring a copy, and you
85
- may at your option offer warranty protection in exchange for a fee.
86
-
87
- 2. You may modify your copy or copies of the Program or any portion of it,
88
- thus forming a work based on the Program, and copy and distribute such
89
- modifications or work under the terms of Section 1 above, provided that
90
- you also meet all of these conditions:
91
-
92
- a) You must cause the modified files to carry prominent notices stating
93
- that you changed the files and the date of any change.
94
-
95
- b) You must cause any work that you distribute or publish, that in whole
96
- or in part contains or is derived from the Program or any part
97
- thereof, to be licensed as a whole at no charge to all third parties
98
- under the terms of this License.
99
-
100
- c) If the modified program normally reads commands interactively when
101
- run, you must cause it, when started running for such interactive use
102
- in the most ordinary way, to print or display an announcement
103
- including an appropriate copyright notice and a notice that there is
104
- no warranty (or else, saying that you provide a warranty) and that
105
- users may redistribute the program under these conditions, and telling
106
- the user how to view a copy of this License. (Exception: if the
107
- Program itself is interactive but does not normally print such an
108
- announcement, your work based on the Program is not required to print
109
- an announcement.)
110
-
111
- These requirements apply to the modified work as a whole. If
112
- identifiable sections of that work are not derived from the Program, and
113
- can be reasonably considered independent and separate works in
114
- themselves, then this License, and its terms, do not apply to those
115
- sections when you distribute them as separate works. But when you
116
- distribute the same sections as part of a whole which is a work based on
117
- the Program, the distribution of the whole must be on the terms of this
118
- License, whose permissions for other licensees extend to the entire
119
- whole, and thus to each and every part regardless of who wrote it.
120
-
121
- Thus, it is not the intent of this section to claim rights or contest
122
- your rights to work written entirely by you; rather, the intent is to
123
- exercise the right to control the distribution of derivative or
124
- collective works based on the Program.
125
-
126
- In addition, mere aggregation of another work not based on the Program
127
- with the Program (or with a work based on the Program) on a volume of a
128
- storage or distribution medium does not bring the other work under the
129
- scope of this License.
130
-
131
- 3. You may copy and distribute the Program (or a work based on it, under
132
- Section 2) in object code or executable form under the terms of Sections
133
- 1 and 2 above provided that you also do one of the following:
134
-
135
- a) Accompany it with the complete corresponding machine-readable source
136
- code, which must be distributed under the terms of Sections 1 and 2
137
- above on a medium customarily used for software interchange; or,
138
-
139
- b) Accompany it with a written offer, valid for at least three years, to
140
- give any third party, for a charge no more than your cost of
141
- physically performing source distribution, a complete machine-readable
142
- copy of the corresponding source code, to be distributed under the
143
- terms of Sections 1 and 2 above on a medium customarily used for
144
- software interchange; or,
145
-
146
- c) Accompany it with the information you received as to the offer to
147
- distribute corresponding source code. (This alternative is allowed
148
- only for noncommercial distribution and only if you received the
149
- program in object code or executable form with such an offer, in
150
- accord with Subsection b above.)
151
-
152
- The source code for a work means the preferred form of the work for
153
- making modifications to it. For an executable work, complete source code
154
- means all the source code for all modules it contains, plus any
155
- associated interface definition files, plus the scripts used to control
156
- compilation and installation of the executable. However, as a special
157
- exception, the source code distributed need not include anything that is
158
- normally distributed (in either source or binary form) with the major
159
- components (compiler, kernel, and so on) of the operating system on which
160
- the executable runs, unless that component itself accompanies the
161
- executable.
162
-
163
- If distribution of executable or object code is made by offering access
164
- to copy from a designated place, then offering equivalent access to copy
165
- the source code from the same place counts as distribution of the source
166
- code, even though third parties are not compelled to copy the source
167
- along with the object code.
168
-
169
- 4. You may not copy, modify, sublicense, or distribute the Program except as
170
- expressly provided under this License. Any attempt otherwise to copy,
171
- modify, sublicense or distribute the Program is void, and will
172
- automatically terminate your rights under this License. However, parties
173
- who have received copies, or rights, from you under this License will not
174
- have their licenses terminated so long as such parties remain in full
175
- compliance.
176
-
177
- 5. You are not required to accept this License, since you have not signed
178
- it. However, nothing else grants you permission to modify or distribute
179
- the Program or its derivative works. These actions are prohibited by law
180
- if you do not accept this License. Therefore, by modifying or
181
- distributing the Program (or any work based on the Program), you indicate
182
- your acceptance of this License to do so, and all its terms and
183
- conditions for copying, distributing or modifying the Program or works
184
- based on it.
185
-
186
- 6. Each time you redistribute the Program (or any work based on the
187
- Program), the recipient automatically receives a license from the
188
- original licensor to copy, distribute or modify the Program subject to
189
- these terms and conditions. You may not impose any further restrictions
190
- on the recipients' exercise of the rights granted herein. You are not
191
- responsible for enforcing compliance by third parties to this License.
192
-
193
- 7. If, as a consequence of a court judgment or allegation of patent
194
- infringement or for any other reason (not limited to patent issues),
195
- conditions are imposed on you (whether by court order, agreement or
196
- otherwise) that contradict the conditions of this License, they do not
197
- excuse you from the conditions of this License. If you cannot distribute
198
- so as to satisfy simultaneously your obligations under this License and
199
- any other pertinent obligations, then as a consequence you may not
200
- distribute the Program at all. For example, if a patent license would
201
- not permit royalty-free redistribution of the Program by all those who
202
- receive copies directly or indirectly through you, then the only way you
203
- could satisfy both it and this License would be to refrain entirely from
204
- distribution of the Program.
205
-
206
- If any portion of this section is held invalid or unenforceable under any
207
- particular circumstance, the balance of the section is intended to apply
208
- and the section as a whole is intended to apply in other circumstances.
209
-
210
- It is not the purpose of this section to induce you to infringe any
211
- patents or other property right claims or to contest validity of any such
212
- claims; this section has the sole purpose of protecting the integrity of
213
- the free software distribution system, which is implemented by public
214
- license practices. Many people have made generous contributions to the
215
- wide range of software distributed through that system in reliance on
216
- consistent application of that system; it is up to the author/donor to
217
- decide if he or she is willing to distribute software through any other
218
- system and a licensee cannot impose that choice.
219
-
220
- This section is intended to make thoroughly clear what is believed to be
221
- a consequence of the rest of this License.
222
-
223
- 8. If the distribution and/or use of the Program is restricted in certain
224
- countries either by patents or by copyrighted interfaces, the original
225
- copyright holder who places the Program under this License may add an
226
- explicit geographical distribution limitation excluding those countries,
227
- so that distribution is permitted only in or among countries not thus
228
- excluded. In such case, this License incorporates the limitation as if
229
- written in the body of this License.
230
-
231
- 9. The Free Software Foundation may publish revised and/or new versions of
232
- the General Public License from time to time. Such new versions will be
233
- similar in spirit to the present version, but may differ in detail to
234
- address new problems or concerns.
235
-
236
- Each version is given a distinguishing version number. If the Program
237
- specifies a version number of this License which applies to it and "any
238
- later version", you have the option of following the terms and conditions
239
- either of that version or of any later version published by the Free
240
- Software Foundation. If the Program does not specify a version number of
241
- this License, you may choose any version ever published by the Free
242
- Software Foundation.
243
-
244
- 10. If you wish to incorporate parts of the Program into other free programs
245
- whose distribution conditions are different, write to the author to ask
246
- for permission. For software which is copyrighted by the Free Software
247
- Foundation, write to the Free Software Foundation; we sometimes make
248
- exceptions for this. Our decision will be guided by the two goals of
249
- preserving the free status of all derivatives of our free software and
250
- of promoting the sharing and reuse of software generally.
251
-
252
- NO WARRANTY
253
-
254
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
255
- THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
256
- OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
257
- PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
258
- EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
259
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
260
- ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH
261
- YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
262
- NECESSARY SERVICING, REPAIR OR CORRECTION.
263
-
264
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
265
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
266
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
267
- DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
268
- DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM
269
- (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
270
- INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
271
- THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR
272
- OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.