]> git.sur5r.net Git - openldap/commitdiff
Axe abandon support
authorKurt Zeilenga <kurt@openldap.org>
Mon, 2 Jun 2003 20:20:45 +0000 (20:20 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 2 Jun 2003 20:20:45 +0000 (20:20 +0000)
servers/slapd/back-shell/Makefile.in
servers/slapd/back-shell/abandon.c [deleted file]
servers/slapd/back-shell/config.c
servers/slapd/back-shell/external.h
servers/slapd/back-shell/init.c
servers/slapd/back-shell/shell.h

index 23c2a66be3fbe0dbeea76a23bbd6a435d0a80713..ad9ea914de2bdfb3370f413883877ddc61078299 100644 (file)
@@ -3,9 +3,9 @@
 ## COPYING RESTRICTIONS APPLY, see COPYRIGHT file
 
 SRCS   = init.c config.c fork.c search.c bind.c unbind.c add.c \
-               delete.c modify.c modrdn.c compare.c abandon.c result.c
+               delete.c modify.c modrdn.c compare.c result.c
 OBJS   = init.lo config.lo fork.lo search.lo bind.lo unbind.lo add.lo \
-               delete.lo modify.lo modrdn.lo compare.lo abandon.lo result.lo
+               delete.lo modify.lo modrdn.lo compare.lo result.lo
 
 LDAP_INCDIR= ../../../include       
 LDAP_LIBDIR= ../../../libraries
diff --git a/servers/slapd/back-shell/abandon.c b/servers/slapd/back-shell/abandon.c
deleted file mode 100644 (file)
index 040a999..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/* abandon.c - shell backend abandon function */
-/* $OpenLDAP$ */
-/*
- * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
- */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/socket.h>
-#include <ac/string.h>
-
-#include "slap.h"
-#include "shell.h"
-
-int
-shell_back_abandon(
-    Operation  *op,
-    SlapReply  *rs )
-{
-       struct shellinfo        *si = (struct shellinfo *) op->o_bd->be_private;
-       FILE                    *rfp, *wfp;
-       pid_t                   pid;
-       Operation               *o;
-
-       if ( si->si_abandon == NULL ) {
-               return 0;
-       }
-
-       pid = -1;
-       LDAP_STAILQ_FOREACH( o, &op->o_conn->c_ops, o_next ) {
-               if ( o->o_msgid == op->oq_abandon.rs_msgid ) {
-                       pid = (pid_t) o->o_private;
-                       break;
-               }
-       }
-
-       if ( pid == -1 ) {
-               Debug( LDAP_DEBUG_ARGS, "shell could not find op %ld\n",
-                      (long) op->oq_abandon.rs_msgid, 0, 0 );
-               return 0;
-       }
-
-       if ( forkandexec( si->si_abandon, &rfp, &wfp ) == -1 ) {
-               return 0;
-       }
-
-       /* write out the request to the abandon process */
-       fprintf( wfp, "ABANDON\n" );
-       fprintf( wfp, "msgid: %d\n", op->oq_abandon.rs_msgid );
-       print_suffixes( wfp, op->o_bd );
-       fprintf( wfp, "pid: %ld\n", (long) pid );
-       fclose( wfp );
-
-       /* no result from abandon */
-       fclose( rfp );
-
-       return 0;
-}
index a9ec0a95eae9b9db9a8dbbfa87119187509c4f73..d15e6264d1543e9159485a1164b91101ccdda501 100644 (file)
@@ -112,16 +112,6 @@ shell_back_db_config(
                }
                si->si_delete = ldap_charray_dup( &argv[1] );
 
-       /* command + args to exec for abandon */
-       } else if ( strcasecmp( argv[0], "abandon" ) == 0 ) {
-               if ( argc < 2 ) {
-                       fprintf( stderr,
-       "%s: line %d: missing executable in \"abandon <executable>\" line\n",
-                           fname, lineno );
-                       return( 1 );
-               }
-               si->si_abandon = ldap_charray_dup( &argv[1] );
-
        /* anything else */
        } else {
                fprintf( stderr,
index 1d58992ea3a8bd12b155b0ceeaef0bb8a44d6b3e..ec275c91fc554c7d978a73524b29f177248bdc7c 100644 (file)
@@ -34,8 +34,6 @@ extern BI_op_add      shell_back_add;
 
 extern BI_op_delete    shell_back_delete;
 
-extern BI_op_abandon   shell_back_abandon;
-
 LDAP_END_DECL
 
 #endif /* _SHELL_EXTERNAL_H */
index cfb5357dd0ab17a2c51f2e7f695e5b1472755601..1b68bfdf7e9814e81954ea6a0bbd4f40b8f7ebb6 100644 (file)
@@ -53,7 +53,7 @@ shell_back_initialize(
        bi->bi_op_modrdn = shell_back_modrdn;
        bi->bi_op_add = shell_back_add;
        bi->bi_op_delete = shell_back_delete;
-       bi->bi_op_abandon = shell_back_abandon;
+       bi->bi_op_abandon = 0;
 
        bi->bi_extended = 0;
 
index 86b9a0bb8c54b836a0dee9c7a1021893b04e9540..93cd28fcda266e139ec65d2beb9be62d5b437abb 100644 (file)
@@ -21,7 +21,6 @@ struct shellinfo {
        char    **si_modrdn;    /* cmd + args to exec for modrdn  */
        char    **si_add;               /* cmd + args to exec for add     */
        char    **si_delete;    /* cmd + args to exec for delete  */
-       char    **si_abandon;   /* cmd + args to exec for abandon */
 };
 
 struct slap_backend_db;