2010-01-29 11:50:44 -05:00
|
|
|
/*
|
|
|
|
|
* User authentication & authorization.
|
|
|
|
|
*
|
|
|
|
|
* Copyright 2010 Krzysztof Piotr Oledzki <ole@ans.pl>
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
|
* as published by the Free Software Foundation; either version
|
|
|
|
|
* 2 of the License, or (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef _TYPES_AUTH_H
|
|
|
|
|
#define _TYPES_AUTH_H
|
|
|
|
|
|
|
|
|
|
#include <common/config.h>
|
|
|
|
|
#include <common/mini-clist.h>
|
|
|
|
|
|
|
|
|
|
#include <types/auth.h>
|
|
|
|
|
|
|
|
|
|
#define AU_O_INSECURE 0x00000001 /* insecure, unencrypted password */
|
|
|
|
|
|
2014-01-22 12:38:02 -05:00
|
|
|
struct auth_groups {
|
|
|
|
|
struct auth_groups *next;
|
|
|
|
|
char *name;
|
|
|
|
|
char *groupusers; /* Just used during the configuration parsing. */
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct auth_groups_list {
|
|
|
|
|
struct auth_groups_list *next;
|
|
|
|
|
struct auth_groups *group;
|
|
|
|
|
};
|
|
|
|
|
|
2010-01-29 11:50:44 -05:00
|
|
|
struct auth_users {
|
|
|
|
|
struct auth_users *next;
|
|
|
|
|
unsigned int flags;
|
|
|
|
|
char *user, *pass;
|
|
|
|
|
union {
|
2014-01-22 12:38:02 -05:00
|
|
|
char *groups_names; /* Just used during the configuration parsing. */
|
|
|
|
|
struct auth_groups_list *groups;
|
2010-02-02 05:28:20 -05:00
|
|
|
} u;
|
2010-01-29 11:50:44 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct userlist {
|
|
|
|
|
struct userlist *next;
|
|
|
|
|
char *name;
|
|
|
|
|
struct auth_users *users;
|
2014-01-22 12:38:02 -05:00
|
|
|
struct auth_groups *groups;
|
2010-01-29 11:50:44 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif /* _TYPES_AUTH_H */
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Local variables:
|
|
|
|
|
* c-indent-level: 8
|
|
|
|
|
* c-basic-offset: 8
|
|
|
|
|
* End:
|
|
|
|
|
*/
|
|
|
|
|
|