When slapd receives an operation to a SHELL backend, the backend consults the information given in the slapd configuration file to determine what program to invoke to handle the operation. For example, if the SHELL database definition in the configuration file contained a line like the following, the indicated command would be invoked in response to a search request:
search /usr/local/bin/search.shslapd feeds a text representation of the request to the command on the command's standard input. slapd then reads a text representation of the results or errors produced by the command from the command's standard output. These text results are converted to LDAP format and returned to the client. slapd pays attention to the exit status of the command in some situations (that is, to determine if a bind request has succeeded or not).