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;
|
return NI_FAILED;
|
||||||
|
|
||||||
b->next = NULL;
|
b->next = NULL;
|
||||||
b->type = STRING;
|
b->type = krb5_config_string;
|
||||||
b->name = ni_name_dup(pl->nipl_val[i].nip_name);
|
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]);
|
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;
|
*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->name = ni_name_dup(pl.nipl_val[index].nip_val.ninl_val[0]);
|
||||||
b->next = NULL;
|
b->next = NULL;
|
||||||
b->u.list = 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);
|
tmp->name = strdup(p+1);
|
||||||
if (tmp->name == NULL)
|
if (tmp->name == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
tmp->type = LIST;
|
tmp->type = krb5_config_list;
|
||||||
tmp->u.list = NULL;
|
tmp->u.list = NULL;
|
||||||
tmp->next = NULL;
|
tmp->next = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
@@ -275,13 +275,13 @@ parse_binding(FILE *f, unsigned *lineno, char *p,
|
|||||||
while(isspace(*p))
|
while(isspace(*p))
|
||||||
++p;
|
++p;
|
||||||
if (*p == '{') {
|
if (*p == '{') {
|
||||||
tmp->type = LIST;
|
tmp->type = krb5_config_list;
|
||||||
tmp->u.list = NULL;
|
tmp->u.list = NULL;
|
||||||
ret = parse_list (f, lineno, &tmp->u.list);
|
ret = parse_list (f, lineno, &tmp->u.list);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
} else {
|
} else {
|
||||||
tmp->type = STRING;
|
tmp->type = krb5_config_string;
|
||||||
tmp->u.string = strdup(p);
|
tmp->u.string = strdup(p);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@@ -339,9 +339,9 @@ free_binding (krb5_config_binding *b)
|
|||||||
|
|
||||||
while (b) {
|
while (b) {
|
||||||
free (b->name);
|
free (b->name);
|
||||||
if (b->type == STRING)
|
if (b->type == krb5_config_string)
|
||||||
free (b->u.string);
|
free (b->u.string);
|
||||||
else if (b->type == LIST)
|
else if (b->type == krb5_config_list)
|
||||||
free_binding (b->u.list);
|
free_binding (b->u.list);
|
||||||
else
|
else
|
||||||
abort ();
|
abort ();
|
||||||
@@ -385,9 +385,9 @@ print_binding (FILE *f, krb5_config_binding *b, unsigned level)
|
|||||||
{
|
{
|
||||||
tab (f, level);
|
tab (f, level);
|
||||||
fprintf (f, "%s = ", b->name);
|
fprintf (f, "%s = ", b->name);
|
||||||
if (b->type == STRING)
|
if (b->type == krb5_config_string)
|
||||||
fprintf (f, "%s\n", b->u.string);
|
fprintf (f, "%s\n", b->u.string);
|
||||||
else if (b->type == LIST) {
|
else if (b->type == krb5_config_list) {
|
||||||
fprintf (f, "{\n");
|
fprintf (f, "{\n");
|
||||||
print_list (f, b->u.list, level + 1);
|
print_list (f, b->u.list, level + 1);
|
||||||
tab (f, level);
|
tab (f, level);
|
||||||
@@ -462,7 +462,7 @@ krb5_config_vget_next (krb5_config_section *c,
|
|||||||
if (type == b->type && p == NULL) {
|
if (type == b->type && p == NULL) {
|
||||||
*pointer = b;
|
*pointer = b;
|
||||||
return b->u.generic;
|
return b->u.generic;
|
||||||
} else if(b->type == LIST && p != NULL) {
|
} else if(b->type == krb5_config_list && p != NULL) {
|
||||||
b = b->u.list;
|
b = b->u.list;
|
||||||
} else {
|
} else {
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -515,7 +515,7 @@ const krb5_config_binding *
|
|||||||
krb5_config_vget_list (krb5_config_section *c,
|
krb5_config_vget_list (krb5_config_section *c,
|
||||||
va_list args)
|
va_list args)
|
||||||
{
|
{
|
||||||
return krb5_config_vget (c, LIST, args);
|
return krb5_config_vget (c, krb5_config_list, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
@@ -535,7 +535,7 @@ const char *
|
|||||||
krb5_config_vget_string (krb5_config_section *c,
|
krb5_config_vget_string (krb5_config_section *c,
|
||||||
va_list args)
|
va_list args)
|
||||||
{
|
{
|
||||||
return krb5_config_vget (c, STRING, args);
|
return krb5_config_vget (c, krb5_config_string, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
char **
|
char **
|
||||||
@@ -546,7 +546,7 @@ krb5_config_vget_strings(krb5_config_section *c,
|
|||||||
int nstr = 0;
|
int nstr = 0;
|
||||||
krb5_config_binding *b = NULL;
|
krb5_config_binding *b = NULL;
|
||||||
const char *p;
|
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 *tmp = strdup(p);
|
||||||
char *pos = NULL;
|
char *pos = NULL;
|
||||||
char *s;
|
char *s;
|
||||||
|
@@ -91,7 +91,7 @@ krb5_get_host_realm(krb5_context context,
|
|||||||
NULL);
|
NULL);
|
||||||
l;
|
l;
|
||||||
l = l->next) {
|
l = l->next) {
|
||||||
if (l->type != STRING)
|
if (l->type != krb5_config_string)
|
||||||
continue;
|
continue;
|
||||||
if (exact_match (host, l->name)) {
|
if (exact_match (host, l->name)) {
|
||||||
res = l->u.string;
|
res = l->u.string;
|
||||||
|
@@ -212,7 +212,7 @@ typedef struct krb5_cc_ops{
|
|||||||
struct krb5_log_facility;
|
struct krb5_log_facility;
|
||||||
|
|
||||||
struct krb5_config_binding {
|
struct krb5_config_binding {
|
||||||
enum { STRING, LIST } type;
|
enum { krb5_config_string, krb5_config_list } type;
|
||||||
char *name;
|
char *name;
|
||||||
struct krb5_config_binding *next;
|
struct krb5_config_binding *next;
|
||||||
union {
|
union {
|
||||||
|
@@ -64,7 +64,7 @@ krb5_get_krbhst (krb5_context context,
|
|||||||
for(done = FALSE; !done;) {
|
for(done = FALSE; !done;) {
|
||||||
char *h = (char *)krb5_config_get_next (context->cf,
|
char *h = (char *)krb5_config_get_next (context->cf,
|
||||||
&pointer,
|
&pointer,
|
||||||
STRING,
|
krb5_config_string,
|
||||||
"realms",
|
"realms",
|
||||||
r,
|
r,
|
||||||
"kdc",
|
"kdc",
|
||||||
|
@@ -324,7 +324,7 @@ krb5_openlog(krb5_context context,
|
|||||||
return ret;
|
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",
|
"logging",
|
||||||
program,
|
program,
|
||||||
NULL)){
|
NULL)){
|
||||||
@@ -332,7 +332,8 @@ krb5_openlog(krb5_context context,
|
|||||||
done = 1;
|
done = 1;
|
||||||
}
|
}
|
||||||
if(!done){
|
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",
|
"logging",
|
||||||
"default",
|
"default",
|
||||||
NULL)){
|
NULL)){
|
||||||
|
@@ -601,7 +601,7 @@ name_convert(krb5_context context, const char *name, const char *realm,
|
|||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
while(l){
|
while(l){
|
||||||
if (l->type != STRING)
|
if (l->type != krb5_config_string)
|
||||||
continue;
|
continue;
|
||||||
if(strcmp(name, l->u.string) == 0)
|
if(strcmp(name, l->u.string) == 0)
|
||||||
return l->name;
|
return l->name;
|
||||||
|
Reference in New Issue
Block a user