Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / external / bsd / openldap / dist / servers / slapd / unbind.c
blobdddf1ae89581ac2309fa00197338fa4b088d102d
1 /* unbind.c - decode an ldap unbind operation and pass it to a backend db */
2 /* $OpenLDAP: pkg/ldap/servers/slapd/unbind.c,v 1.26.2.3 2008/02/11 23:26:45 kurt Exp $ */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 1998-2008 The OpenLDAP Foundation.
6 * All rights reserved.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted only as authorized by the OpenLDAP
10 * Public License.
12 * A copy of this license is available in the file LICENSE in the
13 * top-level directory of the distribution or, alternatively, at
14 * <http://www.OpenLDAP.org/license.html>.
16 /* Portions Copyright (c) 1995 Regents of the University of Michigan.
17 * All rights reserved.
19 * Redistribution and use in source and binary forms are permitted
20 * provided that this notice is preserved and that due credit is given
21 * to the University of Michigan at Ann Arbor. The name of the University
22 * may not be used to endorse or promote products derived from this
23 * software without specific prior written permission. This software
24 * is provided ``as is'' without express or implied warranty.
28 #include "portable.h"
30 #include <stdio.h>
32 #include <ac/socket.h>
34 #include "slap.h"
36 int
37 do_unbind( Operation *op, SlapReply *rs )
39 Debug( LDAP_DEBUG_TRACE, "%s do_unbind\n",
40 op->o_log_prefix, 0, 0 );
43 * Parse the unbind request. It looks like this:
45 * UnBindRequest ::= NULL
48 Statslog( LDAP_DEBUG_STATS, "%s UNBIND\n", op->o_log_prefix,
49 0, 0, 0, 0 );
51 if ( frontendDB->be_unbind ) {
52 op->o_bd = frontendDB;
53 (void)frontendDB->be_unbind( op, rs );
54 op->o_bd = NULL;
57 /* pass the unbind to all backends */
58 (void)backend_unbind( op, rs );
60 return 0;