static int tacacs_check(void) { int tac_fd; int ret; if (prev_pap_check_hook) { ret = prev_pap_check_hook(); if (ret >= 0) { return ret; } } if (!use_tacacs) return -1; if (tac_server == -1) return 0; tac_fd = tac_connect(&tac_server, 1); if (tac_fd < 0) return 0; close(tac_fd); return 1; }
static int radius_pap_check(void) { if (!use_radius) { if (prev_pap_check_hook) return prev_pap_check_hook(); else return -1; } return radius_check(); }