ruby-activeldap 0.8.3 → 0.8.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +431 -0
- data/COPYING +340 -0
- data/LICENSE +58 -0
- data/README +104 -0
- data/Rakefile +165 -0
- data/TODO +22 -0
- data/benchmark/bench-al.rb +202 -0
- data/benchmark/config.yaml.sample +5 -0
- data/data/locale/en/LC_MESSAGES/active-ldap.mo +0 -0
- data/data/locale/ja/LC_MESSAGES/active-ldap.mo +0 -0
- data/examples/al-admin/README +182 -0
- data/examples/al-admin/Rakefile +10 -0
- data/examples/al-admin/app/controllers/account_controller.rb +50 -0
- data/examples/al-admin/app/controllers/application.rb +15 -0
- data/examples/al-admin/app/controllers/directory_controller.rb +22 -0
- data/examples/al-admin/app/controllers/users_controller.rb +38 -0
- data/examples/al-admin/app/controllers/welcome_controller.rb +4 -0
- data/examples/al-admin/app/helpers/account_helper.rb +2 -0
- data/examples/al-admin/app/helpers/application_helper.rb +6 -0
- data/examples/al-admin/app/helpers/directory_helper.rb +2 -0
- data/examples/al-admin/app/helpers/users_helper.rb +13 -0
- data/examples/al-admin/app/helpers/welcome_helper.rb +2 -0
- data/examples/al-admin/app/models/entry.rb +19 -0
- data/examples/al-admin/app/models/ldap_user.rb +49 -0
- data/examples/al-admin/app/models/user.rb +91 -0
- data/examples/al-admin/app/views/account/login.rhtml +12 -0
- data/examples/al-admin/app/views/account/sign_up.rhtml +22 -0
- data/examples/al-admin/app/views/directory/index.rhtml +5 -0
- data/examples/al-admin/app/views/directory/populate.rhtml +2 -0
- data/examples/al-admin/app/views/layouts/application.rhtml +41 -0
- data/examples/al-admin/app/views/users/_attribute_information.rhtml +22 -0
- data/examples/al-admin/app/views/users/_entry.rhtml +12 -0
- data/examples/al-admin/app/views/users/_form.rhtml +29 -0
- data/examples/al-admin/app/views/users/_object_class_information.rhtml +23 -0
- data/examples/al-admin/app/views/users/edit.rhtml +10 -0
- data/examples/al-admin/app/views/users/index.rhtml +9 -0
- data/examples/al-admin/app/views/users/show.rhtml +3 -0
- data/examples/al-admin/app/views/welcome/index.rhtml +16 -0
- data/examples/al-admin/config/boot.rb +45 -0
- data/examples/al-admin/config/database.yml.example +19 -0
- data/examples/al-admin/config/environment.rb +68 -0
- data/examples/al-admin/config/environments/development.rb +21 -0
- data/examples/al-admin/config/environments/production.rb +18 -0
- data/examples/al-admin/config/environments/test.rb +19 -0
- data/examples/al-admin/config/ldap.yml.example +21 -0
- data/examples/al-admin/config/routes.rb +26 -0
- data/examples/al-admin/db/migrate/001_create_users.rb +16 -0
- data/examples/al-admin/lib/accept_http_rails_relative_url_root.rb +9 -0
- data/examples/al-admin/lib/authenticated_system.rb +131 -0
- data/examples/al-admin/lib/authenticated_test_helper.rb +113 -0
- data/examples/al-admin/lib/tasks/gettext.rake +35 -0
- data/examples/al-admin/po/en/al-admin.po +190 -0
- data/examples/al-admin/po/ja/al-admin.po +190 -0
- data/examples/al-admin/po/nl/al-admin.po +202 -0
- data/examples/al-admin/public/.htaccess +40 -0
- data/examples/al-admin/public/404.html +30 -0
- data/examples/al-admin/public/500.html +30 -0
- data/examples/al-admin/public/dispatch.cgi +10 -0
- data/examples/al-admin/public/dispatch.fcgi +24 -0
- data/examples/al-admin/public/dispatch.rb +10 -0
- data/examples/al-admin/public/favicon.ico +0 -0
- data/examples/al-admin/public/images/rails.png +0 -0
- data/examples/al-admin/public/javascripts/application.js +2 -0
- data/examples/al-admin/public/javascripts/controls.js +833 -0
- data/examples/al-admin/public/javascripts/dragdrop.js +942 -0
- data/examples/al-admin/public/javascripts/effects.js +1088 -0
- data/examples/al-admin/public/javascripts/prototype.js +2515 -0
- data/examples/al-admin/public/robots.txt +1 -0
- data/examples/al-admin/public/stylesheets/rails.css +35 -0
- data/examples/al-admin/public/stylesheets/screen.css +52 -0
- data/examples/al-admin/script/about +3 -0
- data/examples/al-admin/script/breakpointer +3 -0
- data/examples/al-admin/script/console +3 -0
- data/examples/al-admin/script/destroy +3 -0
- data/examples/al-admin/script/generate +3 -0
- data/examples/al-admin/script/performance/benchmarker +3 -0
- data/examples/al-admin/script/performance/profiler +3 -0
- data/examples/al-admin/script/plugin +3 -0
- data/examples/al-admin/script/process/inspector +3 -0
- data/examples/al-admin/script/process/reaper +3 -0
- data/examples/al-admin/script/process/spawner +3 -0
- data/examples/al-admin/script/runner +3 -0
- data/examples/al-admin/script/server +3 -0
- data/examples/al-admin/test/fixtures/users.yml +9 -0
- data/examples/al-admin/test/functional/account_controller_test.rb +24 -0
- data/examples/al-admin/test/functional/directory_controller_test.rb +18 -0
- data/examples/al-admin/test/functional/users_controller_test.rb +18 -0
- data/examples/al-admin/test/functional/welcome_controller_test.rb +18 -0
- data/examples/al-admin/test/run-test.sh +3 -0
- data/examples/al-admin/test/test_helper.rb +28 -0
- data/examples/al-admin/test/unit/user_test.rb +13 -0
- data/examples/al-admin/vendor/plugins/exception_notification/README +111 -0
- data/examples/al-admin/vendor/plugins/exception_notification/init.rb +1 -0
- data/examples/al-admin/vendor/plugins/exception_notification/lib/exception_notifiable.rb +99 -0
- data/examples/al-admin/vendor/plugins/exception_notification/lib/exception_notifier.rb +67 -0
- data/examples/al-admin/vendor/plugins/exception_notification/lib/exception_notifier_helper.rb +77 -0
- data/examples/al-admin/vendor/plugins/exception_notification/test/exception_notifier_helper_test.rb +61 -0
- data/examples/al-admin/vendor/plugins/exception_notification/test/test_helper.rb +7 -0
- data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_backtrace.rhtml +1 -0
- data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_environment.rhtml +7 -0
- data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_inspect_model.rhtml +16 -0
- data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_request.rhtml +3 -0
- data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_session.rhtml +2 -0
- data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_title.rhtml +3 -0
- data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/exception_notification.rhtml +6 -0
- data/examples/config.yaml.example +5 -0
- data/examples/example.der +0 -0
- data/examples/example.jpg +0 -0
- data/examples/groupadd +41 -0
- data/examples/groupdel +35 -0
- data/examples/groupls +49 -0
- data/examples/groupmod +42 -0
- data/examples/lpasswd +55 -0
- data/examples/objects/group.rb +13 -0
- data/examples/objects/ou.rb +4 -0
- data/examples/objects/user.rb +20 -0
- data/examples/ouadd +38 -0
- data/examples/useradd +45 -0
- data/examples/useradd-binary +50 -0
- data/examples/userdel +34 -0
- data/examples/userls +50 -0
- data/examples/usermod +42 -0
- data/examples/usermod-binary-add +47 -0
- data/examples/usermod-binary-add-time +51 -0
- data/examples/usermod-binary-del +48 -0
- data/examples/usermod-lang-add +43 -0
- data/lib/active_ldap.rb +978 -0
- data/lib/active_ldap/adapter/base.rb +512 -0
- data/lib/active_ldap/adapter/ldap.rb +233 -0
- data/lib/active_ldap/adapter/ldap_ext.rb +69 -0
- data/lib/active_ldap/adapter/net_ldap.rb +290 -0
- data/lib/active_ldap/adapter/net_ldap_ext.rb +29 -0
- data/lib/active_ldap/association/belongs_to.rb +47 -0
- data/lib/active_ldap/association/belongs_to_many.rb +42 -0
- data/lib/active_ldap/association/collection.rb +83 -0
- data/lib/active_ldap/association/has_many.rb +31 -0
- data/lib/active_ldap/association/has_many_utils.rb +35 -0
- data/lib/active_ldap/association/has_many_wrap.rb +46 -0
- data/lib/active_ldap/association/proxy.rb +102 -0
- data/lib/active_ldap/associations.rb +172 -0
- data/lib/active_ldap/attributes.rb +211 -0
- data/lib/active_ldap/base.rb +1256 -0
- data/lib/active_ldap/callbacks.rb +19 -0
- data/lib/active_ldap/command.rb +48 -0
- data/lib/active_ldap/configuration.rb +114 -0
- data/lib/active_ldap/connection.rb +234 -0
- data/lib/active_ldap/distinguished_name.rb +250 -0
- data/lib/active_ldap/escape.rb +12 -0
- data/lib/active_ldap/get_text/parser.rb +142 -0
- data/lib/active_ldap/get_text_fallback.rb +53 -0
- data/lib/active_ldap/get_text_support.rb +12 -0
- data/lib/active_ldap/helper.rb +23 -0
- data/lib/active_ldap/ldap_error.rb +74 -0
- data/lib/active_ldap/object_class.rb +93 -0
- data/lib/active_ldap/operations.rb +419 -0
- data/lib/active_ldap/populate.rb +44 -0
- data/lib/active_ldap/schema.rb +427 -0
- data/lib/active_ldap/timeout.rb +75 -0
- data/lib/active_ldap/timeout_stub.rb +17 -0
- data/lib/active_ldap/user_password.rb +93 -0
- data/lib/active_ldap/validations.rb +112 -0
- data/po/en/active-ldap.po +3011 -0
- data/po/ja/active-ldap.po +3044 -0
- data/rails/plugin/active_ldap/README +54 -0
- data/rails/plugin/active_ldap/generators/scaffold_al/scaffold_al_generator.rb +7 -0
- data/rails/plugin/active_ldap/generators/scaffold_al/templates/ldap.yml +21 -0
- data/rails/plugin/active_ldap/init.rb +19 -0
- data/test/al-test-utils.rb +362 -0
- data/test/command.rb +62 -0
- data/test/config.yaml.sample +6 -0
- data/test/run-test.rb +31 -0
- data/test/test-unit-ext.rb +4 -0
- data/test/test-unit-ext/always-show-result.rb +28 -0
- data/test/test-unit-ext/backtrace-filter.rb +17 -0
- data/test/test-unit-ext/long-display-for-emacs.rb +25 -0
- data/test/test-unit-ext/priority.rb +163 -0
- metadata +211 -4
data/CHANGES
ADDED
@@ -0,0 +1,431 @@
|
|
1
|
+
0.8.3.1:
|
2
|
+
* Fix broken gem
|
3
|
+
0.8.3:
|
4
|
+
* Added AL-Admin Sample Rails app
|
5
|
+
* Added Ruby-GetText-Package support
|
6
|
+
* Added a Rails plugin
|
7
|
+
* Improved schema handling
|
8
|
+
* Improved performance
|
9
|
+
* Many bug fixes
|
10
|
+
0.8.2:
|
11
|
+
* Added Net::LDAP support!
|
12
|
+
* supported SASL Digest-MD5 authentication with Net::LDAP.
|
13
|
+
* improved LDAP server support:
|
14
|
+
* improved Sun DS support.
|
15
|
+
* improved ActiveDirectory support. Thanks to Ernie Miller!
|
16
|
+
* improved Fedora-DS support. Thanks to by Daniel Pfile!
|
17
|
+
* improved existing functions:
|
18
|
+
* improved DN handling. Thanks to James Hughes!
|
19
|
+
* improved SASL bind.
|
20
|
+
* improved old API check.
|
21
|
+
* improved schema handling. Thanks to Christoph Lipp!
|
22
|
+
* improved filter notification.
|
23
|
+
* updated documents:
|
24
|
+
* updated Rails realted documenation. Thanks to James Hughes!
|
25
|
+
* updated documentation for the changes between 0.7.1 and 0.8.0.
|
26
|
+
Thanks to Buzz Chopra!
|
27
|
+
* added new features:
|
28
|
+
* added scaffold_al generator for Rails.
|
29
|
+
* added required_classes to default filter value. Thanks to Jeff Hall!
|
30
|
+
* added :recommended_classes option to ldap_mapping.
|
31
|
+
* added :sort_by and :order options to find.
|
32
|
+
* added ActiveLdap::Base#to_param for ActionController.
|
33
|
+
* fixed some bugs:
|
34
|
+
* fixed rake install/uninstall.
|
35
|
+
* fixed typos. Thanks to Nobody!
|
36
|
+
* fixed required_classes initialization. Thanks to James Hughes!
|
37
|
+
|
38
|
+
0.8.1:
|
39
|
+
* used Dependencies.load_paths.
|
40
|
+
* check whether attribute name is available or not.
|
41
|
+
* added test for find(:first, :attribute => 'xxx', :value => 'yyy').
|
42
|
+
* supported ActiveSupport 1.4.0.
|
43
|
+
* make the dual licensing of ruby-activeldap clear in the README.
|
44
|
+
* followed edge Rails: don't use Reloadable::Subclasses if doesn't need.
|
45
|
+
* added examples/.
|
46
|
+
* removed debug code.
|
47
|
+
* normalized attribute name to support wrong attribute names in MUST/MAY.
|
48
|
+
* supported getting dn value by Base#[].
|
49
|
+
* test/test_userls.rb: followed userls changes.
|
50
|
+
* update the doc href.
|
51
|
+
* provide a dumb example of how to use the old association(return_objects) style API with the new awesome API.
|
52
|
+
* followed new API.
|
53
|
+
* removed a finished task: support Reloadable::Subclasses.
|
54
|
+
|
55
|
+
0.8.0:
|
56
|
+
* Makefile/gemspec system replaced with Rakefile + Hoe
|
57
|
+
* Bugfix: Allow base to be empty
|
58
|
+
* Add support for Date, DateTime, and Time objects (patch from Patrick Cole)
|
59
|
+
* Add support for a :filter argument to override the default attr=val LDAP search filter in find_all() and find() (patch from Patrick Cole)
|
60
|
+
* Add Base#update_attributes(hash) method which does bulk updates to attributes (patch from Patrick Cole) and saves immediately
|
61
|
+
* API CHANGE: #attributes now returns a Hash of attribute_name => clone(attribute_val)
|
62
|
+
* API CHANGE: #attribute_names now returns an alphabetically sorted list of attribute names
|
63
|
+
* API CHANGE;
|
64
|
+
* Added attributes=() as the implementation for update_attributes(hash) (without autosave)
|
65
|
+
* API TRANSITION: Base#write is now deprecated. Please use Base#save
|
66
|
+
* API TRANSITION: Added SaveError exception (which is a subclass of WriteError for now)
|
67
|
+
* API TRANSITION: Base.connect() is now deprecated. Please use Base.establish_connection()
|
68
|
+
* API TRANSITION: Base.close() is now deprecated. Please use Base.remove_connection()
|
69
|
+
* API TRANSITION: :bind_format and :user of Base.establish_connection() are now deprecated. Please use :bind_dn
|
70
|
+
* Added update_attribute(name, value) to update one attribute and save immediately
|
71
|
+
* #delete -> #destroy
|
72
|
+
* Base.destroy_all
|
73
|
+
* Base.delete(id) & Base.delete_all(filter)
|
74
|
+
* add Base.exists?(dnattr_val)
|
75
|
+
* attr_protected
|
76
|
+
* Base.update(dnattr_val, attributes_hash) - instantiate, update, save, return
|
77
|
+
* Base.update_all(updates_hash, filter)
|
78
|
+
* attribute_present?(attribute) - if not empty/nil
|
79
|
+
* has_attribute?(attr_name) - if in hash
|
80
|
+
* reload() (refetch from LDAP)
|
81
|
+
* make save() return false on fail
|
82
|
+
* make save!() raise EntryNotSaved exception
|
83
|
+
* to_xml()
|
84
|
+
* clear_active_connections!() -- Conn per class
|
85
|
+
- make @@active_connections and name them by
|
86
|
+
* base_class() (just return the ancestor)
|
87
|
+
* Separate ObjectClass changes to live in ActiveLDAP::ObjectClass
|
88
|
+
- add_objectclass
|
89
|
+
- remove_objectclass
|
90
|
+
- replace_objectclass
|
91
|
+
- disallow direct objectclass access?
|
92
|
+
# - e.g. Person.reset_column_information
|
93
|
+
# - this would mean cleaner loading I think
|
94
|
+
* support ActiveRecord::Validations.
|
95
|
+
* support ActiveRecord::Callbacks.
|
96
|
+
* rename to ActiveLdap from ActiveLDAP to integrate RoR easily and enforce
|
97
|
+
many API changes.
|
98
|
+
|
99
|
+
0.7.4:
|
100
|
+
* Bugfix: do not base LDAP::PrettyError on RuntimeError due to rescue evaluation.
|
101
|
+
* Bugfix: :return_objects was overriding :objects in find and find_all
|
102
|
+
* Rollup exception code into smaller space reusing similar code.
|
103
|
+
|
104
|
+
0.7.3:
|
105
|
+
* Made has_many and belongs_to use :return_objects value
|
106
|
+
* Force generation of LDAP constants on import - currently broken
|
107
|
+
|
108
|
+
0.7.2:
|
109
|
+
* Stopped overriding Conn.schema in ldap/schema - now use schema2
|
110
|
+
* Fix attributes being deleted when changing between objectclasses with shared attributes
|
111
|
+
* Added schema attribute case insensitivity
|
112
|
+
* Added case insensitivity to the attribute methods.
|
113
|
+
* Added LDAP scope override support to ldap_mapping via :scope argument. (ldap_mapping :scope => LDAP::LDAP_SCOPE_SUBTREE, ...)
|
114
|
+
* Fixed the bug where Klass.find() return nil (default arg for find/find_all now '*')
|
115
|
+
* Added :return_objects to Base.connect()/configuration.rb -- When true, sets the default behavior in Base.find/find_all to return objects instead of just the dnattr string.
|
116
|
+
* Hid away several exposed private class methods (do_bind, etc)
|
117
|
+
* Undefined dnattr for a class now raises a ConfigurationError
|
118
|
+
* Centralized all connection management code where possible
|
119
|
+
* Added Base.can_reconnect? which returns true if never connected or below the :retries limit
|
120
|
+
* Added block support to Base.connection to ensure "safe" connection usage. This is not just for internal library use. If you need to do something fancy with the connection object, use Base.connection do |conn| ...
|
121
|
+
* Fixed object instantiation in Base#initialize when using full DNs
|
122
|
+
* Added :parent_class option to ldap_mapping which allows for object.parent() to return an instantiated object using the parent DN. (ldap_mapping :parent_class => String, ...)
|
123
|
+
* Fixed reconnect bug in Base#initialize (didn't respect infinite retries)
|
124
|
+
* Added(*) :timeout argument to allow timeouts on hanging LDAP connections
|
125
|
+
* Added(*) :retry_on_timeout boolean option to allow disabling retries on timeouts
|
126
|
+
* Added TimeoutError
|
127
|
+
* Added(*) a forking timeout using SIGALRM to interrupt handling.
|
128
|
+
* (*) Only works when RUBY_PLATFORM has "linux" in it
|
129
|
+
|
130
|
+
0.7.1:
|
131
|
+
* Fix broken -W0 arg in activeldap.rb
|
132
|
+
* attribute_method=: '' and nil converted to ldap-pleasing [] values
|
133
|
+
* Added checks in write and search for connection down (to reconnect)
|
134
|
+
* Fixed broken idea of LDAP::err2string exceptions. Instead took errcodes from ldap.c in Ruby/LDAP.
|
135
|
+
|
136
|
+
0.7.0:
|
137
|
+
* ConnectionError thrown from #initialize when there is no connection and retry limit was exceeded
|
138
|
+
* ConnectionError thrown when retries exceeded when no connection was created
|
139
|
+
* Separated connection types: SSL, TLS, and plain using :method
|
140
|
+
* Localized reconnect logic into Base.reconnect(force=false)
|
141
|
+
* Fixed password_block evaluation bug in do_bind() which broke SIMPLE re-binds and broke reconnect
|
142
|
+
* Add support for config[:sasl_quiet] in Base.connect
|
143
|
+
* (Delayed a case sensitivity patch for object classes and attributes due to weird errors)
|
144
|
+
* Add :retry_wait to Base.connect to determine the timeout before retrying a connection
|
145
|
+
* Fixed ActiveLDAP::Base.create_object() - classes were enclosed in quotes
|
146
|
+
* Added :ldap_scope Base.connect() argument to allow risk-seeking users to change the LDAP scope to something other than ONELEVEL.
|
147
|
+
* Cleaned up Configuration.rb to supply all default values for ActiveLDAP::Base.connect() and to use a constant instead of overriding class variables for no good reason.
|
148
|
+
* Added scrubbing for :base argument into Base.connect() to make sure a ' doesn't get evaluated.
|
149
|
+
* Refactored Base.connect(). It is now much cleaner and easier to follow.
|
150
|
+
* Moved schema retrieval to after bind in case a server requires privileges to access it.
|
151
|
+
* Reworked the bind process to be a little prettier. A lot of work to do here still.
|
152
|
+
* Added LDAP::err2exception(errno) which is the groundwork of a coming overhaul in user friendly error handling.
|
153
|
+
* Added support for Base::connect(.., :password => String, ...) to avoid stupid Proc.new {'foo'} crap
|
154
|
+
* Add :store_password option. When this is set, :password is not cleared and :password_block is not re-evaluated on each rebind.
|
155
|
+
|
156
|
+
0.6.0:
|
157
|
+
* Disallow blank DN attribute values on initialization
|
158
|
+
* Fix bug reported by Maik Schmidt regarding object creation
|
159
|
+
* Added error checking to disallow DN attribute value changes
|
160
|
+
* Added AttributeAssignmentError (for above)
|
161
|
+
* Import() and initialize() no longer call attribute_method=()
|
162
|
+
* Added error condition if connection fails inside initialize()
|
163
|
+
* Changes examples and tests to use "dc=localdomain"
|
164
|
+
* has_many() entries no longer return nil when empty
|
165
|
+
|
166
|
+
0.5.9:
|
167
|
+
* Change default base to dc=localdomain (as per Debian default).
|
168
|
+
* schema2.rb:attr() now returns [] instead of '' when empty.
|
169
|
+
* Lookup of new objects does not put dnattr()=value into the Base on lookup.
|
170
|
+
* Scope is now use ONELEVEL instead of SUBTREE as it broke object boundaries.
|
171
|
+
* Fixed @max_retries misuse.
|
172
|
+
* Added do_connect retries.
|
173
|
+
* Fixed find and find_all for the case - find_all('*').
|
174
|
+
* Fixed broken creation of objects from anonymous classes.
|
175
|
+
* Fixed broken use of ldap_mapping with anonymous classes.
|
176
|
+
|
177
|
+
0.5.8: Bugfix galore
|
178
|
+
* Allow nil "prefix"
|
179
|
+
* Fixed the dup bug with Anonymous patch.
|
180
|
+
* (maybe) Fixed stale connection problems by attempting reconn/bind.
|
181
|
+
* Hiding redefine warnings (for now)
|
182
|
+
|
183
|
+
0.5.7:
|
184
|
+
* Fixed the @data.default = [] bug that daniel@nightrunner.com pointed out
|
185
|
+
(and partially patched).
|
186
|
+
|
187
|
+
0.5.6:
|
188
|
+
* Added support for foreign_key => 'dn' in has_many.
|
189
|
+
|
190
|
+
0.5.5:
|
191
|
+
* Remove @@logger.debug entries during build
|
192
|
+
* Building -debug and regular gems and tarballs
|
193
|
+
|
194
|
+
0.5.4:
|
195
|
+
* Added Base#import to streamline the Base.find and Base.find_all methods
|
196
|
+
- Speeds up find and find_all by not accessing LDAP multiple times
|
197
|
+
for data we already have.
|
198
|
+
* Added tests/benchmark which is a slightly modified version of excellent
|
199
|
+
benchmarking code contributed by
|
200
|
+
Ollivier Robert <roberto -_-AT-_- keltia.freenix.fr>.
|
201
|
+
|
202
|
+
0.5.3:
|
203
|
+
* Changed attribute_method to send in associations
|
204
|
+
- fixes belongs_to (with local_kay) and inheritance around that
|
205
|
+
|
206
|
+
0.5.2:
|
207
|
+
* Make sure values are .dup'd when they come from LDAP
|
208
|
+
|
209
|
+
0.5.1:
|
210
|
+
* Changed Schema2#class_attributes to return {:must => [], :may => []}
|
211
|
+
* Fixed Base#must and Base#may to return with full SUPerclass requirements
|
212
|
+
|
213
|
+
0.5.0:
|
214
|
+
* API CHANGE (as with all 0.x.0 changes) (towards ActiveRecord duck typing)
|
215
|
+
- Base#ldapattribute now always returns an array
|
216
|
+
- Base#ldapattribute(true) now returns a dup of an array, string, etc
|
217
|
+
when appropriate (old default) - This is just for convenience
|
218
|
+
- Base#ldapattribute returns the stored value, not just a .dup
|
219
|
+
- Associations methods return objects by default instead of just names.
|
220
|
+
Group.new('foo').members(false) will return names only.
|
221
|
+
- Base.connect returns true as one might expect
|
222
|
+
* Value validation and changing (binary, etc) occur prior to write, and
|
223
|
+
not immediately on attribute_method=(value).
|
224
|
+
* Attribute method validity is now determined /on-the-fly/.
|
225
|
+
* Default log level set to OFF speeds up 'speedtest' by 3 seconds!
|
226
|
+
(counters last point which added some slowness :)
|
227
|
+
* Added Schema2#class_attributes which caches and fully supertype expands
|
228
|
+
attribute lists.
|
229
|
+
* Integrated Schema2#class_attributes with apply_objectclass which automagically
|
230
|
+
does SUP traversal and automagically updates available methods on calls to
|
231
|
+
#attributes, #method_missing, #validate, and #write
|
232
|
+
* Added 'attributes' to 'methods' allowing for irb autocompletion and other
|
233
|
+
normal rubyisms
|
234
|
+
* Moved almost all validation to Base#validate to avoid unexpected exceptions
|
235
|
+
being raised in seemingly unrelated method calls. This means that invalid
|
236
|
+
objectClasses may be specified. This will only be caught on #write or
|
237
|
+
a pre-emptive #validate. This goes for all attribute errors though.
|
238
|
+
This also makes it possible to "break" objects by removing the 'top'
|
239
|
+
objectclass and therefore the #objectClass method...
|
240
|
+
|
241
|
+
0.4.4:
|
242
|
+
* Fixed binary subtype forcing:
|
243
|
+
- was setting data as subtype ;binary even when not required
|
244
|
+
* Added first set of unit tests.
|
245
|
+
- These will be cleaned up in later releases as more tests are added.
|
246
|
+
* Fixed subtype clobber non-subtype (unittest!)
|
247
|
+
- cn and cn;lang-blah: the last loaded won
|
248
|
+
* Fixed multivalued subtypes from being shoved into a string (unittest!)
|
249
|
+
- an error with attribute_input_value
|
250
|
+
|
251
|
+
0.4.3:
|
252
|
+
* Fixed write (add) bugs introduced with last change
|
253
|
+
- only bug fixes until unittests are in place
|
254
|
+
|
255
|
+
0.4.2:
|
256
|
+
* Added ruby-activeldap.gemspec
|
257
|
+
* Integrated building a gem of 'ruby-activeldap' into Makefile.package
|
258
|
+
* Added attr parsing cache to speed up repetitive calls: approx 13x speedup
|
259
|
+
= 100 usermod-binary-add calls
|
260
|
+
- Without attr parsing cache:
|
261
|
+
real 13m53.129s
|
262
|
+
user 13m11.350s
|
263
|
+
sys 0m7.030s
|
264
|
+
- With attr parsing cache:
|
265
|
+
real 1m0.416s
|
266
|
+
user 0m28.390s
|
267
|
+
sys 0m2.380s
|
268
|
+
|
269
|
+
0.4.1:
|
270
|
+
* Schema2 was not correctly parsing objectClass entries.
|
271
|
+
- This is fixed for now but must be revisited.
|
272
|
+
|
273
|
+
0.4.0:
|
274
|
+
* Added #<attribute>(arrays) argument which when true
|
275
|
+
always returns arrays. e.g.
|
276
|
+
irb> user.cn(true)
|
277
|
+
=> ['My Common Name']
|
278
|
+
This makes things easier for larger programming tasks.
|
279
|
+
* Added subtype support:
|
280
|
+
- Uses Hash objects to specify the subtype
|
281
|
+
e.g. user.userCertificate = {'binary' => File.read('mycert.der')}
|
282
|
+
- Added recursive type enforcement along with the subtype handling
|
283
|
+
- This required overhauling the #write method.
|
284
|
+
- Please report any problems ASAP! :^)
|
285
|
+
* Added automagic binary support
|
286
|
+
- subtype wrapping done automatically
|
287
|
+
- relies on X-NOT-HUMAN-READABLE flag
|
288
|
+
* Added LDAP::Schema2 which is an extension of Ruby/LDAP::Schema
|
289
|
+
- made Schema#attr generic for easy type dereferencing
|
290
|
+
* Updated rdoc in activeldap.rb
|
291
|
+
* Updated examples (poorly) to reflect new functionality
|
292
|
+
* Added several private helper functions
|
293
|
+
|
294
|
+
0.3.6:
|
295
|
+
* Fixed dn attribute value extraction on find and find_all
|
296
|
+
- these may have grabbed the wrong value if a DN attr has
|
297
|
+
multiple values.
|
298
|
+
* Fixed Base.search to return all values as arrays and update
|
299
|
+
multivalued ones correctly
|
300
|
+
* Lowered the amount of default logging to FATAL only
|
301
|
+
|
302
|
+
0.3.5:
|
303
|
+
* Moved to rubyforge.org!
|
304
|
+
|
305
|
+
0.3.4:
|
306
|
+
* Changed license to Ruby's
|
307
|
+
|
308
|
+
0.3.3:
|
309
|
+
* Changed Base.search to return an array instead of a hash of hashes
|
310
|
+
* Change Base.search to take in a hash as its arguments
|
311
|
+
|
312
|
+
0.3.2:
|
313
|
+
* Bug fix - fixed support for module'd extension classes (again!)
|
314
|
+
|
315
|
+
0.3.1:
|
316
|
+
* Updated the documentation
|
317
|
+
* Fixed ignoring of attrs argument in Base.search
|
318
|
+
* Fixed mistake in groupls (using dnattr directly)
|
319
|
+
* Fixed a mistake with overzealous dup'ing
|
320
|
+
|
321
|
+
0.3.0:
|
322
|
+
* MORE API CHANGES (configuration.rb, etc)
|
323
|
+
* Major overhaul to the internals!
|
324
|
+
- removed @@BLAH[@klass] in lieu of defining
|
325
|
+
class methods which contain the required values. This
|
326
|
+
allows for clean inheritance of Base subclasses! Whew!
|
327
|
+
- Added @@config to store the options currently in use
|
328
|
+
after a Base.connect
|
329
|
+
- Now cache passwords for doing reconnects
|
330
|
+
- dnattr now accessible to the outside as a class method only
|
331
|
+
* Added Base.search to wrap normal LDAP search for convenience.
|
332
|
+
- This returns a hash of hashes with the results indexed first by
|
333
|
+
full dn, then by attribute.
|
334
|
+
|
335
|
+
0.2.0:
|
336
|
+
* API CHANGES:
|
337
|
+
- Extension classes must be defined using map_to_ldap instead of setting
|
338
|
+
random values in initialize
|
339
|
+
- Base#find is now Base.find_all and is a class method
|
340
|
+
- Base.find returns the first match a la Array#find
|
341
|
+
- force_reload is gone in belongs_to and has_many created methods
|
342
|
+
- hiding Base.new, Base.find, and Base.find_all from direct access
|
343
|
+
* added uniq to setting objectClass to avoid stupid errors
|
344
|
+
* fixed new object creation bug where attributes were added before the
|
345
|
+
objectclass resulting in a violation (Base#write)
|
346
|
+
* fixed attribute dereferencing in Base#write
|
347
|
+
* fixed bug with .dup on Fixnums
|
348
|
+
* methods created by has_many/belongs_to and find and find_all now take an
|
349
|
+
optional argument dnattr_only which will return the value of dnattr for
|
350
|
+
each result instead of a full object.
|
351
|
+
* Base.connection=(conn) added for multiplexing connections
|
352
|
+
* Added a manual to activeldap.rb which covers most usage of Ruby/ActiveLDAP
|
353
|
+
* Base.connect(:try_sasl => true) should now work with GSSAPI if you are
|
354
|
+
using OpenLDAP >= 2.1.29
|
355
|
+
|
356
|
+
0.1.8:
|
357
|
+
* .dup all returned attribute values to avoid weirdness
|
358
|
+
* .dup all assigned values to avoid weirdness
|
359
|
+
* Changed default configuration.rb to use example.com
|
360
|
+
|
361
|
+
0.1.7:
|
362
|
+
* Added support for non-unique DN attributes
|
363
|
+
* Added authoritative DN retrieval with 'object.dn'
|
364
|
+
|
365
|
+
0.1.6:
|
366
|
+
* Added Base.close method for clearing the existing connection (despite Ruby/LDAP's lack of .close)
|
367
|
+
|
368
|
+
0.1.5:
|
369
|
+
* Fixed incorrect usage of @klass in .find (should .find be a class method?)
|
370
|
+
|
371
|
+
0.1.4:
|
372
|
+
* Change WARN to INFO in associations.rb for has_many
|
373
|
+
|
374
|
+
0.1.3:
|
375
|
+
* Fixed class name mangling
|
376
|
+
* Added support for classes to take DNs as the initialization value
|
377
|
+
|
378
|
+
0.1.2:
|
379
|
+
* Patch from Dick Davies: Try SSL before TLS
|
380
|
+
* Log4r support
|
381
|
+
* Better packaging (automated)
|
382
|
+
* Work-around for SSL stupidity
|
383
|
+
- SSLConn doesn't check if the port it connected to is really using SSL!
|
384
|
+
|
385
|
+
0.1.1:
|
386
|
+
* Dynamic table class creation
|
387
|
+
* SASL/GSSAPI disabled by default - doesn't work consistently
|
388
|
+
|
389
|
+
0.1.0:
|
390
|
+
* Added foreign_key to has_many
|
391
|
+
* Added local_key to belongs_to
|
392
|
+
* Added primary_members to Group example
|
393
|
+
* Added "nil" filtering to has_many
|
394
|
+
* Packaged up with setup.rb
|
395
|
+
* Added RDocs and better comments
|
396
|
+
|
397
|
+
0.0.9:
|
398
|
+
* Separated extension classes from ActiveLDAP module
|
399
|
+
* Cleaned up examples with new requires
|
400
|
+
|
401
|
+
0.0.8:
|
402
|
+
* Added user and group scripting examples
|
403
|
+
- usermod, userls, useradd, userdel
|
404
|
+
- groupmod, groupls
|
405
|
+
|
406
|
+
0.0.7:
|
407
|
+
* Cleaner authentication loop:
|
408
|
+
- SASL (GSSAPI only), simple, anonymous
|
409
|
+
* Added allow_anonymous option added (default: false)
|
410
|
+
|
411
|
+
0.0.6:
|
412
|
+
* Write support cleaned up
|
413
|
+
* Exception classes added
|
414
|
+
|
415
|
+
0.0.5:
|
416
|
+
* LDAP write support added
|
417
|
+
|
418
|
+
0.0.4:
|
419
|
+
* MUST and MAY data validation against schema using objectClasses
|
420
|
+
|
421
|
+
0.0.3:
|
422
|
+
* LDAP attributes alias resolution and data mapping
|
423
|
+
|
424
|
+
0.0.2:
|
425
|
+
* Associations: has_many and belongs_to Class methods added for Base
|
426
|
+
|
427
|
+
0.0.1:
|
428
|
+
* Extension approach in place with example User and Group classes
|
429
|
+
|
430
|
+
0.0.0:
|
431
|
+
* Basic LDAP read support in place with hard-coded OUs
|
data/COPYING
ADDED
@@ -0,0 +1,340 @@
|
|
1
|
+
GNU GENERAL PUBLIC LICENSE
|
2
|
+
Version 2, June 1991
|
3
|
+
|
4
|
+
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
5
|
+
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
6
|
+
Everyone is permitted to copy and distribute verbatim copies
|
7
|
+
of this license document, but changing it is not allowed.
|
8
|
+
|
9
|
+
Preamble
|
10
|
+
|
11
|
+
The licenses for most software are designed to take away your
|
12
|
+
freedom to share and change it. By contrast, the GNU General Public
|
13
|
+
License is intended to guarantee your freedom to share and change free
|
14
|
+
software--to make sure the software is free for all its users. This
|
15
|
+
General Public License applies to most of the Free Software
|
16
|
+
Foundation's software and to any other program whose authors commit to
|
17
|
+
using it. (Some other Free Software Foundation software is covered by
|
18
|
+
the GNU Library General Public License instead.) You can apply it to
|
19
|
+
your programs, too.
|
20
|
+
|
21
|
+
When we speak of free software, we are referring to freedom, not
|
22
|
+
price. Our General Public Licenses are designed to make sure that you
|
23
|
+
have the freedom to distribute copies of free software (and charge for
|
24
|
+
this service if you wish), that you receive source code or can get it
|
25
|
+
if you want it, that you can change the software or use pieces of it
|
26
|
+
in new free programs; and that you know you can do these things.
|
27
|
+
|
28
|
+
To protect your rights, we need to make restrictions that forbid
|
29
|
+
anyone to deny you these rights or to ask you to surrender the rights.
|
30
|
+
These restrictions translate to certain responsibilities for you if you
|
31
|
+
distribute copies of the software, or if you modify it.
|
32
|
+
|
33
|
+
For example, if you distribute copies of such a program, whether
|
34
|
+
gratis or for a fee, you must give the recipients all the rights that
|
35
|
+
you have. You must make sure that they, too, receive or can get the
|
36
|
+
source code. And you must show them these terms so they know their
|
37
|
+
rights.
|
38
|
+
|
39
|
+
We protect your rights with two steps: (1) copyright the software, and
|
40
|
+
(2) offer you this license which gives you legal permission to copy,
|
41
|
+
distribute and/or modify the software.
|
42
|
+
|
43
|
+
Also, for each author's protection and ours, we want to make certain
|
44
|
+
that everyone understands that there is no warranty for this free
|
45
|
+
software. If the software is modified by someone else and passed on, we
|
46
|
+
want its recipients to know that what they have is not the original, so
|
47
|
+
that any problems introduced by others will not reflect on the original
|
48
|
+
authors' reputations.
|
49
|
+
|
50
|
+
Finally, any free program is threatened constantly by software
|
51
|
+
patents. We wish to avoid the danger that redistributors of a free
|
52
|
+
program will individually obtain patent licenses, in effect making the
|
53
|
+
program proprietary. To prevent this, we have made it clear that any
|
54
|
+
patent must be licensed for everyone's free use or not licensed at all.
|
55
|
+
|
56
|
+
The precise terms and conditions for copying, distribution and
|
57
|
+
modification follow.
|
58
|
+
|
59
|
+
GNU GENERAL PUBLIC LICENSE
|
60
|
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61
|
+
|
62
|
+
0. This License applies to any program or other work which contains
|
63
|
+
a notice placed by the copyright holder saying it may be distributed
|
64
|
+
under the terms of this General Public License. The "Program", below,
|
65
|
+
refers to any such program or work, and a "work based on the Program"
|
66
|
+
means either the Program or any derivative work under copyright law:
|
67
|
+
that is to say, a work containing the Program or a portion of it,
|
68
|
+
either verbatim or with modifications and/or translated into another
|
69
|
+
language. (Hereinafter, translation is included without limitation in
|
70
|
+
the term "modification".) Each licensee is addressed as "you".
|
71
|
+
|
72
|
+
Activities other than copying, distribution and modification are not
|
73
|
+
covered by this License; they are outside its scope. The act of
|
74
|
+
running the Program is not restricted, and the output from the Program
|
75
|
+
is covered only if its contents constitute a work based on the
|
76
|
+
Program (independent of having been made by running the Program).
|
77
|
+
Whether that is true depends on what the Program does.
|
78
|
+
|
79
|
+
1. You may copy and distribute verbatim copies of the Program's
|
80
|
+
source code as you receive it, in any medium, provided that you
|
81
|
+
conspicuously and appropriately publish on each copy an appropriate
|
82
|
+
copyright notice and disclaimer of warranty; keep intact all the
|
83
|
+
notices that refer to this License and to the absence of any warranty;
|
84
|
+
and give any other recipients of the Program a copy of this License
|
85
|
+
along with the Program.
|
86
|
+
|
87
|
+
You may charge a fee for the physical act of transferring a copy, and
|
88
|
+
you may at your option offer warranty protection in exchange for a fee.
|
89
|
+
|
90
|
+
2. You may modify your copy or copies of the Program or any portion
|
91
|
+
of it, thus forming a work based on the Program, and copy and
|
92
|
+
distribute such modifications or work under the terms of Section 1
|
93
|
+
above, provided that you also meet all of these conditions:
|
94
|
+
|
95
|
+
a) You must cause the modified files to carry prominent notices
|
96
|
+
stating that you changed the files and the date of any change.
|
97
|
+
|
98
|
+
b) You must cause any work that you distribute or publish, that in
|
99
|
+
whole or in part contains or is derived from the Program or any
|
100
|
+
part thereof, to be licensed as a whole at no charge to all third
|
101
|
+
parties under the terms of this License.
|
102
|
+
|
103
|
+
c) If the modified program normally reads commands interactively
|
104
|
+
when run, you must cause it, when started running for such
|
105
|
+
interactive use in the most ordinary way, to print or display an
|
106
|
+
announcement including an appropriate copyright notice and a
|
107
|
+
notice that there is no warranty (or else, saying that you provide
|
108
|
+
a warranty) and that users may redistribute the program under
|
109
|
+
these conditions, and telling the user how to view a copy of this
|
110
|
+
License. (Exception: if the Program itself is interactive but
|
111
|
+
does not normally print such an announcement, your work based on
|
112
|
+
the Program is not required to print an announcement.)
|
113
|
+
|
114
|
+
These requirements apply to the modified work as a whole. If
|
115
|
+
identifiable sections of that work are not derived from the Program,
|
116
|
+
and can be reasonably considered independent and separate works in
|
117
|
+
themselves, then this License, and its terms, do not apply to those
|
118
|
+
sections when you distribute them as separate works. But when you
|
119
|
+
distribute the same sections as part of a whole which is a work based
|
120
|
+
on the Program, the distribution of the whole must be on the terms of
|
121
|
+
this License, whose permissions for other licensees extend to the
|
122
|
+
entire whole, and thus to each and every part regardless of who wrote it.
|
123
|
+
|
124
|
+
Thus, it is not the intent of this section to claim rights or contest
|
125
|
+
your rights to work written entirely by you; rather, the intent is to
|
126
|
+
exercise the right to control the distribution of derivative or
|
127
|
+
collective works based on the Program.
|
128
|
+
|
129
|
+
In addition, mere aggregation of another work not based on the Program
|
130
|
+
with the Program (or with a work based on the Program) on a volume of
|
131
|
+
a storage or distribution medium does not bring the other work under
|
132
|
+
the scope of this License.
|
133
|
+
|
134
|
+
3. You may copy and distribute the Program (or a work based on it,
|
135
|
+
under Section 2) in object code or executable form under the terms of
|
136
|
+
Sections 1 and 2 above provided that you also do one of the following:
|
137
|
+
|
138
|
+
a) Accompany it with the complete corresponding machine-readable
|
139
|
+
source code, which must be distributed under the terms of Sections
|
140
|
+
1 and 2 above on a medium customarily used for software interchange; or,
|
141
|
+
|
142
|
+
b) Accompany it with a written offer, valid for at least three
|
143
|
+
years, to give any third party, for a charge no more than your
|
144
|
+
cost of physically performing source distribution, a complete
|
145
|
+
machine-readable copy of the corresponding source code, to be
|
146
|
+
distributed under the terms of Sections 1 and 2 above on a medium
|
147
|
+
customarily used for software interchange; or,
|
148
|
+
|
149
|
+
c) Accompany it with the information you received as to the offer
|
150
|
+
to distribute corresponding source code. (This alternative is
|
151
|
+
allowed only for noncommercial distribution and only if you
|
152
|
+
received the program in object code or executable form with such
|
153
|
+
an offer, in accord with Subsection b above.)
|
154
|
+
|
155
|
+
The source code for a work means the preferred form of the work for
|
156
|
+
making modifications to it. For an executable work, complete source
|
157
|
+
code means all the source code for all modules it contains, plus any
|
158
|
+
associated interface definition files, plus the scripts used to
|
159
|
+
control compilation and installation of the executable. However, as a
|
160
|
+
special exception, the source code distributed need not include
|
161
|
+
anything that is normally distributed (in either source or binary
|
162
|
+
form) with the major components (compiler, kernel, and so on) of the
|
163
|
+
operating system on which the executable runs, unless that component
|
164
|
+
itself accompanies the executable.
|
165
|
+
|
166
|
+
If distribution of executable or object code is made by offering
|
167
|
+
access to copy from a designated place, then offering equivalent
|
168
|
+
access to copy the source code from the same place counts as
|
169
|
+
distribution of the source code, even though third parties are not
|
170
|
+
compelled to copy the source along with the object code.
|
171
|
+
|
172
|
+
4. You may not copy, modify, sublicense, or distribute the Program
|
173
|
+
except as expressly provided under this License. Any attempt
|
174
|
+
otherwise to copy, modify, sublicense or distribute the Program is
|
175
|
+
void, and will automatically terminate your rights under this License.
|
176
|
+
However, parties who have received copies, or rights, from you under
|
177
|
+
this License will not have their licenses terminated so long as such
|
178
|
+
parties remain in full compliance.
|
179
|
+
|
180
|
+
5. You are not required to accept this License, since you have not
|
181
|
+
signed it. However, nothing else grants you permission to modify or
|
182
|
+
distribute the Program or its derivative works. These actions are
|
183
|
+
prohibited by law if you do not accept this License. Therefore, by
|
184
|
+
modifying or distributing the Program (or any work based on the
|
185
|
+
Program), you indicate your acceptance of this License to do so, and
|
186
|
+
all its terms and conditions for copying, distributing or modifying
|
187
|
+
the Program or works based on it.
|
188
|
+
|
189
|
+
6. Each time you redistribute the Program (or any work based on the
|
190
|
+
Program), the recipient automatically receives a license from the
|
191
|
+
original licensor to copy, distribute or modify the Program subject to
|
192
|
+
these terms and conditions. You may not impose any further
|
193
|
+
restrictions on the recipients' exercise of the rights granted herein.
|
194
|
+
You are not responsible for enforcing compliance by third parties to
|
195
|
+
this License.
|
196
|
+
|
197
|
+
7. If, as a consequence of a court judgment or allegation of patent
|
198
|
+
infringement or for any other reason (not limited to patent issues),
|
199
|
+
conditions are imposed on you (whether by court order, agreement or
|
200
|
+
otherwise) that contradict the conditions of this License, they do not
|
201
|
+
excuse you from the conditions of this License. If you cannot
|
202
|
+
distribute so as to satisfy simultaneously your obligations under this
|
203
|
+
License and any other pertinent obligations, then as a consequence you
|
204
|
+
may not distribute the Program at all. For example, if a patent
|
205
|
+
license would not permit royalty-free redistribution of the Program by
|
206
|
+
all those who receive copies directly or indirectly through you, then
|
207
|
+
the only way you could satisfy both it and this License would be to
|
208
|
+
refrain entirely from distribution of the Program.
|
209
|
+
|
210
|
+
If any portion of this section is held invalid or unenforceable under
|
211
|
+
any particular circumstance, the balance of the section is intended to
|
212
|
+
apply and the section as a whole is intended to apply in other
|
213
|
+
circumstances.
|
214
|
+
|
215
|
+
It is not the purpose of this section to induce you to infringe any
|
216
|
+
patents or other property right claims or to contest validity of any
|
217
|
+
such claims; this section has the sole purpose of protecting the
|
218
|
+
integrity of the free software distribution system, which is
|
219
|
+
implemented by public license practices. Many people have made
|
220
|
+
generous contributions to the wide range of software distributed
|
221
|
+
through that system in reliance on consistent application of that
|
222
|
+
system; it is up to the author/donor to decide if he or she is willing
|
223
|
+
to distribute software through any other system and a licensee cannot
|
224
|
+
impose that choice.
|
225
|
+
|
226
|
+
This section is intended to make thoroughly clear what is believed to
|
227
|
+
be a consequence of the rest of this License.
|
228
|
+
|
229
|
+
8. If the distribution and/or use of the Program is restricted in
|
230
|
+
certain countries either by patents or by copyrighted interfaces, the
|
231
|
+
original copyright holder who places the Program under this License
|
232
|
+
may add an explicit geographical distribution limitation excluding
|
233
|
+
those countries, so that distribution is permitted only in or among
|
234
|
+
countries not thus excluded. In such case, this License incorporates
|
235
|
+
the limitation as if written in the body of this License.
|
236
|
+
|
237
|
+
9. The Free Software Foundation may publish revised and/or new versions
|
238
|
+
of the General Public License from time to time. Such new versions will
|
239
|
+
be similar in spirit to the present version, but may differ in detail to
|
240
|
+
address new problems or concerns.
|
241
|
+
|
242
|
+
Each version is given a distinguishing version number. If the Program
|
243
|
+
specifies a version number of this License which applies to it and "any
|
244
|
+
later version", you have the option of following the terms and conditions
|
245
|
+
either of that version or of any later version published by the Free
|
246
|
+
Software Foundation. If the Program does not specify a version number of
|
247
|
+
this License, you may choose any version ever published by the Free Software
|
248
|
+
Foundation.
|
249
|
+
|
250
|
+
10. If you wish to incorporate parts of the Program into other free
|
251
|
+
programs whose distribution conditions are different, write to the author
|
252
|
+
to ask for permission. For software which is copyrighted by the Free
|
253
|
+
Software Foundation, write to the Free Software Foundation; we sometimes
|
254
|
+
make exceptions for this. Our decision will be guided by the two goals
|
255
|
+
of preserving the free status of all derivatives of our free software and
|
256
|
+
of promoting the sharing and reuse of software generally.
|
257
|
+
|
258
|
+
NO WARRANTY
|
259
|
+
|
260
|
+
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261
|
+
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262
|
+
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263
|
+
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264
|
+
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265
|
+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266
|
+
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267
|
+
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268
|
+
REPAIR OR CORRECTION.
|
269
|
+
|
270
|
+
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271
|
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272
|
+
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273
|
+
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274
|
+
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275
|
+
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276
|
+
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277
|
+
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278
|
+
POSSIBILITY OF SUCH DAMAGES.
|
279
|
+
|
280
|
+
END OF TERMS AND CONDITIONS
|
281
|
+
|
282
|
+
How to Apply These Terms to Your New Programs
|
283
|
+
|
284
|
+
If you develop a new program, and you want it to be of the greatest
|
285
|
+
possible use to the public, the best way to achieve this is to make it
|
286
|
+
free software which everyone can redistribute and change under these terms.
|
287
|
+
|
288
|
+
To do so, attach the following notices to the program. It is safest
|
289
|
+
to attach them to the start of each source file to most effectively
|
290
|
+
convey the exclusion of warranty; and each file should have at least
|
291
|
+
the "copyright" line and a pointer to where the full notice is found.
|
292
|
+
|
293
|
+
<one line to give the program's name and a brief idea of what it does.>
|
294
|
+
Copyright (C) <year> <name of author>
|
295
|
+
|
296
|
+
This program is free software; you can redistribute it and/or modify
|
297
|
+
it under the terms of the GNU General Public License as published by
|
298
|
+
the Free Software Foundation; either version 2 of the License, or
|
299
|
+
(at your option) any later version.
|
300
|
+
|
301
|
+
This program is distributed in the hope that it will be useful,
|
302
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
303
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
304
|
+
GNU General Public License for more details.
|
305
|
+
|
306
|
+
You should have received a copy of the GNU General Public License
|
307
|
+
along with this program; if not, write to the Free Software
|
308
|
+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
309
|
+
|
310
|
+
|
311
|
+
Also add information on how to contact you by electronic and paper mail.
|
312
|
+
|
313
|
+
If the program is interactive, make it output a short notice like this
|
314
|
+
when it starts in an interactive mode:
|
315
|
+
|
316
|
+
Gnomovision version 69, Copyright (C) year name of author
|
317
|
+
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
318
|
+
This is free software, and you are welcome to redistribute it
|
319
|
+
under certain conditions; type `show c' for details.
|
320
|
+
|
321
|
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
322
|
+
parts of the General Public License. Of course, the commands you use may
|
323
|
+
be called something other than `show w' and `show c'; they could even be
|
324
|
+
mouse-clicks or menu items--whatever suits your program.
|
325
|
+
|
326
|
+
You should also get your employer (if you work as a programmer) or your
|
327
|
+
school, if any, to sign a "copyright disclaimer" for the program, if
|
328
|
+
necessary. Here is a sample; alter the names:
|
329
|
+
|
330
|
+
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
331
|
+
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
332
|
+
|
333
|
+
<signature of Ty Coon>, 1 April 1989
|
334
|
+
Ty Coon, President of Vice
|
335
|
+
|
336
|
+
This General Public License does not permit incorporating your program into
|
337
|
+
proprietary programs. If your program is a subroutine library, you may
|
338
|
+
consider it more useful to permit linking proprietary applications with the
|
339
|
+
library. If this is what you want to do, use the GNU Library General
|
340
|
+
Public License instead of this License.
|