version 1.92, 2001/12/28 15:06:00 |
version 1.93, 2002/01/13 17:57:37 |
|
|
} |
} |
} |
} |
|
|
|
|
#define DELIM "," |
|
|
|
static char * |
static char * |
authmethods_get(void) |
authmethods_get(void) |
{ |
{ |
Authmethod *method = NULL; |
Authmethod *method = NULL; |
char buf[1024]; |
Buffer b; |
|
char *list; |
|
|
buf[0] = '\0'; |
buffer_init(&b); |
for (method = authmethods; method->name != NULL; method++) { |
for (method = authmethods; method->name != NULL; method++) { |
if (authmethod_is_enabled(method)) { |
if (authmethod_is_enabled(method)) { |
if (buf[0] != '\0') |
if (buffer_len(&b) > 0) |
strlcat(buf, DELIM, sizeof buf); |
buffer_append(&b, ",", 1); |
strlcat(buf, method->name, sizeof buf); |
buffer_append(&b, method->name, strlen(method->name)); |
} |
} |
} |
} |
return xstrdup(buf); |
buffer_append(&b, "\0", 1); |
|
list = xstrdup(buffer_ptr(&b)); |
|
buffer_free(&b); |
|
return list; |
} |
} |