1 /* config.c - sock backend configuration file routine */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 2007 The OpenLDAP Foundation.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted only as authorized by the OpenLDAP
12 * A copy of this license is available in the file LICENSE in the
13 * top-level directory of the distribution or, alternatively, at
14 * <http://www.OpenLDAP.org/license.html>.
21 #include <ac/string.h>
22 #include <ac/socket.h>
25 #include "back-sock.h"
36 struct sockinfo *si = (struct sockinfo *) be->be_private;
39 fprintf( stderr, "%s: line %d: sock backend info is null!\n",
45 if ( strcasecmp( argv[0], "socketpath" ) == 0 ) {
48 "%s: line %d: exactly one parameter needed for \"socketpath\"\n",
52 si->si_sockpath = ch_strdup( argv[1] );
55 } else if ( strcasecmp( argv[0], "extensions" ) == 0 ) {
57 for ( i=1; i<argc; i++ ) {
58 if ( strcasecmp( argv[i], "binddn" ) == 0 )
59 si->si_extensions |= SOCK_EXT_BINDDN;
60 else if ( strcasecmp( argv[i], "peername" ) == 0 )
61 si->si_extensions |= SOCK_EXT_PEERNAME;
62 else if ( strcasecmp( argv[i], "ssf" ) == 0 )
63 si->si_extensions |= SOCK_EXT_SSF;
66 "%s: line %d: unknown extension \"%s\"\n",
67 fname, lineno, argv[i] );
74 return SLAP_CONF_UNKNOWN;