Commit 058963d4 authored by Per Cederqvist's avatar Per Cederqvist

(ident_param): New function.

(parameters): Added Ident-authentcation.
parent 525e1b4a
/*
* $Id: server-config.c,v 0.24 1994/02/19 04:15:16 ceder Exp $
* $Id: server-config.c,v 0.25 1994/02/27 15:49:15 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -30,7 +30,7 @@
*
*/
static char *rcsid = "$Id: server-config.c,v 0.24 1994/02/19 04:15:16 ceder Exp $";
static char *rcsid = "$Id: server-config.c,v 0.25 1994/02/27 15:49:15 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -54,6 +54,7 @@ USE(rcsid);
static Success log_param(const char *val, const struct parameter *par);
static Success jubel(const char *val, const struct parameter *par);
static Success ident_param(const char *val, const struct parameter *par);
/* Default value for DEFAULT_DBASE_DIR. Since this is used in two
places in this file, use a define. */
......@@ -184,6 +185,8 @@ static const struct parameter parameters[] = {
/* Register a forbidden text number. */
{"Jubel",
jubel, 0, -1, NULL, NULL},
{"Ident-authentication",
ident_param, 0, 1, "try", &param.authentication_level},
/* end marker */
{NULL, NULL, 0, 0, NULL, NULL}};
......@@ -250,6 +253,35 @@ jubel(const char *val, const struct parameter *par)
return OK;
}
static Success
ident_param(const char *val, const struct parameter *par)
{
if (val == NULL)
restart_kom("ident_param(): val == NULL\n");
if (!strcmp(val, "off")
|| !strcmp(val, "never"))
{
*(int*)par->value = 0;
}
else if (!strcmp(val, "on")
|| !strcmp(val, "try"))
{
*(int*)par->value = 1;
}
else if (!strcmp(val, "require")
|| !strcmp(val, "required"))
{
*(int*)par->value = 2;
}
else
{
log ("%s expects \"never\", \"try\" or \"required\" as argument\n",
par->name);
return FAILURE;
}
return OK;
}
void
read_configuration(const char *conf_file)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment