Accept a xauth backend name appended to left/rightauth

This commit is contained in:
Martin Willi
2012-03-20 17:31:15 +01:00
parent 6ebcbc654c
commit cbda13f6fe
+8 -1
View File
@@ -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))