--- embedaddon/mpd/src/auth.h 2016/11/01 09:56:12 1.1.1.2 +++ embedaddon/mpd/src/auth.h 2023/09/27 11:08:00 1.1.1.3.2.1 @@ -113,6 +113,7 @@ struct authparams { struct in_addr peer_dns[2]; /* DNS servers for peer to use */ struct in_addr peer_nbns[2]; /* NBNS servers for peer to use */ +#ifdef USE_RADIUS char *eapmsg; /* EAP Msg for forwarding to RADIUS * server */ int eapmsg_len; @@ -125,6 +126,7 @@ struct authparams { char *filter_id; /* RADIUS Framed-Filter-Id attribute */ +#endif char action[8 + LINK_MAX_NAME]; #ifdef USE_IPFW @@ -204,7 +206,9 @@ struct authparams { }; struct authconf { +#ifdef USE_RADIUS struct radiusconf radius; /* RADIUS configuration */ +#endif char authname[AUTH_MAX_AUTHNAME]; /* Configured username */ char password[AUTH_MAX_PASSWORD]; /* Configured password */ u_int acct_update; @@ -231,7 +235,9 @@ struct auth { struct pppTimer acct_timer; /* Timer for accounting updates */ struct papinfo pap; /* PAP state */ struct chapinfo chap; /* CHAP state */ +#ifdef USE_RADIUS struct eapinfo eap; /* EAP state */ +#endif struct paction *thread; /* async auth thread */ struct paction *acct_thread; /* async accounting auth thread */ struct authconf conf; /* Auth backends, RADIUS, etc. */ @@ -240,8 +246,6 @@ struct auth { }; typedef struct auth *Auth; -struct radiusconf radius; /* RADIUS configuration */ - /* * Interface between the auth-backend (secret file, RADIUS, etc.) and Mpd's * internal structs. @@ -255,7 +259,9 @@ struct authdata { u_int code; /* Proto specific code */ u_char acct_type; /* Accounting type, Start, Stop, * Update */ +#ifdef USE_RADIUS u_char eap_radius; +#endif u_char status; u_char why_fail; char *reply_message; /* Text wich may displayed to the user */ @@ -263,10 +269,13 @@ struct authdata { char *mschapv2resp; /* Response String for MSCHAPv2 */ void (*finish) (Link l, struct authdata *auth); /* Finish handler */ int drop_user; /* RAD_MPD_DROP_USER value sent by - * RADIUS server */ + * RADIUS server or external acct script */ +#ifdef USE_RADIUS struct { struct rad_handle *handle; /* the RADIUS handle */ } radius; +#endif + #ifdef USE_OPIE struct { struct opie data; @@ -287,7 +296,7 @@ struct authdata { #endif char *downReason; /* Reason for link going down */ time_t last_up; /* Time this link last got up */ - PhysType phys_type; /* Device type descriptor */ + const struct phystype *phys_type; /* Device type descriptor */ int linkID; /* Absolute link number */ char peer_ident[64]; /* LCP ident received from peer */ struct in_addr peer_addr; /* currently assigned @@ -307,9 +316,6 @@ extern const struct cmdtab AuthSetCmds[]; * GLOBAL VARIABLES */ extern const u_char gMsoftZeros[32]; -extern int gMaxLogins; /* max number of concurrent logins per - * user */ -extern int gMaxLoginsCI; /* * FUNCTIONS @@ -327,7 +333,7 @@ AuthOutput(Link l, int proto, u_int code, u_int id, u_char eap_type); extern void AuthFinish(Link l, int which, int ok); extern void AuthCleanup(Link l); -extern int AuthStat(Context ctx, int ac, char *av[], void *arg); +extern int AuthStat(Context ctx, int ac, const char *const av[], const void *arg); extern void AuthAccountStart(Link l, int type); extern void AuthAccountTimeout(void *arg); extern AuthData AuthDataNew(Link l);