X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsrc%2Fauths%2Fspa.c;h=0bf7b042894dbee9da6ebf20452669017f40c2bf;hb=69a70afa8b22ee4ee72ccf583db2efd249e36721;hp=5647b0c1fa04a2ee913b4c3a21f6dbf0cd462ef2;hpb=55c75993b43ac91069a5fbe9cc7a8d48cda84ee0;p=exim.git diff --git a/src/src/auths/spa.c b/src/src/auths/spa.c index 5647b0c1f..0bf7b0428 100644 --- a/src/src/auths/spa.c +++ b/src/src/auths/spa.c @@ -1,5 +1,3 @@ -/* $Cambridge: exim/src/src/auths/spa.c,v 1.11 2010/06/05 10:16:36 pdp Exp $ */ - /************************************************* * Exim - an Internet mail transport agent * *************************************************/ @@ -198,9 +196,11 @@ that causes failure if the size of msgbuf is exceeded. ****/ /***************************************************************/ /* Put the username in $auth1 and $1. The former is now the preferred variable; -the latter is the original variable. */ +the latter is the original variable. These have to be out of stack memory, and +need to be available once known even if not authenticated, for error messages +(server_set_id, which only makes it to authenticated_id if we return OK) */ -auth_vars[0] = expand_nstring[1] = msgbuf; +auth_vars[0] = expand_nstring[1] = string_copy(msgbuf); expand_nlength[1] = Ustrlen(msgbuf); expand_nmax = 1; @@ -236,9 +236,11 @@ if (memcmp(ntRespData, ((unsigned char*)responseptr)+IVAL(&responseptr->ntResponse.offset,0), 24) == 0) /* success. we have a winner. */ + { + return auth_check_serv_cond(ablock); + } /* Expand server_condition as an authorization check (PH) */ - return auth_check_serv_cond(ablock); return FAIL; }