From dbde2604d74d7a49cf4a64fe1bffa463c505642a Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 10 May 2000 20:11:58 +0000 Subject: [PATCH] Additional DNS SRV framework (a work in progress) add common request handler remove bind handler (not needed) --- configure | 2 +- servers/slapd/back-dnssrv/Makefile.in | 8 +++---- servers/slapd/back-dnssrv/add.c | 2 +- servers/slapd/back-dnssrv/back-dnssrv.h | 8 +++++++ servers/slapd/back-dnssrv/compare.c | 2 +- servers/slapd/back-dnssrv/delete.c | 2 +- servers/slapd/back-dnssrv/init.c | 2 +- servers/slapd/back-dnssrv/modify.c | 2 +- servers/slapd/back-dnssrv/modrdn.c | 2 +- .../slapd/back-dnssrv/{bind.c => request.c} | 24 +++++++------------ servers/slapd/back-dnssrv/search.c | 6 ++--- 11 files changed, 31 insertions(+), 29 deletions(-) rename servers/slapd/back-dnssrv/{bind.c => request.c} (53%) diff --git a/configure b/configure index da03eb803a..f056ce74bc 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # $OpenLDAP$ -# from OpenLDAP: pkg/ldap/configure.in,v 1.296 2000/05/10 16:17:39 kurt Exp +# from OpenLDAP: pkg/ldap/configure.in,v 1.297 2000/05/10 18:07:03 kurt Exp # Copyright 1998-2000 The OpenLDAP Foundation. All Rights Reserved. # diff --git a/servers/slapd/back-dnssrv/Makefile.in b/servers/slapd/back-dnssrv/Makefile.in index a80056f666..c2f925162c 100644 --- a/servers/slapd/back-dnssrv/Makefile.in +++ b/servers/slapd/back-dnssrv/Makefile.in @@ -10,10 +10,10 @@ # DNSSRV backend written by Kurt Zeilenga ########################################################################## -SRCS = init.c search.c config.c bind.c compare.c \ - modify.c add.c modrdn.c delete.c -OBJS = init.lo search.lo config.lo bind.lo compare.lo \ - modify.lo add.lo modrdn.lo delete.lo +SRCS = init.c search.c config.c compare.c \ + modify.c add.c modrdn.c delete.c request.c +OBJS = init.lo search.lo config.lo compare.lo \ + modify.lo add.lo modrdn.lo delete.lo request.lo LDAP_INCDIR= ../../../include LDAP_LIBDIR= ../../../libraries diff --git a/servers/slapd/back-dnssrv/add.c b/servers/slapd/back-dnssrv/add.c index b5360505bb..aed74a3e6a 100644 --- a/servers/slapd/back-dnssrv/add.c +++ b/servers/slapd/back-dnssrv/add.c @@ -23,5 +23,5 @@ dnssrv_back_add( Entry *e ) { - return -1; + return dnssrv_back_request( be, conn, op, e->e_dn, e->e_ndn ); } diff --git a/servers/slapd/back-dnssrv/back-dnssrv.h b/servers/slapd/back-dnssrv/back-dnssrv.h index d6aa702b94..878e85f71a 100644 --- a/servers/slapd/back-dnssrv/back-dnssrv.h +++ b/servers/slapd/back-dnssrv/back-dnssrv.h @@ -14,6 +14,14 @@ #include "external.h" LDAP_BEGIN_DECL + +int dnssrv_result(); + +extern int dnssrv_back_request LDAP_P(( + BackendDB *bd, + Connection *conn, Operation *op, + const char *dn, const char *ndn )); + LDAP_END_DECL #endif /* DNSSRV_BACK_H */ diff --git a/servers/slapd/back-dnssrv/compare.c b/servers/slapd/back-dnssrv/compare.c index 5ff759d840..0ef2f09eb6 100644 --- a/servers/slapd/back-dnssrv/compare.c +++ b/servers/slapd/back-dnssrv/compare.c @@ -25,5 +25,5 @@ dnssrv_back_compare( Ava *ava ) { - return -1; + return dnssrv_back_request( be, conn, op, dn, ndn ); } diff --git a/servers/slapd/back-dnssrv/delete.c b/servers/slapd/back-dnssrv/delete.c index 311b1a2053..4c7b3a070b 100644 --- a/servers/slapd/back-dnssrv/delete.c +++ b/servers/slapd/back-dnssrv/delete.c @@ -25,5 +25,5 @@ dnssrv_back_delete( char *ndn ) { - return -1; + return dnssrv_back_request( be, conn, op, dn, ndn ); } diff --git a/servers/slapd/back-dnssrv/init.c b/servers/slapd/back-dnssrv/init.c index 743c17114e..881532e385 100644 --- a/servers/slapd/back-dnssrv/init.c +++ b/servers/slapd/back-dnssrv/init.c @@ -45,7 +45,7 @@ dnssrv_back_initialize( bi->bi_db_close = 0; bi->bi_db_destroy = dnssrv_back_db_destroy; - bi->bi_op_bind = dnssrv_back_bind; + bi->bi_op_bind = 0; bi->bi_op_unbind = 0; bi->bi_op_search = dnssrv_back_search; bi->bi_op_compare = dnssrv_back_compare; diff --git a/servers/slapd/back-dnssrv/modify.c b/servers/slapd/back-dnssrv/modify.c index bc085ffbc5..13ea5b55d6 100644 --- a/servers/slapd/back-dnssrv/modify.c +++ b/servers/slapd/back-dnssrv/modify.c @@ -26,5 +26,5 @@ dnssrv_back_modify( LDAPModList *ml ) { - return -1; + return dnssrv_back_request( be, conn, op, dn, ndn ); } diff --git a/servers/slapd/back-dnssrv/modrdn.c b/servers/slapd/back-dnssrv/modrdn.c index d4989c9ed0..daf6764197 100644 --- a/servers/slapd/back-dnssrv/modrdn.c +++ b/servers/slapd/back-dnssrv/modrdn.c @@ -27,5 +27,5 @@ dnssrv_back_modrdn( char *newSuperior ) { - return -1; + return dnssrv_back_request( be, conn, op, dn, ndn ); } diff --git a/servers/slapd/back-dnssrv/bind.c b/servers/slapd/back-dnssrv/request.c similarity index 53% rename from servers/slapd/back-dnssrv/bind.c rename to servers/slapd/back-dnssrv/request.c index 2c407b2501..cab7f12994 100644 --- a/servers/slapd/back-dnssrv/bind.c +++ b/servers/slapd/back-dnssrv/request.c @@ -1,33 +1,27 @@ -/* bind.c - DNS SRV backend bind function */ +/* add.c - DNS SRV backend request handler */ /* $OpenLDAP$ */ /* * Copyright 2000 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ - #include "portable.h" #include -#include #include +#include #include "slap.h" #include "back-dnssrv.h" int -dnssrv_back_bind( - Backend *be, - Connection *conn, - Operation *op, - char *dn, - char *ndn, - int method, - char *mech, - struct berval *cred, - char **edn -) +dnssrv_back_request( + Backend *be, + Connection *conn, + Operation *op, + const char *dn, + const char *ndn ) { - return( -1 ); + return -1; } diff --git a/servers/slapd/back-dnssrv/search.c b/servers/slapd/back-dnssrv/search.c index 33d92312fc..d45fc349ad 100644 --- a/servers/slapd/back-dnssrv/search.c +++ b/servers/slapd/back-dnssrv/search.c @@ -22,8 +22,8 @@ dnssrv_back_search( Backend *be, Connection *conn, Operation *op, - char *base, - char *nbase, + char *dn, + char *ndn, int scope, int deref, int size, @@ -34,5 +34,5 @@ dnssrv_back_search( int attrsonly ) { - return -1; + return dnssrv_back_request( be, conn, op, dn, ndn ); } -- 2.39.5