1 /* config.c - shell backend configuration file routine */
4 * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
5 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
12 #include <ac/string.h>
13 #include <ac/socket.h>
27 struct shellinfo *si = (struct shellinfo *) be->be_private;
30 fprintf( stderr, "%s: line %d: shell backend info is null!\n",
35 /* command + args to exec for binds */
36 if ( strcasecmp( argv[0], "bind" ) == 0 ) {
39 "%s: line %d: missing executable in \"bind <executable>\" line\n",
43 si->si_bind = charray_dup( &argv[1] );
45 /* command + args to exec for unbinds */
46 } else if ( strcasecmp( argv[0], "unbind" ) == 0 ) {
49 "%s: line %d: missing executable in \"unbind <executable>\" line\n",
53 si->si_unbind = charray_dup( &argv[1] );
55 /* command + args to exec for searches */
56 } else if ( strcasecmp( argv[0], "search" ) == 0 ) {
59 "%s: line %d: missing executable in \"search <executable>\" line\n",
63 si->si_search = charray_dup( &argv[1] );
65 /* command + args to exec for compares */
66 } else if ( strcasecmp( argv[0], "compare" ) == 0 ) {
69 "%s: line %d: missing executable in \"compare <executable>\" line\n",
73 si->si_compare = charray_dup( &argv[1] );
75 /* command + args to exec for modifies */
76 } else if ( strcasecmp( argv[0], "modify" ) == 0 ) {
79 "%s: line %d: missing executable in \"modify <executable>\" line\n",
83 si->si_modify = charray_dup( &argv[1] );
85 /* command + args to exec for modrdn */
86 } else if ( strcasecmp( argv[0], "modrdn" ) == 0 ) {
89 "%s: line %d: missing executable in \"modrdn <executable>\" line\n",
93 si->si_modrdn = charray_dup( &argv[1] );
95 /* command + args to exec for add */
96 } else if ( strcasecmp( argv[0], "add" ) == 0 ) {
99 "%s: line %d: missing executable in \"add <executable>\" line\n",
103 si->si_add = charray_dup( &argv[1] );
105 /* command + args to exec for delete */
106 } else if ( strcasecmp( argv[0], "delete" ) == 0 ) {
109 "%s: line %d: missing executable in \"delete <executable>\" line\n",
113 si->si_delete = charray_dup( &argv[1] );
115 /* command + args to exec for abandon */
116 } else if ( strcasecmp( argv[0], "abandon" ) == 0 ) {
119 "%s: line %d: missing executable in \"abandon <executable>\" line\n",
123 si->si_abandon = charray_dup( &argv[1] );
128 "%s: line %d: unknown directive \"%s\" in shell database definition (ignored)\n",
129 fname, lineno, argv[0] );