Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
46173d9f
...
46173d9f8e815e978c2138430628eaff6e679cbc
authored
2002-08-13 13:31:00 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Prototypes for mailutils authentication/authorization functions.
1 parent
3373f208
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
99 additions
and
0 deletions
include/mailutils/mu_auth.h
include/mailutils/mu_auth.h
0 → 100644
View file @
46173d9
/* GNU mailutils - a suite of utilities for electronic mail
Copyright (C) 2002 Free Software Foundation, Inc.
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, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
typedef
int
(
*
mu_auth_fp
)
__P
((
void
*
return_data
,
void
*
key
,
void
*
func_data
,
void
*
call_data
));
struct
mu_auth_data
{
/* These are from struct passwd */
char
*
name
;
/* user name */
char
*
passwd
;
/* user password */
uid_t
uid
;
/* user id */
gid_t
gid
;
/* group id */
char
*
gecos
;
/* real name */
char
*
dir
;
/* home directory */
char
*
shell
;
/* shell program */
/* */
char
*
mailbox
;
int
change_uid
;
};
struct
mu_auth_module
{
char
*
name
;
struct
argp
*
argp
;
mu_auth_fp
authenticate
;
void
*
authenticate_data
;
mu_auth_fp
auth_by_name
;
void
*
auth_by_name_data
;
mu_auth_fp
auth_by_uid
;
void
*
auth_by_uid_data
;
};
extern
int
mu_auth_runlist
__P
((
list_t
flist
,
void
*
return_data
,
void
*
key
,
void
*
data
));
extern
struct
mu_auth_data
*
mu_get_auth_by_name
__P
((
const
char
*
username
));
extern
struct
mu_auth_data
*
mu_get_auth_by_uid
__P
((
uid_t
uid
));
extern
int
mu_authenticate
__P
((
struct
mu_auth_data
*
auth_data
,
char
*
pass
));
extern
void
mu_auth_data_free
__P
((
struct
mu_auth_data
*
ptr
));
extern
int
mu_auth_nosupport
__P
((
void
*
return_data
,
void
*
key
,
void
*
func_data
,
void
*
call_data
));
extern
void
mu_auth_register_module
__P
((
struct
mu_auth_module
*
mod
));
extern
void
mu_authorization_add_module_list
__P
((
const
char
*
modlist
));
extern
void
mu_authentication_add_module_list
__P
((
const
char
*
modlist
));
extern
void
mu_auth_init
__P
((
void
));
extern
int
mu_auth_data_alloc
__P
((
struct
mu_auth_data
**
ptr
,
const
char
*
name
,
const
char
*
passwd
,
uid_t
uid
,
gid_t
gid
,
const
char
*
gecos
,
const
char
*
dir
,
const
char
*
shell
,
const
char
*
mailbox
,
int
change_uid
));
extern
void
mu_auth_data_free
__P
((
struct
mu_auth_data
*
ptr
));
extern
struct
mu_auth_module
mu_auth_system_module
;
extern
struct
mu_auth_module
mu_auth_generic_module
;
extern
struct
mu_auth_module
mu_auth_pam_module
;
extern
struct
mu_auth_module
mu_auth_sql_module
;
extern
struct
mu_auth_module
mu_auth_virtual_module
;
#define MU_AUTH_REGISTER_ALL_MODULES() do {\
mu_auth_register_module (&mu_auth_generic_module); \
mu_auth_register_module (&mu_auth_system_module); \
mu_auth_register_module (&mu_auth_pam_module);\
mu_auth_register_module (&mu_auth_sql_module);\
mu_auth_register_module (&mu_auth_virtual_module);\
mu_auth_init (); } while (0)
Please
register
or
sign in
to post a comment