1 /* config.c - shell backend configuration file routine */
6 #include <sys/socket.h>
10 extern char **charray_dup();
20 struct shellinfo *si = (struct shellinfo *) be->be_private;
23 fprintf( stderr, "%s: line %d: shell backend info is null!\n",
28 /* command + args to exec for binds */
29 if ( strcasecmp( argv[0], "bind" ) == 0 ) {
32 "%s: line %d: missing executable in \"bind <executable>\" line\n",
36 si->si_bind = charray_dup( &argv[1] );
38 /* command + args to exec for unbinds */
39 } else if ( strcasecmp( argv[0], "unbind" ) == 0 ) {
42 "%s: line %d: missing executable in \"unbind <executable>\" line\n",
46 si->si_unbind = charray_dup( &argv[1] );
48 /* command + args to exec for searches */
49 } else if ( strcasecmp( argv[0], "search" ) == 0 ) {
52 "%s: line %d: missing executable in \"search <executable>\" line\n",
56 si->si_search = charray_dup( &argv[1] );
58 /* command + args to exec for compares */
59 } else if ( strcasecmp( argv[0], "compare" ) == 0 ) {
62 "%s: line %d: missing executable in \"compare <executable>\" line\n",
66 si->si_compare = charray_dup( &argv[1] );
68 /* command + args to exec for modifies */
69 } else if ( strcasecmp( argv[0], "modify" ) == 0 ) {
72 "%s: line %d: missing executable in \"modify <executable>\" line\n",
76 si->si_modify = charray_dup( &argv[1] );
78 /* command + args to exec for modrdn */
79 } else if ( strcasecmp( argv[0], "modrdn" ) == 0 ) {
82 "%s: line %d: missing executable in \"modrdn <executable>\" line\n",
86 si->si_modrdn = charray_dup( &argv[1] );
88 /* command + args to exec for add */
89 } else if ( strcasecmp( argv[0], "add" ) == 0 ) {
92 "%s: line %d: missing executable in \"add <executable>\" line\n",
96 si->si_add = charray_dup( &argv[1] );
98 /* command + args to exec for delete */
99 } else if ( strcasecmp( argv[0], "delete" ) == 0 ) {
102 "%s: line %d: missing executable in \"delete <executable>\" line\n",
106 si->si_delete = charray_dup( &argv[1] );
108 /* command + args to exec for abandon */
109 } else if ( strcasecmp( argv[0], "abandon" ) == 0 ) {
112 "%s: line %d: missing executable in \"abandon <executable>\" line\n",
116 si->si_abandon = charray_dup( &argv[1] );
121 "%s: line %d: unknown directive \"%s\" in shell database definition (ignored)\n",
122 fname, lineno, argv[0] );