]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapd-shell.5
4800d1468fb877dba545f5afa7696c3d7d84f2a5
[openldap] / doc / man / man5 / slapd-shell.5
1 .TH SLAPD-SHELL 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2017 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 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 \fBsearch\fP command should output the entries in LDIF format,
125 each entry followed by a blank line, and after these the RESULT below.
126 .LP
127 All commands except \fBunbind\fP should then output:
128 .RS
129 .nf
130 RESULT
131 code: <integer>
132 matched: <matched DN>
133 info: <text>
134 .fi
135 .RE
136 where only the RESULT line is mandatory.
137 Lines starting with `#' or `DEBUG:' are ignored.
138 .SH ACCESS CONTROL
139 The
140 .B shell
141 backend does not honor all ACL semantics as described in
142 .BR slapd.access (5).
143 In general, access to objects is checked by using a dummy object
144 that contains only the DN, so access rules that rely on the contents
145 of the object are not honored.
146 In detail:
147 .LP
148 The
149 .B add
150 operation does not require
151 .B write (=w)
152 access to the 
153 .B children
154 pseudo-attribute of the parent entry.
155 .LP
156 The
157 .B bind
158 operation requires 
159 .B auth (=x)
160 access to the 
161 .B entry
162 pseudo-attribute of the entry whose identity is being assessed;
163 .B auth (=x)
164 access to the credentials is not checked, but rather delegated 
165 to the underlying shell script.
166 .LP
167 The
168 .B compare
169 operation requires 
170 .B read (=r)
171 access (FIXME: wouldn't 
172 .B compare (=c)
173 be a more appropriate choice?)
174 to the 
175 .B entry
176 pseudo-attribute
177 of the object whose value is being asserted;
178 .B compare (=c)
179 access to the attribute whose value is being asserted is not checked.
180 .LP
181 The
182 .B delete
183 operation does not require
184 .B write (=w)
185 access to the 
186 .B children
187 pseudo-attribute of the parent entry.
188 .LP
189 The
190 .B modify
191 operation requires
192 .B write (=w)
193 access to the 
194 .B entry 
195 pseudo-attribute;
196 .B write (=w)
197 access to the specific attributes that are modified is not checked.
198 .LP
199 The
200 .B modrdn
201 operation does not require
202 .B write (=w)
203 access to the 
204 .B children
205 pseudo-attribute of the parent entry, nor to that of the new parent,
206 if different;
207 .B write (=w)
208 access to the distinguished values of the naming attributes
209 is not checked.
210 .LP
211 The
212 .B search 
213 operation does not require
214 .B search (=s)
215 access to the 
216 .B entry
217 pseudo_attribute of the searchBase;
218 .B search (=s)
219 access to the attributes and values used in the filter is not checked.
220
221 .SH EXAMPLE
222 There is an example search script in the slapd/back\-shell/ directory
223 in the OpenLDAP source tree.
224 .SH LIMITATIONS
225 The shell backend does not support threaded environments.
226 When using the shell backend, 
227 .BR slapd (8)
228 should be built
229 .IR \-\-without\-threads .
230 .SH FILES
231 .TP
232 ETCDIR/slapd.conf
233 default slapd configuration file
234 .SH SEE ALSO
235 .BR slapd.conf (5),
236 .BR slapd (8),
237 .BR sh (1).