net-ldap 0.8.0 → 0.9.0

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 (73) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +7 -0
  3. data/.travis.yml +19 -1
  4. data/CONTRIBUTING.md +54 -0
  5. data/Hacking.rdoc +2 -4
  6. data/History.rdoc +37 -0
  7. data/Manifest.txt +0 -4
  8. data/README.rdoc +8 -0
  9. data/Rakefile +1 -3
  10. data/lib/net/ber/core_ext.rb +5 -5
  11. data/lib/net/ber/core_ext/string.rb +7 -7
  12. data/lib/net/ber/core_ext/true_class.rb +2 -3
  13. data/lib/net/ldap.rb +134 -620
  14. data/lib/net/ldap/connection.rb +692 -0
  15. data/lib/net/ldap/dataset.rb +18 -4
  16. data/lib/net/ldap/entry.rb +1 -1
  17. data/lib/net/ldap/filter.rb +7 -7
  18. data/lib/net/ldap/password.rb +11 -11
  19. data/lib/net/ldap/pdu.rb +28 -4
  20. data/lib/net/ldap/version.rb +1 -1
  21. data/lib/net/snmp.rb +235 -241
  22. data/net-ldap.gemspec +7 -33
  23. data/script/install-openldap +47 -0
  24. data/script/package +7 -0
  25. data/script/release +16 -0
  26. data/test/ber/core_ext/test_array.rb +22 -0
  27. data/test/ber/core_ext/test_string.rb +25 -0
  28. data/test/ber/test_ber.rb +126 -0
  29. data/test/fixtures/openldap/memberof.ldif +33 -0
  30. data/test/fixtures/openldap/retcode.ldif +76 -0
  31. data/test/fixtures/openldap/slapd.conf.ldif +67 -0
  32. data/test/fixtures/seed.ldif +374 -0
  33. data/test/integration/test_add.rb +28 -0
  34. data/test/integration/test_ber.rb +30 -0
  35. data/test/integration/test_bind.rb +22 -0
  36. data/test/integration/test_delete.rb +31 -0
  37. data/test/integration/test_open.rb +88 -0
  38. data/test/integration/test_return_codes.rb +38 -0
  39. data/test/integration/test_search.rb +77 -0
  40. data/test/support/vm/openldap/.gitignore +1 -0
  41. data/test/support/vm/openldap/README.md +32 -0
  42. data/test/support/vm/openldap/Vagrantfile +33 -0
  43. data/test/test_dn.rb +44 -0
  44. data/test/test_entry.rb +62 -56
  45. data/test/test_filter.rb +98 -2
  46. data/test/test_filter_parser.rb +16 -0
  47. data/test/test_helper.rb +54 -0
  48. data/test/test_ldap.rb +60 -0
  49. data/test/test_ldap_connection.rb +382 -2
  50. data/test/test_ldif.rb +26 -1
  51. data/test/test_password.rb +3 -10
  52. data/test/test_rename.rb +2 -2
  53. data/test/test_search.rb +39 -0
  54. data/test/test_snmp.rb +1 -1
  55. data/test/test_ssl_ber.rb +40 -0
  56. metadata +70 -75
  57. data/.autotest +0 -11
  58. data/.gemtest +0 -0
  59. data/.rspec +0 -2
  60. data/autotest/discover.rb +0 -1
  61. data/spec/integration/ssl_ber_spec.rb +0 -39
  62. data/spec/spec.opts +0 -2
  63. data/spec/spec_helper.rb +0 -28
  64. data/spec/unit/ber/ber_spec.rb +0 -141
  65. data/spec/unit/ber/core_ext/array_spec.rb +0 -24
  66. data/spec/unit/ber/core_ext/string_spec.rb +0 -51
  67. data/spec/unit/ldap/dn_spec.rb +0 -80
  68. data/spec/unit/ldap/entry_spec.rb +0 -51
  69. data/spec/unit/ldap/filter_parser_spec.rb +0 -26
  70. data/spec/unit/ldap/filter_spec.rb +0 -115
  71. data/spec/unit/ldap/search_spec.rb +0 -49
  72. data/spec/unit/ldap_spec.rb +0 -223
  73. data/test/common.rb +0 -3
