X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Fui.c;h=34eebc10210f0ae6cf860f3c10e3b24ec8ba4401;hb=3616b334bc6426e973e08b612a5e8fd30ad80a5f;hp=f94737907ff07c9f00d4855ba0944aa41f3800d6;hpb=ddb933f1aa1817f5a285bba0a9bda18e00bc30ef;p=doldaconnect.git diff --git a/daemon/ui.c b/daemon/ui.c index f947379..34eebc1 100644 --- a/daemon/ui.c +++ b/daemon/ui.c @@ -19,7 +19,6 @@ #define _GNU_SOURCE #include #include -#include #include #include #include @@ -390,7 +389,7 @@ static void cmd_lsauth(struct socket *sk, struct uidata *data, int argc, wchar_t prev = NULL; for(mech = mechs; mech != NULL; mech = mech->next) { - if(mech->enabled) + if(mech->enabled && authavailable(mech, sk)) { if(prev != NULL) sq(sk, 1, L"200", prev->name, NULL); @@ -439,7 +438,7 @@ static void cmd_login(struct socket *sk, struct uidata *data, int argc, wchar_t return; } free(buf); - switch(authenticate(data->auth, NULL)) + switch(authenticate(data->auth, sk, NULL)) { case AUTH_SUCCESS: data->userinfo = finduser(data->username); @@ -513,7 +512,7 @@ static void cmd_pass(struct socket *sk, struct uidata *data, int argc, wchar_t * sq(sk, 0, L"507", L"Data not expected", NULL); return; } - switch(authenticate(data->auth, buf)) + switch(authenticate(data->auth, sk, buf)) { case AUTH_SUCCESS: data->userinfo = finduser(data->username);