int temp;
unsigned char *src1;
- src1 = (unsigned char *) strchr(src, 'x');
+ src1 = (unsigned char *) strchr((char *)src, 'x');
if (src1 == NULL)
- src1 = (unsigned char *) strchr(src,'X');
+ src1 = (unsigned char *) strchr((char *)src,'X');
if (src1 == NULL)
src1 = src;
* Use the secret to setup the decryption digest
*/
secretlen = strlen(secret);
- strcpy(buffer, secret);
+ memcpy(buffer, secret, secretlen);
memcpy(buffer + secretlen, vector, AUTH_VECTOR_LEN);
librad_md5_calc((u_char *)digest, buffer, secretlen + AUTH_VECTOR_LEN);
* Use the secret to setup the decryption digest
*/
secretlen = strlen(secret);
- strcpy(buffer, secret);
+ memcpy(buffer, secret, secretlen);
memcpy(buffer + secretlen, vector, AUTH_VECTOR_LEN);
librad_md5_calc((u_char *)digest, buffer, secretlen + AUTH_VECTOR_LEN);
case T_OP_SUB: /* -= */
if (found) {
if (!i->strvalue[0] ||
- (strcmp(found->strvalue,
- i->strvalue) == 0)) {
+ (strcmp((char *)found->strvalue,
+ (char *)i->strvalue) == 0)){
pairdelete(to, found->attribute);
}
}
* UNIX if auth_type was not set.
*/
if (auth_type < 0) {
- if (password_pair && !strcmp(password_pair->strvalue, "UNIX"))
+ if (password_pair &&
+ !strcmp((char *)password_pair->strvalue, "UNIX"))
auth_type = PW_AUTHTYPE_SYSTEM;
- else if(password_pair && !strcmp(password_pair->strvalue,"PAM"))
+ else if(password_pair &&
+ !strcmp((char *)password_pair->strvalue,"PAM"))
auth_type = PW_AUTHTYPE_PAM;
else
auth_type = PW_AUTHTYPE_LOCAL;
result = auth_item->strvalue ? -1 : 0;
break;
}
- if (strcmp(password_pair->strvalue,
- crypt(auth_item->strvalue,
- password_pair->strvalue)) != 0)
+ if (strcmp((char *)password_pair->strvalue,
+ crypt((char *)auth_item->strvalue,
+ (char *)password_pair->strvalue)) != 0)
result = -1;
break;
case PW_AUTHTYPE_LOCAL:
* Plain text password.
*/
if (password_pair == NULL ||
- strcmp(password_pair->strvalue,
- auth_item->strvalue)!=0)
+ strcmp((char *)password_pair->strvalue,
+ (char *)auth_item->strvalue)!=0)
result = -1;
break;
}
exec_wait = 0;
if ((auth_item = pairfind(request->reply->vps, PW_EXEC_PROGRAM)) != NULL) {
exec_wait = 0;
- exec_program = strdup(auth_item->strvalue);
+ exec_program = strdup((char *)auth_item->strvalue);
pairdelete(&request->reply->vps, PW_EXEC_PROGRAM);
}
if ((auth_item = pairfind(request->reply->vps, PW_EXEC_PROGRAM_WAIT)) != NULL) {
exec_wait = 1;
- exec_program = strdup(auth_item->strvalue);
+ exec_program = strdup((char *)auth_item->strvalue);
pairdelete(&request->reply->vps, PW_EXEC_PROGRAM_WAIT);
}
strlen(s), sizeof(c->secret) - 1);
return -1;
}
- strNcpy(c->secret, s, sizeof(c->secret));
+ strNcpy((char *)c->secret, s, sizeof(c->secret));
c->striprealm = 1;
}
c->ipaddr = ip_getaddr(hostnm);
- strcpy(c->secret, secret);
+ strcpy((char *)c->secret, secret);
strcpy(c->shortname, shortnm);
ip_hostname(c->longname, sizeof(c->longname),
c->ipaddr);
case 'u': /* User name */
if ((tmp = pairfind(request,
PW_USER_NAME)) != NULL)
- strcpy(output + i, tmp->strvalue);
+ strcpy(output + i,
+ (char *)tmp->strvalue);
else
strcpy(output + i, "unknown");
i += strlen(output + i);
case 'U': /* Stripped User name */
if ((tmp = pairfind(request,
PW_STRIPPED_USER_NAME)) != NULL)
- strcpy(output + i, tmp->strvalue);
+ strcpy(output + i,
+ (char *)tmp->strvalue);
else
strcpy(output + i, "unknown");
i += strlen(output + i);
case 'i': /* Calling station ID */
if ((tmp = pairfind(request,
PW_CALLING_STATION_ID)) != NULL)
- strcpy(output + i, tmp->strvalue);
+ strcpy(output + i,
+ (char *)tmp->strvalue);
else
strcpy(output + i, "unknown");
i += strlen(output + i);
case 'c': /* Callback-Number */
if ((tmp = pairfind(reply,
PW_CALLBACK_NUMBER)) != NULL)
- strcpy(output + i, tmp->strvalue);
+ strcpy(output + i,
+ (char *)tmp->strvalue);
else
strcpy(output + i, "unknown");
i += strlen(output + i);
case 's': /* Speed */
if ((tmp = pairfind(request,
PW_CONNECT_INFO)) != NULL)
- strcpy(output + i, tmp->strvalue);
+ strcpy(output + i,
+ (char *)tmp->strvalue);
else
strcpy(output + i, "unknown");
i += strlen(output + i);
file, lineno, hostnm);
return -1;
}
- strcpy(c->secret, secret);
+ strcpy((char *)c->secret, secret);
strcpy(c->shortname, shortnm);
ip_hostname(c->longname, sizeof(c->longname), c->ipaddr);
exit(1);
}
DEBUG2(" authorize: Creating Stripped-User-Name of %s", newname);
- strcpy(vp->strvalue, newname);
+ strcpy((char *)vp->strvalue, newname);
vp->length = strlen((char *)vp->strvalue);
pairadd(&request->packet->vps, vp);
request->username = vp;
vp = request->username;
DEBUG2(" authorize: Updating Stripped-User-Name from %s to %s",
vp->strvalue, newname);
- strcpy(vp->strvalue, newname);
+ strcpy((char *)vp->strvalue, newname);
vp->length = strlen((char *)vp->strvalue);
}
request->username->strvalue);
continue;
}
- strcpy(newname, vp->strvalue);
+ strcpy(newname, (char *)vp->strvalue);
strcat(newname, (char *)request->username->strvalue);
update_username(request, newname);
break;
vp->strvalue);
continue;
}
- strcpy(newname, request->username->strvalue);
+ strcpy(newname,
+ (char *)request->username->strvalue);
strcat(newname, (char *)vp->strvalue);
update_username(request, newname);
break;
if (debug_flag) setlinebuf(stdout);
if (myip == 0) {
- strcpy(buffer, "*");
+ strcpy((char *)buffer, "*");
} else {
ip_ntoa((char *)buffer, myip);
}
request->child_pid = NO_SUCH_CHILD_PID;
request->prev = NULL;
request->next = NULL;
- strNcpy(request->secret, cl->secret, sizeof(request->secret));
+ strNcpy(request->secret, (char *)cl->secret, sizeof(request->secret));
rad_process(request, spawn_flag);
} /* loop over authfd, acctfd, proxyfd */
for (vp = request->packet->vps; vp; vp = vp->next) {
switch (vp->attribute) {
case PW_USER_NAME:
- strncpy(ut.login, vp->strvalue, RUT_NAMESIZE);
+ strncpy(ut.login, (char *)vp->strvalue,
+ RUT_NAMESIZE);
break;
case PW_LOGIN_IP_HOST:
case PW_FRAMED_IP_ADDRESS:
nas_port_type = vp->lvalue;
break;
case PW_CALLING_STATION_ID:
- strncpy(ut.caller_id, vp->strvalue,
+ strncpy(ut.caller_id, (char *)vp->strvalue,
sizeof(ut.caller_id));
ut.caller_id[sizeof(ut.caller_id) - 1] = 0;
break;
request->length);
break;
case PW_TYPE_STRING:
- ret = strcmp(request->strvalue, check->strvalue);
+ ret = strcmp((char *)request->strvalue,
+ (char *)check->strvalue);
break;
case PW_TYPE_INTEGER:
case PW_TYPE_DATE:
check_pairs = check_pairs; /* shut the compiler up */
reply_pairs = reply_pairs;
- if ((strchr(check->strvalue, ',') == NULL) &&
- (strchr(check->strvalue, '-') == NULL)) {
+ if ((strchr((char *)check->strvalue, ',') == NULL) &&
+ (strchr((char *)check->strvalue, '-') == NULL)) {
return (request->lvalue - check->lvalue);
}
/* Same size */
- strcpy(buf, check->strvalue);
+ strcpy(buf, (char *)check->strvalue);
s = strtok(buf, ",");
while (s) {
len = strlen((char *)check->strvalue);
switch (check->attribute) {
case PW_PREFIX:
- ret = strncmp(name, check->strvalue, len);
+ ret = strncmp(name, (char *)check->strvalue, len);
if (ret == 0 && rest)
strcpy(rest, name + len);
break;
namelen = strlen(name);
if (namelen < len)
break;
- ret = strcmp(name + namelen - len, check->strvalue);
+ ret = strcmp(name + namelen - len,
+ (char *)check->strvalue);
if (ret == 0 && rest) {
strncpy(rest, name, namelen - len);
rest[namelen - len] = 0;
* I don't think we want to update the User-Name
* attribute in place... - atd
*/
- strcpy(request->strvalue, rest);
+ strcpy((char *)request->strvalue, rest);
request->length = strlen(rest);
} else {
if ((vp = pairfind(check_pairs, PW_STRIPPED_USER_NAME)) != NULL){
- strcpy(vp->strvalue, rest);
+ strcpy((char *)vp->strvalue, rest);
vp->length = strlen(rest);
} else if ((vp = paircreate(PW_STRIPPED_USER_NAME,
PW_TYPE_STRING)) != NULL) {
- strcpy(vp->strvalue, rest);
+ strcpy((char *)vp->strvalue, rest);
vp->length = strlen(rest);
pairadd(&request, vp);
} /* else no memory! Die, die!: FIXME!! */
len = strlen((char *)check->strvalue);
switch (check->attribute) {
case PW_PREFIX:
- ret = strncmp(name, check->strvalue, len);
+ ret = strncmp(name, (char *)check->strvalue, len);
if (ret == 0 && rest)
strcpy(rest, name + len);
break;
namelen = strlen(name);
if (namelen < len)
break;
- ret = strcmp(name + namelen - len, check->strvalue);
+ ret = strcmp(name + namelen - len,
+ (char *)check->strvalue);
if (ret == 0 && rest) {
strncpy(rest, name, namelen - len);
rest[namelen - len] = 0;
if (do_strip) {
tmp = pairfind(request_pairs, PW_STRIPPED_USER_NAME);
if (tmp) {
- strcpy(tmp->strvalue, newname);
+ strcpy((char *)tmp->strvalue, newname);
tmp->length = strlen((char *)tmp->strvalue);
} else {
/*
radlog(L_ERR|L_CONS, "no memory");
exit(1);
}
- strcpy(tmp->strvalue, newname);
+ strcpy((char *)tmp->strvalue, newname);
tmp->length = strlen((char *)tmp->strvalue);
pairadd(&request_pairs, tmp);
}
radlog(L_ERR|L_CONS, "no memory");
exit(1);
}
- strcpy(vp->strvalue, name);
+ strcpy((char *)vp->strvalue, name);
vp->length = strlen((char *)vp->strvalue);
pairadd(&request->packet->vps, vp);
request->username = vp;
/* let's find this group */
if(grphead) {
cur = grphead;
- while((cur) && (strcmp(cur->gr_name, check->strvalue))) {
+ while((cur) && (strcmp(cur->gr_name, (char *)check->strvalue))){
cur = cur->next;
}
/* found the group, now compare it */