@@ -7,8 +7,6 @@ Gem::Specification.new do |s|
7
7
  s.name = %q{net-ldap}
8
8
  s.version = Net::LDAP::VERSION
9
9
  s.license = "MIT"
10
-
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
10
  s.authors = ["Francis Cianfrocca", "Emiel van de Laar", "Rory O'Connell", "Kaspar Schiess", "Austin Ziegler", "Michael Schaarschmidt"]
13
11
  s.date = %q{2012-02-28}
14
12
  s.description = %q{Net::LDAP for Ruby (also called net-ldap) implements client access for the
@@ -24,40 +22,16 @@ Our roadmap for Net::LDAP 1.0 is to gain full <em>client</em> compliance with
24
22
  the most recent LDAP RFCs (4510-4519, plutions of 4520-4532).}
25
23
  s.email = ["blackhedd@rubyforge.org", "gemiel@gmail.com", "rory.ocon@gmail.com", "kaspar.schiess@absurd.li", "austin@rubyforge.org"]
26
24
  s.extra_rdoc_files = ["Manifest.txt", "Contributors.rdoc", "Hacking.rdoc", "History.rdoc", "License.rdoc", "README.rdoc"]
27
- s.files = [".autotest", ".rspec", "Contributors.rdoc", "Hacking.rdoc", "History.rdoc", "License.rdoc", "Manifest.txt", "README.rdoc", "Rakefile", "autotest/discover.rb", "lib/net-ldap.rb", "lib/net/ber.rb", "lib/net/ber/ber_parser.rb", "lib/net/ber/core_ext.rb", "lib/net/ber/core_ext/array.rb", "lib/net/ber/core_ext/bignum.rb", "lib/net/ber/core_ext/false_class.rb", "lib/net/ber/core_ext/fixnum.rb", "lib/net/ber/core_ext/string.rb", "lib/net/ber/core_ext/true_class.rb", "lib/net/ldap.rb", "lib/net/ldap/dataset.rb", "lib/net/ldap/dn.rb", "lib/net/ldap/entry.rb", "lib/net/ldap/filter.rb", "lib/net/ldap/instrumentation.rb", "lib/net/ldap/password.rb", "lib/net/ldap/pdu.rb", "lib/net/snmp.rb", "net-ldap.gemspec", "spec/integration/ssl_ber_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "spec/unit/ber/ber_spec.rb", "spec/unit/ber/core_ext/string_spec.rb", "spec/unit/ldap/dn_spec.rb", "spec/unit/ldap/entry_spec.rb", "spec/unit/ldap/filter_spec.rb", "spec/unit/ldap_spec.rb", "test/common.rb", "test/test_entry.rb", "test/test_filter.rb", "test/test_ldap_connection.rb", "test/test_ldif.rb", "test/test_password.rb", "test/test_rename.rb", "test/test_snmp.rb", "test/testdata.ldif", "testserver/ldapserver.rb", "testserver/testdata.ldif", "lib/net/ldap/version.rb"]
25
+ s.files = `git ls-files`.split $/
26
+ s.test_files = s.files.grep(%r{^test})
28
27
  s.homepage = %q{http://github.com/ruby-ldap/ruby-net-ldap}
29
28
  s.rdoc_options = ["--main", "README.rdoc"]
30
29
  s.require_paths = ["lib"]
31
- s.required_ruby_version = Gem::Requirement.new(">= 1.8.7")
32
- s.rubyforge_project = %q{net-ldap}
33
- s.rubygems_version = %q{1.5.2}
30
+ s.required_ruby_version = ">= 1.9.3"
34
31
  s.summary = %q{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}
35
- s.test_files = ["test/test_entry.rb", "test/test_filter.rb", "test/test_ldap_connection.rb", "test/test_ldif.rb", "test/test_password.rb", "test/test_rename.rb", "test/test_snmp.rb"]
36
-
37
- if s.respond_to? :specification_version then
38
- s.specification_version = 3
39
32
 
40
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
41
- s.add_development_dependency(%q<hoe-git>, ["~> 1"])
42
- s.add_development_dependency(%q<hoe-gemspec>, ["~> 1"])
43
- s.add_development_dependency(%q<metaid>, ["~> 1"])
44
- s.add_development_dependency(%q<flexmock>, [">= 1.3.0"])
45
- s.add_development_dependency(%q<rspec>, ["~> 2.0"])
46
- s.add_development_dependency(%q<hoe>, [">= 2.9.1"])
47
- else
48
- s.add_dependency(%q<hoe-git>, ["~> 1"])
49
- s.add_dependency(%q<hoe-gemspec>, ["~> 1"])
50
- s.add_dependency(%q<metaid>, ["~> 1"])
51
- s.add_dependency(%q<flexmock>, [">= 1.3.0"])
52
- s.add_dependency(%q<rspec>, ["~> 2.0"])
53
- s.add_dependency(%q<hoe>, [">= 2.9.1"])
54
- end
55
- else
56
- s.add_dependency(%q<hoe-git>, ["~> 1"])
57
- s.add_dependency(%q<hoe-gemspec>, ["~> 1"])
58
- s.add_dependency(%q<metaid>, ["~> 1"])
59
- s.add_dependency(%q<flexmock>, [">= 1.3.0"])
60
- s.add_dependency(%q<rspec>, ["~> 2.0"])
61
- s.add_dependency(%q<hoe>, [">= 2.9.1"])
62
- end
33
+ s.add_development_dependency("hoe-git", "~> 1.0")
34
+ s.add_development_dependency("hoe-gemspec", "~> 1.0")
35
+ s.add_development_dependency("flexmock", "~> 1.3")
36
+ s.add_development_dependency("hoe", "~> 2.9")
63
37
  end
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env sh
2
+ set -e
3
+ set -x
4
+
5
+ BASE_PATH="$( cd `dirname $0`/../test/fixtures/openldap && pwd )"
6
+ SEED_PATH="$( cd `dirname $0`/../test/fixtures && pwd )"
7
+
8
+ dpkg -s slapd time ldap-utils ||\
9
+ DEBIAN_FRONTEND=noninteractive sudo -E apt-get install -y --force-yes slapd time ldap-utils
10
+
11
+ sudo /etc/init.d/slapd stop
12
+
13
+ TMPDIR=$(mktemp -d)
14
+ cd $TMPDIR
15
+
16
+ # Delete data and reconfigure.
17
+ sudo cp -v /var/lib/ldap/DB_CONFIG ./DB_CONFIG
18
+ sudo rm -rf /etc/ldap/slapd.d/*
19
+ sudo rm -rf /var/lib/ldap/*
20
+ sudo cp -v ./DB_CONFIG /var/lib/ldap/DB_CONFIG
21
+ sudo slapadd -F /etc/ldap/slapd.d -b "cn=config" -l $BASE_PATH/slapd.conf.ldif
22
+ # Load memberof and ref-int overlays and configure them.
23
+ sudo slapadd -F /etc/ldap/slapd.d -b "cn=config" -l $BASE_PATH/memberof.ldif
24
+ # Load retcode overlay and configure
25
+ sudo slapadd -F /etc/ldap/slapd.d -b "cn=config" -l $BASE_PATH/retcode.ldif
26
+
27
+ # Add base domain.
28
+ sudo slapadd -F /etc/ldap/slapd.d <<EOM
29
+ dn: dc=rubyldap,dc=com
30
+ objectClass: top
31
+ objectClass: domain
32
+ dc: rubyldap
33
+ EOM
34
+
35
+ sudo chown -R openldap.openldap /etc/ldap/slapd.d
36
+ sudo chown -R openldap.openldap /var/lib/ldap
37
+
38
+ sudo /etc/init.d/slapd start
39
+
40
+ # Import seed data.
41
+ # NOTE: use ldapadd in order for memberOf and refint to apply, instead of:
42
+ # cat $SEED_PATH/seed.ldif | sudo slapadd -F /etc/ldap/slapd.d
43
+ /usr/bin/time sudo ldapadd -x -D "cn=admin,dc=rubyldap,dc=com" -w passworD1 \
44
+ -h localhost -p 389 \
45
+ -f $SEED_PATH/seed.ldif
46
+
47
+ sudo rm -rf $TMPDIR
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bash
2
+ # Usage: script/package
3
+ # Updates the gemspec and builds a new gem in the pkg directory.
4
+
5
+ mkdir -p pkg
6
+ gem build *.gemspec
7
+ mv *.gem pkg
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env bash
2
+ # Usage: script/release
3
+ # Build the package, tag a commit, push it to origin, and then release the
4
+ # package publicly.
5
+
6
+ set -e
7
+
8
+ version="$(script/package | grep Version: | awk '{print $2}')"
9
+ [ -n "$version" ] || exit 1
10
+
11
+ echo $version
12
+ git commit --allow-empty -a -m "Release $version"
13
+ git tag "v$version"
14
+ git push origin
15
+ git push origin "v$version"
16
+ gem push pkg/*-${version}.gem
@@ -0,0 +1,22 @@
1
+ require_relative '../../test_helper'
2
+
3
+ class TestBERArrayExtension < Test::Unit::TestCase
4
+ def test_control_code_array
5
+ control_codes = []
6
+ control_codes << ['1.2.3'.to_ber, true.to_ber].to_ber_sequence
7
+ control_codes << ['1.7.9'.to_ber, false.to_ber].to_ber_sequence
8
+ control_codes = control_codes.to_ber_sequence
9
+ res = [['1.2.3', true],['1.7.9',false]].to_ber_control
10
+ assert_equal control_codes, res
11
+ end
12
+
13
+ def test_wrap_array_if_not_nested
14
+ result1 = ['1.2.3', true].to_ber_control
15
+ result2 = [['1.2.3', true]].to_ber_control
16
+ assert_equal result2, result1
17
+ end
18
+
19
+ def test_empty_string_if_empty_array
20
+ assert_equal "", [].to_ber_control
21
+ end
22
+ end
@@ -0,0 +1,25 @@
1
+ require_relative '../../test_helper'
2
+
3
+ class TestBERStringExtension < Test::Unit::TestCase
4
+ def setup
5
+ @bind_request = "0$\002\001\001`\037\002\001\003\004\rAdministrator\200\vad_is_bogus UNCONSUMED".b
6
+ @result = @bind_request.read_ber!(Net::LDAP::AsnSyntax)
7
+ end
8
+
9
+ def test_parse_ber
10
+ assert_equal [1, [3, "Administrator", "ad_is_bogus"]], @result
11
+ end
12
+
13
+ def test_unconsumed_message
14
+ assert_equal " UNCONSUMED", @bind_request
15
+ end
16
+
17
+ def test_exception_does_not_modify_string
18
+ original = "0$\002\001\001`\037\002\001\003\004\rAdministrator\200\vad_is_bogus".b
19
+ duplicate = original.dup
20
+ flexmock(StringIO).new_instances.should_receive(:read_ber).and_raise(Net::BER::BerError)
21
+ duplicate.read_ber!(Net::LDAP::AsnSyntax) rescue Net::BER::BerError
22
+
23
+ assert_equal original, duplicate
24
+ end
25
+ end
@@ -0,0 +1,126 @@
1
+ require_relative '../test_helper'
2
+
3
+ class TestBEREncoding < Test::Unit::TestCase
4
+ def test_empty_array
5
+ assert_equal [], [].to_ber.read_ber
6
+ end
7
+
8
+ def test_array
9
+ ary = [1,2,3]
10
+ encoded_ary = ary.map { |el| el.to_ber }.to_ber
11
+
12
+ assert_equal ary, encoded_ary.read_ber
13
+ end
14
+
15
+ # http://tools.ietf.org/html/rfc4511#section-5.1
16
+ def test_true
17
+ assert_equal "\x01\x01\xFF".b, true.to_ber
18
+ end
19
+
20
+ def test_false
21
+ assert_equal "\x01\x01\x00", false.to_ber
22
+ end
23
+
24
+ # Sample based
25
+ {
26
+ 0 => "\x02\x01\x00",
27
+ 1 => "\x02\x01\x01",
28
+ 127 => "\x02\x01\x7F",
29
+ 128 => "\x02\x01\x80",
30
+ 255 => "\x02\x01\xFF",
31
+ 256 => "\x02\x02\x01\x00",
32
+ 65535 => "\x02\x02\xFF\xFF",
33
+ 65536 => "\x02\x03\x01\x00\x00",
34
+ 16_777_215 => "\x02\x03\xFF\xFF\xFF",
35
+ 0x01000000 => "\x02\x04\x01\x00\x00\x00",
36
+ 0x3FFFFFFF => "\x02\x04\x3F\xFF\xFF\xFF",
37
+ 0x4FFFFFFF => "\x02\x04\x4F\xFF\xFF\xFF",
38
+
39
+ # Some odd samples...
40
+ 5 => "\002\001\005",
41
+ 500 => "\002\002\001\364",
42
+ 50_000 => "\x02\x02\xC3P",
43
+ 5_000_000_000 => "\002\005\001*\005\362\000"
44
+ }.each do |number, expected_encoding|
45
+ define_method "test_encode_#{number}" do
46
+ assert_equal expected_encoding.b, number.to_ber
47
+ end
48
+ end
49
+
50
+ # Round-trip encoding: This is mostly to be sure to cover Bignums well.
51
+ def test_powers_of_two
52
+ 100.times do |p|
53
+ n = 2 << p
54
+
55
+ assert_equal n, n.to_ber.read_ber
56
+ end
57
+ end
58
+
59
+ def test_powers_of_ten
60
+ 100.times do |p|
61
+ n = 5 * 10**p
62
+
63
+ assert_equal n, n.to_ber.read_ber
64
+ end
65
+ end
66
+
67
+ if "Ruby 1.9".respond_to?(:encoding)
68
+ def test_encode_utf8_strings
69
+ assert_equal "\x04\x02\xC3\xA5".b, "\u00e5".force_encoding("UTF-8").to_ber
70
+ end
71
+
72
+ def test_utf8_encodable_strings
73
+ assert_equal "\x04\nteststring", "teststring".encode("US-ASCII").to_ber
74
+ end
75
+
76
+ def test_encode_binary_data
77
+ # This is used for searching for GUIDs in Active Directory
78
+ assert_equal "\x04\x10" + "j1\xB4\xA1*\xA2zA\xAC\xA9`?'\xDDQ\x16".b,
79
+ ["6a31b4a12aa27a41aca9603f27dd5116"].pack("H*").to_ber_bin
80
+ end
81
+
82
+ def test_non_utf8_encodable_strings
83
+ assert_equal "\x04\x01\x81".b, "\x81".to_ber
84
+ end
85
+ end
86
+ end
87
+
88
+ class TestBERDecoding < Test::Unit::TestCase
89
+ def test_decode_number
90
+ assert_equal 6, "\002\001\006".read_ber(Net::LDAP::AsnSyntax)
91
+ end
92
+
93
+ def test_decode_string
94
+ assert_equal "testing", "\004\007testing".read_ber(Net::LDAP::AsnSyntax)
95
+ end
96
+
97
+ def test_decode_ldap_bind_request
98
+ assert_equal [1, [3, "Administrator", "ad_is_bogus"]], "0$\002\001\001`\037\002\001\003\004\rAdministrator\200\vad_is_bogus".read_ber(Net::LDAP::AsnSyntax)
99
+ end
100
+ end
101
+
102
+ class TestBERIdentifiedString < Test::Unit::TestCase
103
+ def test_binary_data
104
+ data = ["6a31b4a12aa27a41aca9603f27dd5116"].pack("H*").force_encoding("ASCII-8BIT")
105
+ bis = Net::BER::BerIdentifiedString.new(data)
106
+
107
+ assert bis.valid_encoding?, "should be a valid encoding"
108
+ assert_equal "ASCII-8BIT", bis.encoding.name
109
+ end
110
+
111
+ def test_ascii_data_in_utf8
112
+ data = "some text".force_encoding("UTF-8")
113
+ bis = Net::BER::BerIdentifiedString.new(data)
114
+
115
+ assert bis.valid_encoding?, "should be a valid encoding"
116
+ assert_equal "UTF-8", bis.encoding.name
117
+ end
118
+
119
+ def test_ut8_data_in_utf8
120
+ data = ["e4b8ad"].pack("H*").force_encoding("UTF-8")
121
+ bis = Net::BER::BerIdentifiedString.new(data)
122
+
123
+ assert bis.valid_encoding?, "should be a valid encoding"
124
+ assert_equal "UTF-8", bis.encoding.name
125
+ end
126
+ end
@@ -0,0 +1,33 @@
1
+ dn: cn=module,cn=config
2
+ cn: module
3
+ objectClass: olcModuleList
4
+ objectClass: top
5
+ olcModulePath: /usr/lib/ldap
6
+ olcModuleLoad: memberof.la
7
+
8
+ dn: olcOverlay={0}memberof,olcDatabase={1}hdb,cn=config
9
+ objectClass: olcConfig
10
+ objectClass: olcMemberOf
11
+ objectClass: olcOverlayConfig
12
+ objectClass: top
13
+ olcOverlay: memberof
14
+ olcMemberOfDangling: ignore
15
+ olcMemberOfRefInt: TRUE
16
+ olcMemberOfGroupOC: groupOfNames
17
+ olcMemberOfMemberAD: member
18
+ olcMemberOfMemberOfAD: memberOf
19
+
20
+ dn: cn=module,cn=config
21
+ cn: module
22
+ objectclass: olcModuleList
23
+ objectclass: top
24
+ olcmoduleload: refint.la
25
+ olcmodulepath: /usr/lib/ldap
26
+
27
+ dn: olcOverlay={1}refint,olcDatabase={1}hdb,cn=config
28
+ objectClass: olcConfig
29
+ objectClass: olcOverlayConfig
30
+ objectClass: olcRefintConfig
31
+ objectClass: top
32
+ olcOverlay: {1}refint
33
+ olcRefintAttribute: memberof member manager owner
@@ -0,0 +1,76 @@
1
+ dn: cn=module,cn=config
2
+ cn: module
3
+ objectClass: olcModuleList
4
+ objectClass: top
5
+ olcModulePath: /usr/lib/ldap
6
+ olcModuleLoad: retcode.la
7
+
8
+ # source: http://www.opensource.apple.com/source/OpenLDAP/OpenLDAP-186/OpenLDAP/tests/data/retcode.conf?txt
9
+
10
+ dn: olcOverlay={2}retcode,olcDatabase={1}hdb,cn=config
11
+ objectClass: olcConfig
12
+ objectClass: olcRetcodeConfig
13
+ objectClass: olcOverlayConfig
14
+ objectClass: top
15
+ olcOverlay: retcode
16
+ olcRetcodeParent: ou=Retcodes,dc=rubyldap,dc=com
17
+ olcRetcodeInDir: TRUE
18
+ olcRetcodeSleep: 0
19
+ olcRetcodeItem: "cn=success" 0x00
20
+ olcRetcodeItem: "cn=success w/ delay" 0x00 sleeptime=2
21
+ olcRetcodeItem: "cn=operationsError" 0x01
22
+ olcRetcodeItem: "cn=protocolError" 0x02
23
+ olcRetcodeItem: "cn=timeLimitExceeded" 0x03 op=search
24
+ olcRetcodeItem: "cn=sizeLimitExceeded" 0x04 op=search
25
+ olcRetcodeItem: "cn=compareFalse" 0x05 op=compare
26
+ olcRetcodeItem: "cn=compareTrue" 0x06 op=compare
27
+ olcRetcodeItem: "cn=authMethodNotSupported" 0x07
28
+ olcRetcodeItem: "cn=strongAuthNotSupported" 0x07 text="same as authMethodNotSupported"
29
+ olcRetcodeItem: "cn=strongAuthRequired" 0x08
30
+ olcRetcodeItem: "cn=strongerAuthRequired" 0x08 text="same as strongAuthRequired"
31
+ olcRetcodeItem: "cn=referral" 0x0a text="LDAPv3" ref="ldap://:9019"
32
+ olcRetcodeItem: "cn=adminLimitExceeded" 0x0b text="LDAPv3"
33
+ olcRetcodeItem: "cn=unavailableCriticalExtension" 0x0c text="LDAPv3"
34
+ olcRetcodeItem: "cn=confidentialityRequired" 0x0d text="LDAPv3"
35
+ olcRetcodeItem: "cn=saslBindInProgress" 0x0e text="LDAPv3"
36
+ olcRetcodeItem: "cn=noSuchAttribute" 0x10
37
+ olcRetcodeItem: "cn=undefinedAttributeType" 0x11
38
+ olcRetcodeItem: "cn=inappropriateMatching" 0x12
39
+ olcRetcodeItem: "cn=constraintViolation" 0x13
40
+ olcRetcodeItem: "cn=attributeOrValueExists" 0x14
41
+ olcRetcodeItem: "cn=invalidAttributeSyntax" 0x15
42
+ olcRetcodeItem: "cn=noSuchObject" 0x20
43
+ olcRetcodeItem: "cn=aliasProblem" 0x21
44
+ olcRetcodeItem: "cn=invalidDNSyntax" 0x22
45
+ olcRetcodeItem: "cn=aliasDereferencingProblem" 0x24
46
+ olcRetcodeItem: "cn=proxyAuthzFailure" 0x2F text="LDAPv3 proxy authorization"
47
+ olcRetcodeItem: "cn=inappropriateAuthentication" 0x30
48
+ olcRetcodeItem: "cn=invalidCredentials" 0x31
49
+ olcRetcodeItem: "cn=insufficientAccessRights" 0x32
50
+ olcRetcodeItem: "cn=busy" 0x33
51
+ olcRetcodeItem: "cn=unavailable" 0x34
52
+ olcRetcodeItem: "cn=unwillingToPerform" 0x35
53
+ olcRetcodeItem: "cn=loopDetect" 0x36
54
+ olcRetcodeItem: "cn=namingViolation" 0x40
55
+ olcRetcodeItem: "cn=objectClassViolation" 0x41
56
+ olcRetcodeItem: "cn=notAllowedOnNonleaf" 0x42
57
+ olcRetcodeItem: "cn=notAllowedOnRDN" 0x43
58
+ olcRetcodeItem: "cn=entryAlreadyExists" 0x44
59
+ olcRetcodeItem: "cn=objectClassModsProhibited" 0x45
60
+ olcRetcodeItem: "cn=resultsTooLarge" 0x46 text="CLDAP"
61
+ olcRetcodeItem: "cn=affectsMultipleDSAs" 0x47 text="LDAPv3"
62
+ olcRetcodeItem: "cn=other" 0x50
63
+ olcRetcodeItem: "cn=cupResourcesExhausted" 0x71
64
+ olcRetcodeItem: "cn=cupSecurityViolation" 0x72
65
+ olcRetcodeItem: "cn=cupInvalidData" 0x73
66
+ olcRetcodeItem: "cn=cupUnsupportedScheme" 0x74
67
+ olcRetcodeItem: "cn=cupReloadRequired" 0x75
68
+ olcRetcodeItem: "cn=cancelled" 0x76
69
+ olcRetcodeItem: "cn=noSuchOperation" 0x77
70
+ olcRetcodeItem: "cn=tooLate" 0x78
71
+ olcRetcodeItem: "cn=cannotCancel" 0x79
72
+ olcRetcodeItem: "cn=syncRefreshRequired" 0x4100
73
+ olcRetcodeItem: "cn=noOperation" 0x410e
74
+ olcRetcodeItem: "cn=assertionFailed" 0x410f
75
+ olcRetcodeItem: "cn=noReferralsFound" 0x4110
76
+ olcRetcodeItem: "cn=cannotChain" 0x4111
@@ -0,0 +1,67 @@
1
+ dn: cn=config
2
+ objectClass: olcGlobal
3
+ cn: config
4
+ olcPidFile: /var/run/slapd/slapd.pid
5
+ olcArgsFile: /var/run/slapd/slapd.args
6
+ olcLogLevel: none
7
+ olcToolThreads: 1
8
+
9
+ dn: olcDatabase={-1}frontend,cn=config
10
+ objectClass: olcDatabaseConfig
11
+ objectClass: olcFrontendConfig
12
+ olcDatabase: {-1}frontend
13
+ olcSizeLimit: 500
14
+ olcAccess: {0}to * by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth manage by * break
15
+ olcAccess: {1}to dn.exact="" by * read
16
+ olcAccess: {2}to dn.base="cn=Subschema" by * read
17
+
18
+ dn: olcDatabase=config,cn=config
19
+ objectClass: olcDatabaseConfig
20
+ olcDatabase: config
21
+ olcAccess: to * by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth manage by * break
22
+
23
+ dn: cn=schema,cn=config
24
+ objectClass: olcSchemaConfig
25
+ cn: schema
26
+
27
+ include: file:///etc/ldap/schema/core.ldif
28
+ include: file:///etc/ldap/schema/cosine.ldif
29
+ include: file:///etc/ldap/schema/nis.ldif
30
+ include: file:///etc/ldap/schema/inetorgperson.ldif
31
+
32
+ dn: cn=module{0},cn=config
33
+ objectClass: olcModuleList
34
+ cn: module{0}
35
+ olcModulePath: /usr/lib/ldap
36
+ olcModuleLoad: back_hdb
37
+
38
+ dn: olcBackend=hdb,cn=config
39
+ objectClass: olcBackendConfig
40
+ olcBackend: hdb
41
+
42
+ dn: olcDatabase=hdb,cn=config
43
+ objectClass: olcDatabaseConfig
44
+ objectClass: olcHdbConfig
45
+ olcDatabase: hdb
46
+ olcDbCheckpoint: 512 30
47
+ olcDbConfig: set_cachesize 1 0 0
48
+ olcDbConfig: set_lk_max_objects 1500
49
+ olcDbConfig: set_lk_max_locks 1500
50
+ olcDbConfig: set_lk_max_lockers 1500
51
+ olcLastMod: TRUE
52
+ olcSuffix: dc=rubyldap,dc=com
53
+ olcDbDirectory: /var/lib/ldap
54
+ olcRootDN: cn=admin,dc=rubyldap,dc=com
55
+ # admin's password: "passworD1"
56
+ olcRootPW: {SHA}LFSkM9eegU6j3PeGG7UuHrT/KZM=
57
+ olcDbIndex: objectClass eq
58
+ olcAccess: to attrs=userPassword,shadowLastChange
59
+ by self write
60
+ by anonymous auth
61
+ by dn="cn=admin,dc=rubyldap,dc=com" write
62
+ by * none
63
+ olcAccess: to dn.base="" by * read
64
+ olcAccess: to *
65
+ by self write
66
+ by dn="cn=admin,dc=rubyldap,dc=com" write
67
+ by * read