/* This file is in the public domain. */ #include #include extern const char *__progname; #include "bpp.h" #include "algs.h" #include "errf.h" #include "userauth.h" static int uac_none_canuse(BPP *b __attribute__((__unused__))) { return(1); } static unsigned char *uac_none_start(CUASTATE *s) { return((*s->pkthead)(s)); } static int uac_none_partial(CUASTATE *s __attribute__((__unused__))) { logmsg(LM_NOTE|LM_PEER,"protocol error: \"none\" authentication algorithm listed"); exit(1); } static int uac_none_run(CUASTATE *s) { logmsg(LM_NOTE|LM_PEER,"protocol error: type %d message for \"none\" algorithm",s->layer->b->ipkt[0]); exit(1); } static int uac_none_retry(CUASTATE *s __attribute__((__unused__))) { logmsg(LM_NOTE|LM_PEER,"protocol error: \"none\" authentication algorithm listed"); exit(1); } static void uac_none_done(CUASTATE *s __attribute__((__unused__))) { } static int uas_none_canuse(SUASTATE *s __attribute__((__unused__))) { return(0); } static int uas_none_request(SUASTATE *s, const void *rest __attribute__((__unused__)), int restlen __attribute__((__unused__))) { send_failure(s,0); return(0); } UAALG uaalg_none = { "none", 0, { &uac_none_canuse, &uac_none_start, &uac_none_partial, &uac_none_run, &uac_none_retry, &uac_none_done }, { &uas_none_canuse, &uas_none_request } };