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
3b4437ce
...
3b4437ceabc197bc77be0da604d67494f4bd4ead
authored
2005-02-16 08:45:06 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(cb_validate): Provide normal authentication for PLAIN and LOGIN mechanisms.
1 parent
c3725518
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
imap4d/auth_gsasl.c
imap4d/auth_gsasl.c
View file @
3b4437c
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
Copyright (C) 2003, 2004
, 2005
Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -192,10 +192,22 @@ cb_validate (Gsasl_session_ctx *ctx,
const
char
*
authentication_id
,
const
char
*
password
)
{
int
rc
;
struct
mu_auth_data
*
auth
;
char
**
username
=
gsasl_server_application_data_get
(
ctx
);
*
username
=
strdup
(
authentication_id
?
authentication_id
:
authorization_id
);
return
GSASL_OK
;
auth_data
=
mu_get_auth_by_name
(
*
username
);
if
(
auth_data
==
NULL
)
return
GSASL_AUTHENTICATION_ERROR
;
rc
=
mu_authenticate
(
auth
,
password
);
mu_auth_data_free
(
auth
);
return
rc
==
0
?
GSASL_OK
:
GSASL_AUTHENTICATION_ERROR
;
}
#define GSSAPI_SERVICE "imap"
...
...
@@ -252,7 +264,7 @@ cb_retrieve (Gsasl_session_ctx *ctx,
if
(
username
&&
authentication_id
)
*
username
=
strdup
(
authentication_id
);
return
gsasl_md5pwd_get_password
(
gsasl_cram_md5_pwd
,
authentication_id
,
key
,
keylen
);
}
...
...
Please
register
or
sign in
to post a comment