blob: e60d363ec1aaf44fa00a1e1ff70885932c6db8cc [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
21#define MAX_AUTH_GROUPS (unsigned int)(sizeof(int)*8)
22
23#define AU_O_INSECURE 0x00000001 /* insecure, unencrypted password */
24
Krzysztof Piotr Oledzki96105042010-01-29 17:50:44 +010025struct auth_users {
26 struct auth_users *next;
27 unsigned int flags;
28 char *user, *pass;
29 union {
30 char *groups;
31 unsigned int group_mask;
Willy Tarreaub4c06b72010-02-02 11:28:20 +010032 } u;
Krzysztof Piotr Oledzki96105042010-01-29 17:50:44 +010033};
34
35struct userlist {
36 struct userlist *next;
37 char *name;
38 struct auth_users *users;
39 int grpcnt;
40 char *groups[MAX_AUTH_GROUPS];
41 char **groupusers;
42};
43
44#endif /* _TYPES_AUTH_H */
45
46/*
47 * Local variables:
48 * c-indent-level: 8
49 * c-basic-offset: 8
50 * End:
51 */
52