$NetBSD: patch-al,v 1.3 2010/07/20 08:41:21 adam Exp $ --- src/modules/rlm_preprocess/rlm_preprocess.c.orig 2010-05-24 05:40:58.000000000 +0000 +++ 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) { @@ -232,10 +232,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); } } @@ -403,9 +403,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; } @@ -580,7 +580,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; } @@ -631,7 +631,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; }