X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/c5ddb310a1f89a0560eea67879921570b046b179..16ff981e58427ae8bd5e8420411a9978678841e4:/src/src/auths/cyrus_sasl.c?ds=sidebyside diff --git a/src/src/auths/cyrus_sasl.c b/src/src/auths/cyrus_sasl.c index 8651dc605..284194e00 100644 --- a/src/src/auths/cyrus_sasl.c +++ b/src/src/auths/cyrus_sasl.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/auths/cyrus_sasl.c,v 1.3 2005/04/05 14:33:27 ph10 Exp $ */ +/* $Cambridge: exim/src/src/auths/cyrus_sasl.c,v 1.5 2006/10/16 15:44:36 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -53,7 +53,7 @@ address can appear in the tables drtables.c. */ int auth_cyrus_sasl_options_count = sizeof(auth_cyrus_sasl_options)/sizeof(optionlist); -/* Default private options block for the contidion authentication method. */ +/* Default private options block for the cyrus_sasl authentication method. */ auth_cyrus_sasl_options_block auth_cyrus_sasl_option_defaults = { US"smtp", /* server_service */ @@ -324,18 +324,21 @@ while(rc==SASL_CONTINUE) } else if(rc==SASL_OK) { - /* get the username and copy it into $1 */ - rc=sasl_getprop(conn, SASL_USERNAME, (const void **)(&out2)); - expand_nstring[1]=string_copy(out2); - expand_nlength[1]=Ustrlen(expand_nstring[1]); - expand_nmax=1; + /* Get the username and copy it into $auth1 and $1. The former is now the + preferred variable; the latter is the original variable. */ + rc = sasl_getprop(conn, SASL_USERNAME, (const void **)(&out2)); + auth_vars[0] = expand_nstring[1] = string_copy(out2); + expand_nlength[1] = Ustrlen(expand_nstring[1]); + expand_nmax = 1; HDEBUG(D_auth) - debug_printf("Cyrus SASL %s authentiction succeeded for %s\n", ob->server_mech, out2); + debug_printf("Cyrus SASL %s authentication succeeded for %s\n", ob->server_mech, out2); /* close down the connection, freeing up library's memory */ sasl_dispose(&conn); sasl_done(); - return OK; + + /* Expand server_condition as an authorization check */ + return auth_check_serv_cond(ablock); } } /* NOTREACHED */