Changes in conf.c [50bb490:2f8e3ca]
Legend:
- Unmodified
- Added
- Removed
-
conf.c
r50bb490 r2f8e3ca 55 55 conf->runmode = RUNMODE_INETD; 56 56 conf->authmode = AUTHMODE_OPEN; 57 conf->auth_backend = NULL;58 57 conf->auth_pass = NULL; 59 58 conf->oper_pass = NULL; 60 conf->allow_account_add = 1;61 59 conf->configdir = g_strdup(CONFIG); 62 60 conf->plugindir = g_strdup(PLUGINDIR); … … 242 240 conf->authmode = AUTHMODE_OPEN; 243 241 } 244 } else if (g_strcasecmp(ini->key, "authbackend") == 0) {245 if (g_strcasecmp(ini->value, "storage") == 0) {246 conf->auth_backend = NULL;247 } else if (g_strcasecmp(ini->value, "pam") == 0 ||248 g_strcasecmp(ini->value, "ldap") == 0) {249 g_free(conf->auth_backend);250 conf->auth_backend = g_strdup(ini->value);251 } else {252 fprintf(stderr, "Invalid %s value: %s\n", ini->key, ini->value);253 return 0;254 }255 242 } else if (g_strcasecmp(ini->key, "authpassword") == 0) { 256 243 g_free(conf->auth_pass); … … 259 246 g_free(conf->oper_pass); 260 247 conf->oper_pass = g_strdup(ini->value); 261 } else if (g_strcasecmp(ini->key, "allowaccountadd") == 0) {262 if (!is_bool(ini->value)) {263 fprintf(stderr, "Invalid %s value: %s\n", ini->key, ini->value);264 return 0;265 }266 conf->allow_account_add = bool2int(ini->value);267 248 } else if (g_strcasecmp(ini->key, "hostname") == 0) { 268 249 g_free(conf->hostname);
Note: See TracChangeset
for help on using the changeset viewer.