#ifdef HAVE_NT_SERVICE_MANAGER
char *configfile = ".\\slapd.conf";
+ char *configdir = ".\\slapd.d";
#else
char *configfile = SLAPD_DEFAULT_CONFIGFILE;
+ char *configdir = SLAPD_DEFAULT_CONFIGDIR;
#endif
char *serverName;
int serverMode = SLAP_SERVER_MODE;
{
int *i;
char *newConfigFile;
+ char *newConfigDir;
char *newUrls;
char *regService = NULL;
configfile = newConfigFile;
Debug ( LDAP_DEBUG_ANY, "new config file from registry is: %s\n", configfile, 0, 0 );
}
+
+ newConfigDir = (char*)lutil_getRegParam( regService, "ConfigDir" );
+ if ( newConfigDir != NULL ) {
+ configdir = newConfigDir;
+ Debug ( LDAP_DEBUG_ANY, "new config dir from registry is: %s\n", configdir, 0, 0 );
+ }
}
#endif
while ( (i = getopt( argc, argv,
- "c:d:f:h:n:o:s:StT:V"
+ "c:d:f:F:h:n:o:s:StT:V"
#if LDAP_PF_INET6
"46"
#endif
configfile = ch_strdup( optarg );
break;
+ case 'F': /* use config dir */
+ configdir = ch_strdup( optarg );
+ break;
+
case 'o': {
char *val = strchr( optarg, '=' );
struct berval opt;
}
#endif /* SLAP_DYNACL */
- if ( read_config( configfile, 0 ) != 0 ) {
+ if ( read_config( configfile, configdir ) != 0 ) {
rc = 1;
SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 19 );