appdefault.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* appdefault - routines designed to be called from applications to
* handle the [appdefaults] profile section
*/
#include <stdio.h>
#include <string.h>
#include <k5-int.h>
/*xxx Duplicating this is annoying; try to work on a better way.*/
static char *conf_yes[] = {
"y", "yes", "true", "t", "1", "on",
0,
};
static char *conf_no[] = {
"n", "no", "false", "nil", "0", "off",
0,
};
static int conf_boolean(s)
char *s;
{
char **p;
for(p=conf_yes; *p; p++) {
if (!strcasecmp(*p,s))
return 1;
}
for(p=conf_no; *p; p++) {
if (!strcasecmp(*p,s))
return 0;
}
/* Default to "no" */
return 0;
}
char **ret_value;
{
const char *names[5];
return KV5M_CONTEXT;
/*
* Try number one:
*
* [appdefaults]
* app = {
* SOME.REALM = {
* option = <boolean>
* }
* }
*/
names[0] = "appdefaults";
if (realmstr) {
names[4] = 0;
goto goodbye;
}
}
/*
* Try number two:
*
* [appdefaults]
* app = {
* option = <boolean>
* }
*/
names[3] = 0;
goto goodbye;
}
/*
* Try number three:
*
* [appdefaults]
* realm = {
* option = <boolean>
*/
if (realmstr) {
names[3] = 0;
goto goodbye;
}
}
/*
* Try number four:
*
* [appdefaults]
* option = <boolean>
*/
names[2] = 0;
} else {
return retval;
}
if (nameval) {
char **cpp;
}
return 0;
}
KRB5_DLLIMP void KRB5_CALLCONV
int default_value;
int *ret_value;
{
} else
}
KRB5_DLLIMP void KRB5_CALLCONV
char **ret_value;
{
char *string;
} else {
}
}