1 /*
2  * User authentication & authorization.
3  *
4  * Copyright 2010 Krzysztof Piotr Oledzki <ole@ans.pl>
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version
9  * 2 of the License, or (at your option) any later version.
10  *
11  */
12 
13 #ifndef _TYPES_AUTH_H
14 #define _TYPES_AUTH_H
15 
16 #include <common/config.h>
17 #include <common/mini-clist.h>
18 
19 #include <types/auth.h>
20 
21 #define AU_O_INSECURE	0x00000001		/* insecure, unencrypted password */
22 
23 struct auth_groups {
24 	struct auth_groups *next;
25 	char *name;
26 	char *groupusers; /* Just used during the configuration parsing. */
27 };
28 
29 struct auth_groups_list {
30 	struct auth_groups_list *next;
31 	struct auth_groups *group;
32 };
33 
34 struct auth_users {
35 	struct auth_users *next;
36 	unsigned int flags;
37 	char *user, *pass;
38 	union {
39 		char *groups_names; /* Just used during the configuration parsing. */
40 		struct auth_groups_list *groups;
41 	} u;
42 };
43 
44 struct userlist {
45 	struct userlist *next;
46 	char *name;
47 	struct auth_users *users;
48 	struct auth_groups *groups;
49 };
50 
51 #endif /* _TYPES_AUTH_H */
52 
53 /*
54  * Local variables:
55  *  c-indent-level: 8
56  *  c-basic-offset: 8
57  * End:
58  */
59 
60