44 |
|
|
45 |
/* System database */ |
/* System database */ |
46 |
static int |
static int |
47 |
mu_auth_system (void *return_data, struct passwd *pw) |
mu_auth_system (struct mu_auth_data **return_data, struct passwd *pw) |
48 |
{ |
{ |
49 |
char *mailbox_name; |
char *mailbox_name; |
50 |
int rc; |
int rc; |
59 |
|
|
60 |
sprintf (mailbox_name, "%s%s", mu_path_maildir, pw->pw_name); |
sprintf (mailbox_name, "%s%s", mu_path_maildir, pw->pw_name); |
61 |
|
|
62 |
rc = mu_auth_data_alloc ((struct mu_auth_data **) return_data, |
rc = mu_auth_data_alloc (return_data, |
63 |
pw->pw_name, |
pw->pw_name, |
64 |
pw->pw_passwd, |
pw->pw_passwd, |
65 |
pw->pw_uid, |
pw->pw_uid, |
74 |
} |
} |
75 |
|
|
76 |
int |
int |
77 |
mu_auth_system_by_name (void *return_data, void *key, |
mu_auth_system_by_name (struct mu_auth_data **return_data, void *key, |
78 |
void *unused_func_data, void *unused_call_data) |
void *func_data ARG_UNUSED, |
79 |
|
void *call_data ARG_UNUSED) |
80 |
{ |
{ |
81 |
if (!key) |
if (!key) |
82 |
{ |
{ |
87 |
} |
} |
88 |
|
|
89 |
static int |
static int |
90 |
mu_auth_system_by_uid (void *return_data, void *key, |
mu_auth_system_by_uid (struct mu_auth_data **return_data, void *key, |
91 |
void *unused_func_data, void *unused_call_data) |
void *func_data ARG_UNUSED, |
92 |
|
void *call_data ARG_UNUSED) |
93 |
{ |
{ |
94 |
if (!key) |
if (!key) |
95 |
{ |
{ |
100 |
} |
} |
101 |
|
|
102 |
static int |
static int |
103 |
mu_authenticate_generic (void *ignored_return_data, |
mu_authenticate_generic (struct mu_auth_data **return_data ARG_UNUSED, |
104 |
void *key, |
void *key, |
105 |
void *ignored_func_data, |
void *func_data ARG_UNUSED, |
106 |
void *call_data) |
void *call_data) |
107 |
{ |
{ |
108 |
struct mu_auth_data *auth_data = key; |
struct mu_auth_data *auth_data = key; |
115 |
|
|
116 |
/* Called only if generic fails */ |
/* Called only if generic fails */ |
117 |
static int |
static int |
118 |
mu_authenticate_system (void *ignored_return_data, |
mu_authenticate_system (struct mu_auth_data **return_data ARG_UNUSED, |
119 |
void *key, |
void *key, |
120 |
void *ignored_func_data, |
void *func_data ARG_UNUSED, |
121 |
void *call_data) |
void *call_data) |
122 |
{ |
{ |
123 |
struct mu_auth_data *auth_data = key; |
struct mu_auth_data *auth_data = key; |