#ifndef KEYFILE_H
#define KEYFILE_H
#include "conf.h"
#include "../daemon/keyfile_auth.h"
#ifdef __cplusplus
extern "C" {
#endif
#define CFG_KEYFILE_ADD(list_begin, list_end, elm) \
cx_linked_list_add((
void**)list_begin, (
void**)list_end, -
1, offsetof(KeyfileEntry, next), elm)
typedef struct _keyfile_entry KeyfileEntry;
typedef struct _keyfile_conf {
ConfigParser parser;
char *file;
KeyfileEntry *users_begin;
KeyfileEntry *users_end;
} KeyfileConfig;
struct _keyfile_entry {
cxmutstr name;
enum KeyfileHashType hashtype;
cxmutstr hashdata;
cxmutstr *groups;
size_t numgroups;
KeyfileEntry *next;
};
KeyfileConfig *load_keyfile_config(
const char *file);
void free_keyfile_config(KeyfileConfig *conf);
int keyfile_parse(
void *p, ConfigLine *begin, ConfigLine *end, cxmutstr line);
#ifdef __cplusplus
}
#endif
#endif