xauth: Call authorize() hook also when xauth-noauth is used
Fixes #1138.
This commit is contained in:
@@ -271,7 +271,10 @@ static bool add_auth_cfg(private_xauth_t *this, identification_t *id, bool local
|
||||
|
||||
auth = auth_cfg_create();
|
||||
auth->add(auth, AUTH_RULE_AUTH_CLASS, AUTH_CLASS_XAUTH);
|
||||
auth->add(auth, AUTH_RULE_XAUTH_IDENTITY, id->clone(id));
|
||||
if (id)
|
||||
{
|
||||
auth->add(auth, AUTH_RULE_XAUTH_IDENTITY, id->clone(id));
|
||||
}
|
||||
auth->merge(auth, this->ike_sa->get_auth_cfg(this->ike_sa, local), FALSE);
|
||||
this->ike_sa->add_auth_cfg(this->ike_sa, local, auth);
|
||||
|
||||
@@ -342,7 +345,10 @@ METHOD(task_t, build_i, status_t,
|
||||
break;
|
||||
case SUCCESS:
|
||||
DESTROY_IF(cp);
|
||||
this->status = XAUTH_OK;
|
||||
if (add_auth_cfg(this, NULL, FALSE) && allowed(this))
|
||||
{
|
||||
this->status = XAUTH_OK;
|
||||
}
|
||||
this->public.task.process = _process_i_status;
|
||||
return build_i_status(this, message);
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user