$NetBSD: patch-al,v 1.2 2008/10/12 13:57:27 adrianp Exp $ --- src/modules/rlm_preprocess/rlm_preprocess.c.orig 2008-09-25 10:41:26.000000000 +0200 +++ src/modules/rlm_preprocess/rlm_preprocess.c @@ -130,7 +130,7 @@ static void cisco_vsa_hack(VALUE_PAIR *v /* * No weird packing. Ignore it. */ - ptr = strchr(vp->vp_strvalue, '='); /* find an '=' */ + ptr = strchr((char *)vp->vp_strvalue, '='); /* find an '=' */ if (!ptr) continue; /* @@ -148,7 +148,7 @@ static void cisco_vsa_hack(VALUE_PAIR *v const char *p; DICT_ATTR *dattr; - p = vp->vp_strvalue; + p = (char *)vp->vp_strvalue; gettoken(&p, newattr, sizeof(newattr)); if (((dattr = dict_attrbyname(newattr)) != NULL) && @@ -233,10 +233,10 @@ static void rad_mangle(rlm_preprocess_t * * FIXME: should we handle this as a REALM ? */ - if ((ptr = strchr(namepair->vp_strvalue, '\\')) != NULL) { + if ((ptr = strchr((char *)namepair->vp_strvalue, '\\')) != NULL) { strlcpy(newname, ptr + 1, sizeof(newname)); /* Same size */ - strcpy(namepair->vp_strvalue, newname); + strcpy((char *)namepair->vp_strvalue, newname); namepair->length = strlen(newname); } } @@ -404,9 +404,9 @@ static int huntgroup_access(REQUEST *req &request->packet->vps, PW_HUNTGROUP_NAME, PW_TYPE_STRING); - strlcpy(vp->vp_strvalue, i->name, + strlcpy((char *)vp->vp_strvalue, i->name, sizeof(vp->vp_strvalue)); - vp->length = strlen(vp->vp_strvalue); + vp->length = strlen((char *)vp->vp_strvalue); } r = RLM_MODULE_OK; } @@ -581,7 +581,7 @@ static int preprocess_authorize(void *in data->huntgroups)) != RLM_MODULE_OK) { char buf[1024]; radlog_request(L_AUTH, 0, request, "No huntgroup access: [%s] (%s)", - request->username ? request->username->vp_strvalue : "", + request->username ? (char *)request->username->vp_strvalue : "", auth_name(buf, sizeof(buf), request, 1)); return r; } @@ -632,7 +632,7 @@ static int preprocess_preaccounting(void data->huntgroups)) != RLM_MODULE_OK) { char buf[1024]; radlog_request(L_INFO, 0, request, "No huntgroup access: [%s] (%s)", - request->username ? request->username->vp_strvalue : "", + request->username ? (char *)request->username->vp_strvalue : "", auth_name(buf, sizeof(buf), request, 1)); return r; }