]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-shell/config.c
Update of back-bdb2 to KDZ's new entry lock schema.
[openldap] / servers / slapd / back-shell / config.c
index 5d2fa1c19a4299a386eaa4703ddc16486a8b00d0..a308ba1a977b1b8e07131e0933118da1afd98288 100644 (file)
@@ -1,16 +1,18 @@
 /* config.c - shell backend configuration file routine */
 
+#include "portable.h"
+
 #include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
 #include "slap.h"
 #include "shell.h"
 
-extern char    **charray_dup();
-
-shell_back_config(
-    Backend    *be,
+int
+shell_back_db_config(
+    BackendDB  *be,
     char       *fname,
     int                lineno,
     int                argc,
@@ -22,7 +24,7 @@ shell_back_config(
        if ( si == NULL ) {
                fprintf( stderr, "%s: line %d: shell backend info is null!\n",
                    fname, lineno );
-               exit( 1 );
+               return( 1 );
        }
 
        /* command + args to exec for binds */
@@ -31,7 +33,7 @@ shell_back_config(
                        fprintf( stderr,
        "%s: line %d: missing executable in \"bind <executable>\" line\n",
                            fname, lineno );
-                       exit( 1 );
+                       return( 1 );
                }
                si->si_bind = charray_dup( &argv[1] );
 
@@ -41,7 +43,7 @@ shell_back_config(
                        fprintf( stderr,
        "%s: line %d: missing executable in \"unbind <executable>\" line\n",
                            fname, lineno );
-                       exit( 1 );
+                       return( 1 );
                }
                si->si_unbind = charray_dup( &argv[1] );
 
@@ -51,7 +53,7 @@ shell_back_config(
                        fprintf( stderr,
        "%s: line %d: missing executable in \"search <executable>\" line\n",
                            fname, lineno );
-                       exit( 1 );
+                       return( 1 );
                }
                si->si_search = charray_dup( &argv[1] );
 
@@ -61,7 +63,7 @@ shell_back_config(
                        fprintf( stderr,
        "%s: line %d: missing executable in \"compare <executable>\" line\n",
                            fname, lineno );
-                       exit( 1 );
+                       return( 1 );
                }
                si->si_compare = charray_dup( &argv[1] );
 
@@ -71,7 +73,7 @@ shell_back_config(
                        fprintf( stderr,
        "%s: line %d: missing executable in \"modify <executable>\" line\n",
                            fname, lineno );
-                       exit( 1 );
+                       return( 1 );
                }
                si->si_modify = charray_dup( &argv[1] );
 
@@ -81,7 +83,7 @@ shell_back_config(
                        fprintf( stderr,
        "%s: line %d: missing executable in \"modrdn <executable>\" line\n",
                            fname, lineno );
-                       exit( 1 );
+                       return( 1 );
                }
                si->si_modrdn = charray_dup( &argv[1] );
 
@@ -91,7 +93,7 @@ shell_back_config(
                        fprintf( stderr,
        "%s: line %d: missing executable in \"add <executable>\" line\n",
                            fname, lineno );
-                       exit( 1 );
+                       return( 1 );
                }
                si->si_add = charray_dup( &argv[1] );
 
@@ -101,7 +103,7 @@ shell_back_config(
                        fprintf( stderr,
        "%s: line %d: missing executable in \"delete <executable>\" line\n",
                            fname, lineno );
-                       exit( 1 );
+                       return( 1 );
                }
                si->si_delete = charray_dup( &argv[1] );
 
@@ -111,7 +113,7 @@ shell_back_config(
                        fprintf( stderr,
        "%s: line %d: missing executable in \"abandon <executable>\" line\n",
                            fname, lineno );
-                       exit( 1 );
+                       return( 1 );
                }
                si->si_abandon = charray_dup( &argv[1] );
 
@@ -121,4 +123,6 @@ shell_back_config(
 "%s: line %d: unknown directive \"%s\" in shell database definition (ignored)\n",
                    fname, lineno, argv[0] );
        }
+
+       return 0;
 }