diff options
author | Tobias Brunner <tobias@strongswan.org> | 2013-03-19 10:57:17 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2013-03-19 11:23:03 +0100 |
commit | 3c34e15ee41b99d87b802f8dff431bc3bcadb9ac (patch) | |
tree | f473b3030cec2143aed9da098b39c7289d88ed24 /src | |
parent | e4013bb90404aea5728bca9da9ae71abcbd935ea (diff) | |
download | strongswan-3c34e15ee41b99d87b802f8dff431bc3bcadb9ac.tar.bz2 strongswan-3c34e15ee41b99d87b802f8dff431bc3bcadb9ac.tar.xz |
Make sure that xauth-noauth is not used accidentally
It has to be selected explicitly with rightauth2=xauth-noauth.
Diffstat (limited to 'src')
-rw-r--r-- | src/libcharon/sa/xauth/xauth_manager.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libcharon/sa/xauth/xauth_manager.c b/src/libcharon/sa/xauth/xauth_manager.c index f0602a673..5709dc652 100644 --- a/src/libcharon/sa/xauth/xauth_manager.c +++ b/src/libcharon/sa/xauth/xauth_manager.c @@ -112,8 +112,11 @@ METHOD(xauth_manager_t, create_instance, xauth_method_t*, enumerator = this->methods->create_enumerator(this->methods); while (enumerator->enumerate(enumerator, &entry)) { - if (role == entry->role && - (!name || streq(name, entry->name))) + if (!name && streq(entry->name, "noauth")) + { /* xauth-noauth has to be configured explicitly */ + continue; + } + if (role == entry->role && (!name || streq(name, entry->name))) { method = entry->constructor(server, peer); if (method) |