ldap-shell-utils 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +3 -3
- data/lib/ldap-shell-utils/cli_application.rb +3 -2
- data/lib/ldap-shell-utils/ldap_connection.rb +1 -2
- data/lib/ldap-shell-utils/version.rb +12 -0
- metadata +26 -28
- data/lib/version.rb +0 -10
data/README.rdoc
CHANGED
@@ -10,8 +10,8 @@
|
|
10
10
|
|
11
11
|
== Examples
|
12
12
|
|
13
|
-
* lsu --config myldapconfigfile.yml --filter uid=testuser --attributes
|
14
|
-
* lsu --config myldapconfigfile.yml --filter '(&(
|
13
|
+
* lsu --config myldapconfigfile.yml --audit --filter uid=testuser --attributes mail,givenName
|
14
|
+
* lsu --config myldapconfigfile.yml --filter '(&(uid=testuser)(mail=*@example.com))'
|
15
15
|
|
16
16
|
* How to write a simple shell wrapper that can be work with base64 dn for example
|
17
17
|
|
@@ -20,7 +20,7 @@
|
|
20
20
|
#
|
21
21
|
__ldap_find_by_uid() {
|
22
22
|
|
23
|
-
[ -s ${LDAP_CONFIG} ] && [ -n "${1}" ] && lsu --config ${LDAP_CONFIG} --filter uid=${1} dn
|
23
|
+
[ -s ${LDAP_CONFIG} ] && [ -n "${1}" ] && lsu --config ${LDAP_CONFIG} --filter "(uid=${1})" --attributes dn
|
24
24
|
}
|
25
25
|
|
26
26
|
|
@@ -14,8 +14,9 @@ module LdapShellUtils
|
|
14
14
|
|
15
15
|
def run( options )
|
16
16
|
|
17
|
-
ConfigContext.
|
18
|
-
|
17
|
+
ConfigContext.configure( File.expand_path( options[:config] ) )
|
18
|
+
|
19
|
+
results = LdapConnection.new( ConfigContext.url, ConfigContext.to_hash ).search( options[:filter], options[:attributes], options[:audit] )
|
19
20
|
results.each { |e| print_entry( e ) } if results
|
20
21
|
rescue Exception => e
|
21
22
|
$stderr.puts( e.message )
|
@@ -29,8 +29,7 @@ module LdapShellUtils
|
|
29
29
|
}
|
30
30
|
|
31
31
|
@configuration[:encryption] = { :method => :simple_tls } if( @uri.scheme.to_sym == :ldaps )
|
32
|
-
|
33
|
-
@connection = Net::LDAP.new( @configuration )
|
32
|
+
@connection = Net::LDAP.new( @configuration )
|
34
33
|
|
35
34
|
self
|
36
35
|
rescue Exception => e
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ldap-shell-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Javier Juarez
|
@@ -15,11 +15,9 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
19
|
-
default_executable: lsu
|
18
|
+
date: 2011-06-03 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
|
-
type: :runtime
|
23
21
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
22
|
none: false
|
25
23
|
requirements:
|
@@ -29,11 +27,11 @@ dependencies:
|
|
29
27
|
segments:
|
30
28
|
- 0
|
31
29
|
version: "0"
|
32
|
-
name: slop
|
33
30
|
version_requirements: *id001
|
31
|
+
type: :runtime
|
32
|
+
name: slop
|
34
33
|
prerelease: false
|
35
34
|
- !ruby/object:Gem::Dependency
|
36
|
-
type: :runtime
|
37
35
|
requirement: &id002 !ruby/object:Gem::Requirement
|
38
36
|
none: false
|
39
37
|
requirements:
|
@@ -43,11 +41,11 @@ dependencies:
|
|
43
41
|
segments:
|
44
42
|
- 0
|
45
43
|
version: "0"
|
46
|
-
name: net-ldap
|
47
44
|
version_requirements: *id002
|
45
|
+
type: :runtime
|
46
|
+
name: net-ldap
|
48
47
|
prerelease: false
|
49
48
|
- !ruby/object:Gem::Dependency
|
50
|
-
type: :runtime
|
51
49
|
requirement: &id003 !ruby/object:Gem::Requirement
|
52
50
|
none: false
|
53
51
|
requirements:
|
@@ -57,11 +55,11 @@ dependencies:
|
|
57
55
|
segments:
|
58
56
|
- 0
|
59
57
|
version: "0"
|
60
|
-
name: config_context
|
61
58
|
version_requirements: *id003
|
59
|
+
type: :runtime
|
60
|
+
name: config_context
|
62
61
|
prerelease: false
|
63
62
|
- !ruby/object:Gem::Dependency
|
64
|
-
type: :development
|
65
63
|
requirement: &id004 !ruby/object:Gem::Requirement
|
66
64
|
none: false
|
67
65
|
requirements:
|
@@ -73,11 +71,11 @@ dependencies:
|
|
73
71
|
- 0
|
74
72
|
- 0
|
75
73
|
version: 1.0.0
|
76
|
-
name: bundler
|
77
74
|
version_requirements: *id004
|
75
|
+
type: :development
|
76
|
+
name: bundler
|
78
77
|
prerelease: false
|
79
78
|
- !ruby/object:Gem::Dependency
|
80
|
-
type: :development
|
81
79
|
requirement: &id005 !ruby/object:Gem::Requirement
|
82
80
|
none: false
|
83
81
|
requirements:
|
@@ -87,11 +85,11 @@ dependencies:
|
|
87
85
|
segments:
|
88
86
|
- 0
|
89
87
|
version: "0"
|
90
|
-
name: shoulda
|
91
88
|
version_requirements: *id005
|
89
|
+
type: :development
|
90
|
+
name: shoulda
|
92
91
|
prerelease: false
|
93
92
|
- !ruby/object:Gem::Dependency
|
94
|
-
type: :development
|
95
93
|
requirement: &id006 !ruby/object:Gem::Requirement
|
96
94
|
none: false
|
97
95
|
requirements:
|
@@ -103,11 +101,11 @@ dependencies:
|
|
103
101
|
- 5
|
104
102
|
- 1
|
105
103
|
version: 1.5.1
|
106
|
-
name: jeweler
|
107
104
|
version_requirements: *id006
|
105
|
+
type: :development
|
106
|
+
name: jeweler
|
108
107
|
prerelease: false
|
109
108
|
- !ruby/object:Gem::Dependency
|
110
|
-
type: :development
|
111
109
|
requirement: &id007 !ruby/object:Gem::Requirement
|
112
110
|
none: false
|
113
111
|
requirements:
|
@@ -117,11 +115,11 @@ dependencies:
|
|
117
115
|
segments:
|
118
116
|
- 0
|
119
117
|
version: "0"
|
120
|
-
name: rcov
|
121
118
|
version_requirements: *id007
|
119
|
+
type: :development
|
120
|
+
name: rcov
|
122
121
|
prerelease: false
|
123
122
|
- !ruby/object:Gem::Dependency
|
124
|
-
type: :runtime
|
125
123
|
requirement: &id008 !ruby/object:Gem::Requirement
|
126
124
|
none: false
|
127
125
|
requirements:
|
@@ -131,11 +129,11 @@ dependencies:
|
|
131
129
|
segments:
|
132
130
|
- 0
|
133
131
|
version: "0"
|
134
|
-
name: net-ldap
|
135
132
|
version_requirements: *id008
|
133
|
+
type: :runtime
|
134
|
+
name: net-ldap
|
136
135
|
prerelease: false
|
137
136
|
- !ruby/object:Gem::Dependency
|
138
|
-
type: :runtime
|
139
137
|
requirement: &id009 !ruby/object:Gem::Requirement
|
140
138
|
none: false
|
141
139
|
requirements:
|
@@ -145,11 +143,11 @@ dependencies:
|
|
145
143
|
segments:
|
146
144
|
- 0
|
147
145
|
version: "0"
|
148
|
-
name: slop
|
149
146
|
version_requirements: *id009
|
147
|
+
type: :runtime
|
148
|
+
name: slop
|
150
149
|
prerelease: false
|
151
150
|
- !ruby/object:Gem::Dependency
|
152
|
-
type: :runtime
|
153
151
|
requirement: &id010 !ruby/object:Gem::Requirement
|
154
152
|
none: false
|
155
153
|
requirements:
|
@@ -159,8 +157,9 @@ dependencies:
|
|
159
157
|
segments:
|
160
158
|
- 0
|
161
159
|
version: "0"
|
162
|
-
name: config_context
|
163
160
|
version_requirements: *id010
|
161
|
+
type: :runtime
|
162
|
+
name: config_context
|
164
163
|
prerelease: false
|
165
164
|
description: This is a simple wrapper over ldapsearch util avoiding base64 dn and others gotchas
|
166
165
|
email: javier.juarez@gmail.com
|
@@ -174,10 +173,9 @@ files:
|
|
174
173
|
- lib/ldap-shell-utils.rb
|
175
174
|
- lib/ldap-shell-utils/cli_application.rb
|
176
175
|
- lib/ldap-shell-utils/ldap_connection.rb
|
177
|
-
- lib/version.rb
|
176
|
+
- lib/ldap-shell-utils/version.rb
|
178
177
|
- README.rdoc
|
179
178
|
- bin/lsu
|
180
|
-
has_rdoc: true
|
181
179
|
homepage: http://github.com/jjuarez/ldap-shell-utils
|
182
180
|
licenses:
|
183
181
|
- MIT License
|
@@ -207,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
207
205
|
requirements: []
|
208
206
|
|
209
207
|
rubyforge_project: http://github.com/jjuarez/ldap-shell-utils
|
210
|
-
rubygems_version: 1.
|
208
|
+
rubygems_version: 1.8.5
|
211
209
|
signing_key:
|
212
210
|
specification_version: 3
|
213
211
|
summary: A minimal ldapsearch wrapper
|