X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fauths%2Fspa.c;h=0bf7b042894dbee9da6ebf20452669017f40c2bf;hb=b8fc75b3728d523ae83d02de92e1cfb002d25c9d;hp=d69c2e4fe473f07a0ca2e5366784bd016e574b66;hpb=3634fc257bd0667daef14d72005cd87c735bbb24;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/auths/spa.c b/src/src/auths/spa.c index d69c2e4fe..0bf7b0428 100644 --- a/src/src/auths/spa.c +++ b/src/src/auths/spa.c @@ -196,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; @@ -234,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; }