int pairlist_read(const char *file, PAIR_LIST **list, int complain);
void pairlist_free(PAIR_LIST **);
int read_config_files(void);
+int read_realms_file(const char *file);
/* nas.c */
int read_naslist_file(char *);
char *auth_name(char *buf, size_t buflen, REQUEST *request, int do_cli);
int rad_authenticate (REQUEST *);
VALUE_PAIR *rad_getpass(REQUEST *request);
+int rad_check_password(REQUEST *request);
/* exec.c */
int radius_exec_program(const char *, REQUEST *,
auth_item->lvalue = PW_DECODED;
/* ignore more than one trailing '\0' */
- auth_item->length = strlen(auth_item->strvalue);
+ auth_item->length = strlen((char *)auth_item->strvalue);
return auth_item;
}
* Only do DNS lookups for machines. Just print
* the network as the long name.
*/
- if (c->netmask == ~0) {
+ if (c->netmask == ~0U) {
ip_hostname(c->longname, sizeof(c->longname), c->ipaddr);
} else {
hostnm[strlen(hostnm)] = '/';
*/
extern RADCLIENT *clients;
extern REALM *realms;
-extern int read_realms_file(const char *file);
static int generate_realms(const char *filename);
static int generate_clients(const char *filename);
rad_pwencode((char *)vp->strvalue,
&(vp->length),
- realm->secret, (char *)request->proxy->vector);
+ (char *)realm->secret,
+ (char *)request->proxy->vector);
/*
* If there is no PW_CHAP_CHALLENGE attribute but there
RADCLIENT *cl;
if ((cl = client_find(packet->src_ipaddr)) == NULL) {
radlog(L_ERR, "Ignoring request from unknown client %s:%d",
- ip_ntoa(buffer, packet->src_ipaddr),
+ ip_ntoa((char *)buffer, packet->src_ipaddr),
packet->src_port);
rad_free(&packet);
continue;
REALM *rl;
if ((rl = realm_findbyaddr(packet->src_ipaddr)) == NULL) {
radlog(L_ERR, "Ignoring request from unknown proxy %s:%d",
- ip_ntoa(buffer, packet->src_ipaddr),
+ ip_ntoa((char *)buffer, packet->src_ipaddr),
packet->src_port);
rad_free(&packet);
continue;
return -1;
}
- rad_lowercase(vp->strvalue);
+ rad_lowercase((char *)vp->strvalue);
DEBUG2("rad_lowerpair: %s now '%s'", vp->name, vp->strvalue);
return 0;
}
return -1;
}
- rad_rmspace(vp->strvalue);
- vp->length = strlen(vp->strvalue);
+ rad_rmspace((char *)vp->strvalue);
+ vp->length = strlen((char *)vp->strvalue);
DEBUG2("rad_rmspace_pair: %s now '%s'", vp->name, vp->strvalue);
return 0;
void sig_cleanup(int sig)
{
#ifndef HAVE_PTHREAD_H
- int i;
int status;
child_pid_t pid;
REQUEST *curreq;
} else {
INTPAIR(PW_SERVICE_TYPE, PW_LOGIN_USER); /* A guess, really */
}
- if(cliaddr != NULL)
+ if(cliaddr != 0)
IPPAIR(PW_FRAMED_IP_ADDRESS, cliaddr);
INTPAIR(PW_ACCT_SESSION_TIME, 0);
INTPAIR(PW_ACCT_INPUT_OCTETS, 0);
*/
if ((ptr = strchr(vp->strvalue, '=')) != NULL) {
strNcpy(newattr, ptr + 1, sizeof(newattr));
- strNcpy(vp->strvalue, newattr, sizeof(vp->strvalue));
- vp->length = strlen(vp->strvalue);
+ strNcpy((char *)vp->strvalue, newattr,
+ sizeof(vp->strvalue));
+ vp->length = strlen((char *)vp->strvalue);
}
}
}
*
* Reported by Lucas Heise <root@laonet.net>
*/
- if ((strlen(namepair->strvalue) > 10) &&
+ if ((strlen((char *)namepair->strvalue) > 10) &&
(namepair->strvalue[10] == '/')) {
- for (ptr = namepair->strvalue + 11; *ptr; ptr++)
+ for (ptr = (char *)namepair->strvalue + 11; *ptr; ptr++)
*(ptr - 1) = *ptr;
*(ptr - 1) = 0;
- namepair->length = strlen(namepair->strvalue);
+ namepair->length = strlen((char *)namepair->strvalue);
}
}
* We will be modifing this later, so we want our own copy
* of it.
*/
- strNcpy(namebuf, request->username->strvalue, sizeof(namebuf));
+ strNcpy(namebuf, (char *)request->username->strvalue, sizeof(namebuf));
username = namebuf;
switch(inst->format)