$NetBSD: patch-al,v 1.1 2007/11/24 17:40:36 adrianp Exp $ --- src/modules/rlm_preprocess/rlm_preprocess.c.orig 2007-04-07 23:42:51.000000000 +0100 +++ src/modules/rlm_preprocess/rlm_preprocess.c @@ -126,7 +126,7 @@ static void cisco_vsa_hack(VALUE_PAIR *v /* * No weird packing. Ignore it. */ - ptr = strchr(vp->strvalue, '='); /* find an '=' */ + ptr = strchr((char *)vp->strvalue, '='); /* find an '=' */ if (!ptr) continue; /* @@ -144,7 +144,7 @@ static void cisco_vsa_hack(VALUE_PAIR *v char *p; DICT_ATTR *dattr; - p = vp->strvalue; + p = (char *)vp->strvalue; gettoken(&p, newattr, sizeof(newattr)); if (((dattr = dict_attrbyname(newattr)) != NULL) && @@ -223,10 +223,10 @@ static void rad_mangle(rlm_preprocess_t * * FIXME: should we handle this as a REALM ? */ - if ((ptr = strchr(namepair->strvalue, '\\')) != NULL) { + if ((ptr = strchr((char *)namepair->strvalue, '\\')) != NULL) { strNcpy(newname, ptr + 1, sizeof(newname)); /* Same size */ - strcpy(namepair->strvalue, newname); + strcpy((char *)namepair->strvalue, newname); namepair->length = strlen(newname); } } @@ -395,9 +395,9 @@ static int huntgroup_access(REQUEST *req break; } - strNcpy(vp->strvalue, i->name, + strNcpy((char *)vp->strvalue, i->name, sizeof(vp->strvalue)); - vp->length = strlen(vp->strvalue); + vp->length = strlen((char *)vp->strvalue); pairadd(&request_pairs, vp); } @@ -425,7 +425,7 @@ static int add_nas_attr(REQUEST *request return -1; } nas->lvalue = request->packet->src_ipaddr; - ip_hostname(nas->strvalue, sizeof(nas->strvalue), nas->lvalue); + ip_hostname((char *)nas->strvalue, sizeof(nas->strvalue), nas->lvalue); pairadd(&request->packet->vps, nas); } @@ -446,7 +446,7 @@ static int add_nas_attr(REQUEST *request return -1; } nas->lvalue = request->packet->src_ipaddr; - ip_hostname(nas->strvalue, sizeof(nas->strvalue), nas->lvalue); + ip_hostname((char *)nas->strvalue, sizeof(nas->strvalue), nas->lvalue); pairadd(&request->packet->vps, nas); return 0; } @@ -580,7 +580,7 @@ static int preprocess_authorize(void *in if ((r = huntgroup_access(request, data->huntgroups, request->packet->vps)) != RLM_MODULE_OK) { radlog(L_AUTH, "No huntgroup access: [%s] (%s)", - request->username ? request->username->strvalue : "", + request->username ? (char *)request->username->strvalue : "", auth_name(buf, sizeof(buf), request, 1)); return r; }