Krzysztof Piotr Oledzki | 9610504 | 2010-01-29 17:50:44 +0100 | [diff] [blame] | 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 | |
Krzysztof Piotr Oledzki | 9610504 | 2010-01-29 17:50:44 +0100 | [diff] [blame] | 21 | #define AU_O_INSECURE 0x00000001 /* insecure, unencrypted password */ |
| 22 | |
Thierry FOURNIER | 9eec0a6 | 2014-01-22 18:38:02 +0100 | [diff] [blame] | 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 | |
Krzysztof Piotr Oledzki | 9610504 | 2010-01-29 17:50:44 +0100 | [diff] [blame] | 34 | struct auth_users { |
| 35 | struct auth_users *next; |
| 36 | unsigned int flags; |
| 37 | char *user, *pass; |
| 38 | union { |
Thierry FOURNIER | 9eec0a6 | 2014-01-22 18:38:02 +0100 | [diff] [blame] | 39 | char *groups_names; /* Just used during the configuration parsing. */ |
| 40 | struct auth_groups_list *groups; |
Willy Tarreau | b4c06b7 | 2010-02-02 11:28:20 +0100 | [diff] [blame] | 41 | } u; |
Krzysztof Piotr Oledzki | 9610504 | 2010-01-29 17:50:44 +0100 | [diff] [blame] | 42 | }; |
| 43 | |
| 44 | struct userlist { |
| 45 | struct userlist *next; |
| 46 | char *name; |
| 47 | struct auth_users *users; |
Thierry FOURNIER | 9eec0a6 | 2014-01-22 18:38:02 +0100 | [diff] [blame] | 48 | struct auth_groups *groups; |
Krzysztof Piotr Oledzki | 9610504 | 2010-01-29 17:50:44 +0100 | [diff] [blame] | 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 | |