]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapd-shell.5
7be316ff333531872d6657a31028d3d0f0f8382f
[openldap] / doc / man / man5 / slapd-shell.5
1 .TH SLAPD-SHELL 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2005 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
4 .\" $OpenLDAP$
5 .SH NAME
6 slapd-shell \- Shell backend to slapd
7 .SH SYNOPSIS
8 ETCDIR/slapd.conf
9 .SH DESCRIPTION
10 The Shell backend to
11 .BR slapd (8)
12 executes external programs to implement operations, and is designed to
13 make it easy to tie an existing database to the
14 .B slapd
15 front-end.
16 .LP
17 This backend is is primarily intended to be used in prototypes.
18 .SH WARNING
19 The
20 .B abandon
21 shell command has been removed since OpenLDAP 2.1.
22 .SH CONFIGURATION
23 These
24 .B slapd.conf
25 options apply to the SHELL backend database.
26 That is, they must follow a "database shell" line and come before any
27 subsequent "backend" or "database" lines.
28 Other database options are described in the
29 .BR slapd.conf (5)
30 manual page.
31 .LP
32 These options specify the pathname and arguments of the program to
33 execute in response to the given LDAP operation.
34 Each option is followed by the input lines that the program receives:
35 .TP
36 .B add      <pathname> <argument>...
37 .nf
38 ADD
39 msgid: <message id>
40 <repeat { "suffix:" <database suffix DN> }>
41 <entry in LDIF format>
42 .fi
43 .TP
44 .B bind     <pathname> <argument>...
45 .nf
46 BIND
47 msgid: <message id>
48 <repeat { "suffix:" <database suffix DN> }>
49 dn: <DN>
50 method: <method number>
51 credlen: <length of <credentials>>
52 cred: <credentials>
53 .fi
54 .TP
55 .B compare  <pathname> <argument>...
56 .nf
57 COMPARE
58 msgid: <message id>
59 <repeat { "suffix:" <database suffix DN> }>
60 dn: <DN>
61 <attribute>: <value>
62 .fi
63 .TP
64 .B delete   <pathname> <argument>...
65 .nf
66 DELETE
67 msgid: <message id>
68 <repeat { "suffix:" <database suffix DN> }>
69 dn: <DN>
70 .fi
71 .TP
72 .B modify   <pathname> <argument>...
73 .nf
74 MODIFY
75 msgid: <message id>
76 <repeat { "suffix:" <database suffix DN> }>
77 dn: <DN>
78 <repeat {
79     <"add"/"delete"/"replace">: <attribute>
80     <repeat { <attribute>: <value> }>
81     -
82 }>
83 .fi
84 .TP
85 .B modrdn   <pathname> <argument>...
86 .nf
87 MODRDN
88 msgid: <message id>
89 <repeat { "suffix:" <database suffix DN> }>
90 dn: <DN>
91 newrdn: <new RDN>
92 deleteoldrdn: <0 or 1>
93 <if new superior is specified: "newSuperior: <DN>">
94 .fi
95 .TP
96 .B search   <pathname> <argument>...
97 .nf
98 SEARCH
99 msgid: <message id>
100 <repeat { "suffix:" <database suffix DN> }>
101 base: <base DN>
102 scope: <0-2, see ldap.h>
103 deref: <0-3, see ldap.h>
104 sizelimit: <size limit>
105 timelimit: <time limit>
106 filter: <filter>
107 attrsonly: <0 or 1>
108 attrs: <"all" or space-separated attribute list>
109 .fi
110 .TP
111 .B unbind   <pathname> <argument>...
112 .nf
113 UNBIND
114 msgid: <message id>
115 <repeat { "suffix:" <database suffix DN> }>
116 dn: <bound DN>
117 .fi
118 .LP
119 Note that you need only supply configuration lines for those commands you
120 want the backend to handle.
121 Operations for which a command is not supplied will be refused with an
122 "unwilling to perform" error.
123 .LP
124 The commands - except \fBunbind\fP - should output:
125 .RS
126 .nf
127 RESULT
128 code: <integer>
129 matched: <matched DN>
130 info: <text>
131 .fi
132 .RE
133 where only RESULT is mandatory.
134 The \fBsearch\fP RESULT should be preceded by the entries in LDIF
135 format, each entry followed by a blank line.
136 Lines starting with `#' or `DEBUG:' are ignored.
137 .SH ACCESS CONTROL
138 The
139 .B shell
140 backend does not honor all ACL semantics as described in
141 .BR slapd.access (5).
142 In general, access to objects is checked by using a dummy object
143 that contains only the DN, so access rules that rely on the contents
144 of the object are not honored.
145 In detail:
146 .LP
147 The
148 .B add
149 operation does not require
150 .B write (=w)
151 access to the 
152 .B children
153 pseudo-attribute of the parent entry.
154 .LP
155 The
156 .B bind
157 operation requires 
158 .B auth (=x)
159 access to the 
160 .B entry
161 pseudo-attribute of the entry whose identity is being assessed;
162 .B auth (=x)
163 access to the credentials is not checked, but rather delegated 
164 to the underlying shell script.
165 .LP
166 The
167 .B compare
168 operation requires 
169 .B read (=r)
170 access (FIXME: wouldn't 
171 .B compare (=c)
172 be a more appropriate choice?)
173 to the 
174 .B entry
175 pseudo-attribute
176 of the object whose value is being asserted;
177 .B compare (=c)
178 access to the attribute whose value is being asserted is not checked.
179 .LP
180 The
181 .B delete
182 operation does not require
183 .B write (=w)
184 access to the 
185 .B children
186 pseudo-attribute of the parent entry.
187 .LP
188 The
189 .B modify
190 operation requires
191 .B write (=w)
192 access to the 
193 .B entry 
194 pseudo-attribute;
195 .B write (=w)
196 access to the specific attributes that are modified is not checked.
197 .LP
198 The
199 .B modrdn
200 operation does not require
201 .B write (=w)
202 access to the 
203 .B children
204 pseudo-attribute of the parent entry, nor to that of the new parent,
205 if different;
206 .B write (=w)
207 access to the distinguished values of the naming attributes
208 is not checked.
209 .LP
210 The
211 .B search 
212 operation does not require
213 .B search (=s)
214 access to the 
215 .B entry
216 pseudo_attribute of the searchBase;
217 .B search (=s)
218 access to the attributes and values used in the filter is not checked.
219
220 .SH EXAMPLE
221 There is an example search script in the slapd/back-shell/ directory
222 in the OpenLDAP source tree.
223 .SH LIMITATIONS
224 The shell backend does not support threaded environments.
225 When using the shell backend, 
226 .BR slapd (8)
227 should be built
228 .IR --without-threads .
229 .SH FILES
230 .TP
231 ETCDIR/slapd.conf
232 default slapd configuration file
233 .SH SEE ALSO
234 .BR slapd.conf (5),
235 .BR slapd (8),
236 .BR sh (1).