diff options
author | Martin Willi <martin@revosec.ch> | 2011-12-08 16:57:38 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-03-20 17:31:15 +0100 |
commit | cbda13f6fe63188b6372d693f916d84c992c223f (patch) | |
tree | 2a729dec0db1e9661882ed0d65910016c986a69c /src | |
parent | 6ebcbc654c5940d11be857ebb4d233caaaf311fa (diff) | |
download | strongswan-cbda13f6fe63188b6372d693f916d84c992c223f.tar.bz2 strongswan-cbda13f6fe63188b6372d693f916d84c992c223f.tar.xz |
Accept a xauth backend name appended to left/rightauth
Diffstat (limited to 'src')
-rw-r--r-- | src/libcharon/plugins/stroke/stroke_config.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libcharon/plugins/stroke/stroke_config.c b/src/libcharon/plugins/stroke/stroke_config.c index f1af65e11..fec28c1ef 100644 --- a/src/libcharon/plugins/stroke/stroke_config.c +++ b/src/libcharon/plugins/stroke/stroke_config.c @@ -469,8 +469,15 @@ static auth_cfg_t *build_auth_cfg(private_stroke_config_t *this, { cfg->add(cfg, AUTH_RULE_AUTH_CLASS, AUTH_CLASS_PSK); } - else if (streq(auth, "xauth")) + else if (strneq(auth, "xauth", 5)) { + char *pos; + + pos = strchr(auth, '-'); + if (pos) + { + cfg->add(cfg, AUTH_RULE_XAUTH_BACKEND, strdup(++pos)); + } cfg->add(cfg, AUTH_RULE_AUTH_CLASS, AUTH_CLASS_XAUTH); } else if (strneq(auth, "eap", 3)) |