aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2013-03-19 10:57:17 +0100
committerTobias Brunner <tobias@strongswan.org>2013-03-19 11:23:03 +0100
commit3c34e15ee41b99d87b802f8dff431bc3bcadb9ac (patch)
treef473b3030cec2143aed9da098b39c7289d88ed24 /src
parente4013bb90404aea5728bca9da9ae71abcbd935ea (diff)
downloadstrongswan-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.c7
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)