1998-08-08 20:43:13 -04:00
|
|
|
/* unbind.c - decode an ldap unbind operation and pass it to a backend db */
|
1999-09-08 15:06:24 -04:00
|
|
|
/* $OpenLDAP$ */
|
2003-11-26 20:17:14 -05:00
|
|
|
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
|
|
|
|
*
|
2007-01-02 15:00:42 -05:00
|
|
|
* Copyright 1998-2007 The OpenLDAP Foundation.
|
2003-11-26 20:17:14 -05:00
|
|
|
* All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
|
* modification, are permitted only as authorized by the OpenLDAP
|
|
|
|
|
* Public License.
|
|
|
|
|
*
|
|
|
|
|
* A copy of this license is available in the file LICENSE in the
|
|
|
|
|
* top-level directory of the distribution or, alternatively, at
|
|
|
|
|
* <http://www.OpenLDAP.org/license.html>.
|
1999-08-06 19:07:46 -04:00
|
|
|
*/
|
2003-11-26 20:17:14 -05:00
|
|
|
/* Portions Copyright (c) 1995 Regents of the University of Michigan.
|
1998-08-08 20:43:13 -04:00
|
|
|
* All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* Redistribution and use in source and binary forms are permitted
|
|
|
|
|
* provided that this notice is preserved and that due credit is given
|
|
|
|
|
* to the University of Michigan at Ann Arbor. The name of the University
|
|
|
|
|
* may not be used to endorse or promote products derived from this
|
|
|
|
|
* software without specific prior written permission. This software
|
|
|
|
|
* is provided ``as is'' without express or implied warranty.
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
1998-10-24 21:41:42 -04:00
|
|
|
#include "portable.h"
|
|
|
|
|
|
1998-08-08 20:43:13 -04:00
|
|
|
#include <stdio.h>
|
1998-10-24 21:41:42 -04:00
|
|
|
|
|
|
|
|
#include <ac/socket.h>
|
|
|
|
|
|
1998-08-08 20:43:13 -04:00
|
|
|
#include "slap.h"
|
|
|
|
|
|
1999-07-01 17:20:45 -04:00
|
|
|
int
|
2003-03-30 04:03:54 -05:00
|
|
|
do_unbind( Operation *op, SlapReply *rs )
|
1998-08-08 20:43:13 -04:00
|
|
|
{
|
2007-07-22 23:51:42 -04:00
|
|
|
Debug( LDAP_DEBUG_TRACE, "%s do_unbind\n",
|
|
|
|
|
op->o_log_prefix, 0, 0 );
|
2001-01-15 14:17:29 -05:00
|
|
|
|
1998-08-08 20:43:13 -04:00
|
|
|
/*
|
|
|
|
|
* Parse the unbind request. It looks like this:
|
|
|
|
|
*
|
|
|
|
|
* UnBindRequest ::= NULL
|
|
|
|
|
*/
|
|
|
|
|
|
2004-09-26 19:00:00 -04:00
|
|
|
Statslog( LDAP_DEBUG_STATS, "%s UNBIND\n", op->o_log_prefix,
|
|
|
|
|
0, 0, 0, 0 );
|
1998-08-08 20:43:13 -04:00
|
|
|
|
2005-04-11 15:12:30 -04:00
|
|
|
if ( frontendDB->be_unbind ) {
|
|
|
|
|
op->o_bd = frontendDB;
|
|
|
|
|
(void)frontendDB->be_unbind( op, rs );
|
|
|
|
|
op->o_bd = NULL;
|
|
|
|
|
}
|
|
|
|
|
|
1998-08-08 20:43:13 -04:00
|
|
|
/* pass the unbind to all backends */
|
2005-04-11 15:12:30 -04:00
|
|
|
(void)backend_unbind( op, rs );
|
1999-07-01 17:20:45 -04:00
|
|
|
|
|
|
|
|
return 0;
|
1998-08-08 20:43:13 -04:00
|
|
|
}
|
2005-04-11 15:12:30 -04:00
|
|
|
|