rename STRING -> krb5_config_string, and LIST -> krb5_config_list
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3386 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -63,7 +63,7 @@ ni_proplist2binding(ni_proplist *pl, krb5_config_section **ret)
|
||||
return NI_FAILED;
|
||||
|
||||
b->next = NULL;
|
||||
b->type = STRING;
|
||||
b->type = krb5_config_string;
|
||||
b->name = ni_name_dup(pl->nipl_val[i].nip_name);
|
||||
b->u.string = ni_name_dup(pl->nipl_val[i].nip_val.ninl_val[j]);
|
||||
|
||||
@@ -110,7 +110,7 @@ ni_idlist2binding(void *ni, ni_idlist *idlist, krb5_config_section **ret)
|
||||
*next = b;
|
||||
}
|
||||
|
||||
b->type = LIST;
|
||||
b->type = krb5_config_list;
|
||||
b->name = ni_name_dup(pl.nipl_val[index].nip_val.ninl_val[0]);
|
||||
b->next = NULL;
|
||||
b->u.list = NULL;
|
||||
@@ -210,7 +210,7 @@ parse_section(char *p, krb5_config_section **s, krb5_config_section **parent)
|
||||
tmp->name = strdup(p+1);
|
||||
if (tmp->name == NULL)
|
||||
return -1;
|
||||
tmp->type = LIST;
|
||||
tmp->type = krb5_config_list;
|
||||
tmp->u.list = NULL;
|
||||
tmp->next = NULL;
|
||||
return 0;
|
||||
@@ -275,13 +275,13 @@ parse_binding(FILE *f, unsigned *lineno, char *p,
|
||||
while(isspace(*p))
|
||||
++p;
|
||||
if (*p == '{') {
|
||||
tmp->type = LIST;
|
||||
tmp->type = krb5_config_list;
|
||||
tmp->u.list = NULL;
|
||||
ret = parse_list (f, lineno, &tmp->u.list);
|
||||
if (ret)
|
||||
return ret;
|
||||
} else {
|
||||
tmp->type = STRING;
|
||||
tmp->type = krb5_config_string;
|
||||
tmp->u.string = strdup(p);
|
||||
}
|
||||
return 0;
|
||||
@@ -339,9 +339,9 @@ free_binding (krb5_config_binding *b)
|
||||
|
||||
while (b) {
|
||||
free (b->name);
|
||||
if (b->type == STRING)
|
||||
if (b->type == krb5_config_string)
|
||||
free (b->u.string);
|
||||
else if (b->type == LIST)
|
||||
else if (b->type == krb5_config_list)
|
||||
free_binding (b->u.list);
|
||||
else
|
||||
abort ();
|
||||
@@ -385,9 +385,9 @@ print_binding (FILE *f, krb5_config_binding *b, unsigned level)
|
||||
{
|
||||
tab (f, level);
|
||||
fprintf (f, "%s = ", b->name);
|
||||
if (b->type == STRING)
|
||||
if (b->type == krb5_config_string)
|
||||
fprintf (f, "%s\n", b->u.string);
|
||||
else if (b->type == LIST) {
|
||||
else if (b->type == krb5_config_list) {
|
||||
fprintf (f, "{\n");
|
||||
print_list (f, b->u.list, level + 1);
|
||||
tab (f, level);
|
||||
@@ -462,7 +462,7 @@ krb5_config_vget_next (krb5_config_section *c,
|
||||
if (type == b->type && p == NULL) {
|
||||
*pointer = b;
|
||||
return b->u.generic;
|
||||
} else if(b->type == LIST && p != NULL) {
|
||||
} else if(b->type == krb5_config_list && p != NULL) {
|
||||
b = b->u.list;
|
||||
} else {
|
||||
return NULL;
|
||||
@@ -515,7 +515,7 @@ const krb5_config_binding *
|
||||
krb5_config_vget_list (krb5_config_section *c,
|
||||
va_list args)
|
||||
{
|
||||
return krb5_config_vget (c, LIST, args);
|
||||
return krb5_config_vget (c, krb5_config_list, args);
|
||||
}
|
||||
|
||||
const char *
|
||||
@@ -535,7 +535,7 @@ const char *
|
||||
krb5_config_vget_string (krb5_config_section *c,
|
||||
va_list args)
|
||||
{
|
||||
return krb5_config_vget (c, STRING, args);
|
||||
return krb5_config_vget (c, krb5_config_string, args);
|
||||
}
|
||||
|
||||
char **
|
||||
@@ -546,7 +546,7 @@ krb5_config_vget_strings(krb5_config_section *c,
|
||||
int nstr = 0;
|
||||
krb5_config_binding *b = NULL;
|
||||
const char *p;
|
||||
while((p = krb5_config_vget_next(c, &b, STRING, args))){
|
||||
while((p = krb5_config_vget_next(c, &b, krb5_config_string, args))){
|
||||
char *tmp = strdup(p);
|
||||
char *pos = NULL;
|
||||
char *s;
|
||||
|
@@ -91,7 +91,7 @@ krb5_get_host_realm(krb5_context context,
|
||||
NULL);
|
||||
l;
|
||||
l = l->next) {
|
||||
if (l->type != STRING)
|
||||
if (l->type != krb5_config_string)
|
||||
continue;
|
||||
if (exact_match (host, l->name)) {
|
||||
res = l->u.string;
|
||||
|
@@ -212,7 +212,7 @@ typedef struct krb5_cc_ops{
|
||||
struct krb5_log_facility;
|
||||
|
||||
struct krb5_config_binding {
|
||||
enum { STRING, LIST } type;
|
||||
enum { krb5_config_string, krb5_config_list } type;
|
||||
char *name;
|
||||
struct krb5_config_binding *next;
|
||||
union {
|
||||
|
@@ -64,7 +64,7 @@ krb5_get_krbhst (krb5_context context,
|
||||
for(done = FALSE; !done;) {
|
||||
char *h = (char *)krb5_config_get_next (context->cf,
|
||||
&pointer,
|
||||
STRING,
|
||||
krb5_config_string,
|
||||
"realms",
|
||||
r,
|
||||
"kdc",
|
||||
|
@@ -324,7 +324,7 @@ krb5_openlog(krb5_context context,
|
||||
return ret;
|
||||
|
||||
|
||||
while(p = krb5_config_get_next(context->cf, &binding, STRING,
|
||||
while(p = krb5_config_get_next(context->cf, &binding, krb5_config_string,
|
||||
"logging",
|
||||
program,
|
||||
NULL)){
|
||||
@@ -332,7 +332,8 @@ krb5_openlog(krb5_context context,
|
||||
done = 1;
|
||||
}
|
||||
if(!done){
|
||||
while(p = krb5_config_get_next(context->cf, &binding, STRING,
|
||||
while(p = krb5_config_get_next(context->cf, &binding,
|
||||
krb5_config_string,
|
||||
"logging",
|
||||
"default",
|
||||
NULL)){
|
||||
|
@@ -601,7 +601,7 @@ name_convert(krb5_context context, const char *name, const char *realm,
|
||||
NULL);
|
||||
|
||||
while(l){
|
||||
if (l->type != STRING)
|
||||
if (l->type != krb5_config_string)
|
||||
continue;
|
||||
if(strcmp(name, l->u.string) == 0)
|
||||
return l->name;
|
||||
|
Reference in New Issue
Block a user