blob: 964f29b6a963875687b64668baaed68e9d711f87 [file] [log] [blame]
Krzysztof Piotr Oledzki96105042010-01-29 17:50:44 +01001/*
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
Krzysztof Piotr Oledzki96105042010-01-29 17:50:44 +010021#define AU_O_INSECURE 0x00000001 /* insecure, unencrypted password */
22
Thierry FOURNIER9eec0a62014-01-22 18:38:02 +010023struct auth_groups {
24 struct auth_groups *next;
25 char *name;
26 char *groupusers; /* Just used during the configuration parsing. */
27};
28
29struct auth_groups_list {
30 struct auth_groups_list *next;
31 struct auth_groups *group;
32};
33
Krzysztof Piotr Oledzki96105042010-01-29 17:50:44 +010034struct auth_users {
35 struct auth_users *next;
36 unsigned int flags;
37 char *user, *pass;
38 union {
Thierry FOURNIER9eec0a62014-01-22 18:38:02 +010039 char *groups_names; /* Just used during the configuration parsing. */
40 struct auth_groups_list *groups;
Willy Tarreaub4c06b72010-02-02 11:28:20 +010041 } u;
Krzysztof Piotr Oledzki96105042010-01-29 17:50:44 +010042};
43
44struct userlist {
45 struct userlist *next;
46 char *name;
47 struct auth_users *users;
Thierry FOURNIER9eec0a62014-01-22 18:38:02 +010048 struct auth_groups *groups;
Krzysztof Piotr Oledzki96105042010-01-29 17:50:44 +010049};
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