void pairfree(VALUE_PAIR **);
void pairbasicfree(VALUE_PAIR *pair);
VALUE_PAIR *pairfind(VALUE_PAIR *, unsigned int attr, unsigned int vendor);
-void pairdelete(VALUE_PAIR **, unsigned int attr, unsigned int vendor);
+void pairdelete(VALUE_PAIR **, unsigned int attr, unsigned int vendor, int8_t tag);
void pairadd(VALUE_PAIR **, VALUE_PAIR *);
void pairreplace(VALUE_PAIR **first, VALUE_PAIR *add);
int paircmp(VALUE_PAIR *check, VALUE_PAIR *data);
VALUE_PAIR *paircopyvp(const VALUE_PAIR *vp);
VALUE_PAIR *paircopy(VALUE_PAIR *vp);
-VALUE_PAIR *paircopy2(VALUE_PAIR *vp, unsigned int attr, unsigned int vendor);
+VALUE_PAIR *paircopy2(VALUE_PAIR *vp, unsigned int attr, unsigned int vendor, int8_t tag);
void pairmove(VALUE_PAIR **to, VALUE_PAIR **from);
void pairmove2(VALUE_PAIR **to, VALUE_PAIR **from, unsigned int attr, unsigned int vendor);
VALUE_PAIR *pairparsevalue(VALUE_PAIR *vp, const char *value);
}
-/*
- * Delete the pair(s) with the matching attribute
+/** Delete matching pairs
+ *
+ * Delete matching pairs from the attribute list.
+ *
+ * @param[in+out] vp which is head of the list.
+ * @param[in] attr to match.
+ * @param[in] vendor to match.
+ * @param[in] tag to match, only used if > 0.
*/
-void pairdelete(VALUE_PAIR **first, unsigned int attr, unsigned int vendor)
+void pairdelete(VALUE_PAIR **first, unsigned int attr, unsigned int vendor,
+ int8_t tag)
{
VALUE_PAIR *i, *next;
VALUE_PAIR **last = first;
for(i = *first; i; i = next) {
next = i->next;
- if ((i->attribute == attr) && (i->vendor == vendor)) {
+ if ((i->attribute == attr) && (i->vendor == vendor) &&
+ ((tag < 0) ||
+ (i->flags.has_tag && (i->flags.tag == tag)))) {
*last = next;
pairbasicfree(i);
} else {
}
-/*
- * Copy just a certain type of pairs.
+/** Copy matching pairs
+ *
+ * Copy pairs of a matching attribute number, vendor number and tag from the
+ * the input list to a new list, and return the head of this list.
+ *
+ * @param[in] vp which is head of the input list.
+ * @param[in] attr to match, if 0 input list will not be filtered by attr.
+ * @param[in] vendor to match
+ * @param[in] tag to match, if < 0 input list will not be filtered by vendor,
+ * if >= 0 only attributes with that tag value will be copied.
+ * @return the head of the new VALUE_PAIR list.
*/
-VALUE_PAIR *paircopy2(VALUE_PAIR *vp, unsigned int attr, unsigned int vendor)
+VALUE_PAIR *paircopy2(VALUE_PAIR *vp, unsigned int attr, unsigned int vendor,
+ int8_t tag)
{
VALUE_PAIR *first, *n, **last;
while (vp) {
if ((attr > 0) &&
- !((vp->attribute == attr) && (vp->vendor == vendor))) {
- vp = vp->next;
- continue;
- }
+ ((vp->attribute != attr) || (vp->vendor != vendor)))
+ goto skip;
+
+ if ((tag >= 0) && vp->flags.has_tag && (vp->flags.tag != tag))
+ goto skip;
n = paircopyvp(vp);
if (!n) return first;
+
*last = n;
last = &n->next;
vp = vp->next;
+
+ continue;
+
+ skip:
+ vp = vp->next;
}
+
return first;
}
*/
VALUE_PAIR *paircopy(VALUE_PAIR *vp)
{
- return paircopy2(vp, 0, 0);
+ return paircopy2(vp, 0, 0, -1);
}
if (!i->vp_strvalue[0] ||
(strcmp((char *)found->vp_strvalue,
(char *)i->vp_strvalue) == 0)){
- pairdelete(to, found->attribute, found->vendor);
+ pairdelete(to, found->attribute, found->vendor, found->flags.tag);
/*
* 'tailto' may have been
memcpy(found, i, sizeof(*found));
found->next = mynext;
- pairdelete(&found->next, found->attribute, found->vendor);
+ pairdelete(&found->next, found->attribute, found->vendor, found->flags.tag);
/*
* 'tailto' may have been
realm = realm_find2(vp->vp_strvalue);
if (realm && !realm->acct_pool) {
DEBUG("rad_accounting: Cancelling proxy to realm %s, as it is a LOCAL realm.", realm->name);
- pairdelete(&request->config_items, PW_PROXY_TO_REALM, 0);
+ pairdelete(&request->config_items, PW_PROXY_TO_REALM, 0, -1);
} else {
/*
* Don't reply to the NAS now because
result = rad_authenticate(request);
if (request->reply->code == PW_AUTHENTICATION_REJECT) {
- pairdelete(&request->config_items, PW_POST_AUTH_TYPE, 0);
+ pairdelete(&request->config_items, PW_POST_AUTH_TYPE, 0, -1);
vp = radius_pairmake(request, &request->config_items,
"Post-Auth-Type", "Reject",
T_OP_SET);
* server. So we must be the destination of the
* giaddr field.
*/
- pairdelete(&request->packet->vps, 266, DHCP_MAGIC_VENDOR);
+ pairdelete(&request->packet->vps, 266, DHCP_MAGIC_VENDOR, -1);
/*
* Search for client IP address.
* Copy State from the request to the reply.
* See RFC 5176 Section 3.3.
*/
- vp = paircopy2(request->packet->vps, PW_STATE, 0);
+ vp = paircopy2(request->packet->vps, PW_STATE, 0, -1);
if (vp) pairadd(&request->reply->vps, vp);
/*
/*
* Copy Proxy-State from the request to the reply.
*/
- vp = paircopy2(request->packet->vps, PW_PROXY_STATE, 0);
+ vp = paircopy2(request->packet->vps, PW_PROXY_STATE, 0, -1);
if (vp) pairadd(&request->reply->vps, vp);
/*
* Post-Auth-Type = Reject
*/
if (request->reply->code == PW_AUTHENTICATION_REJECT) {
- pairdelete(&request->config_items, PW_POST_AUTH_TYPE, 0);
+ pairdelete(&request->config_items, PW_POST_AUTH_TYPE, 0, -1);
vp = radius_pairmake(request, &request->config_items,
"Post-Auth-Type", "Reject",
T_OP_SET);
* the reply. These include Proxy-State
* attributes from us and remote server.
*/
- pairdelete(&request->proxy_reply->vps, PW_PROXY_STATE, 0);
+ pairdelete(&request->proxy_reply->vps, PW_PROXY_STATE, 0, -1);
/*
* Add the attributes left in the proxy
if (!dval) {
DEBUG("No Post-Proxy-Type Fail: ignoring");
- pairdelete(&request->config_items, PW_POST_PROXY_TYPE, 0);
+ pairdelete(&request->config_items, PW_POST_PROXY_TYPE, 0, -1);
request_cleanup_delay_init(request, NULL);
return 0;
}
fr_bin2hex(ssn->ssl->session->session_id, buffer, size);
- vp = paircopy2(request->reply->vps, PW_USER_NAME, 0);
+ vp = paircopy2(request->reply->vps, PW_USER_NAME, 0, -1);
if (vp) pairadd(&vps, vp);
- vp = paircopy2(request->packet->vps, PW_STRIPPED_USER_NAME, 0);
+ vp = paircopy2(request->packet->vps, PW_STRIPPED_USER_NAME, 0, -1);
if (vp) pairadd(&vps, vp);
- vp = paircopy2(request->reply->vps, PW_CACHED_SESSION_POLICY, 0);
+ vp = paircopy2(request->reply->vps, PW_CACHED_SESSION_POLICY, 0, -1);
if (vp) pairadd(&vps, vp);
certs = (VALUE_PAIR **)SSL_get_ex_data(ssn->ssl, FR_TLS_EX_INDEX_CERTS);
(strcmp((char *)found->vp_strvalue,
(char *)i->vp_strvalue) == 0)) {
pairdelete(to, found->attribute,
- found->vendor);
+ found->vendor,
+ found->flags.tag);
/*
* 'tailto' may have been
}
join_attr = join_attr -> next;
}
- pairdelete(&vp,SM_JOIN_ATTR, 0);
+ pairdelete(&vp,SM_JOIN_ATTR, 0, -1);
if ( parse_state != SMP_ERROR ) {
if ( ! isfallthrough(vp) ) {
continue_search = 0;
/*
* Delete any previous replies.
*/
- pairdelete(&handler->request->reply->vps, PW_EAP_MESSAGE, 0);
- pairdelete(&handler->request->reply->vps, PW_STATE, 0);
+ pairdelete(&handler->request->reply->vps, PW_EAP_MESSAGE, 0, -1);
+ pairdelete(&handler->request->reply->vps, PW_STATE, 0, -1);
eap_packet_free(&handler->eap_ds->request);
handler->eap_ds->request = eap_packet_alloc();
}
eap_packet = (eap_packet_t *)reply->packet;
- pairdelete(&(packet->vps), PW_EAP_MESSAGE, 0);
+ pairdelete(&(packet->vps), PW_EAP_MESSAGE, 0, -1);
vp = eap_packet2vp(eap_packet);
if (!vp) return RLM_MODULE_INVALID;
* maybe should just copy things we care about, or keep
* a copy of the original input and start from there again?
*/
- pairdelete(&resp->vps, PW_EAP_MESSAGE, 0);
- pairdelete(&resp->vps, ATTRIBUTE_EAP_BASE+PW_EAP_IDENTITY, 0);
+ pairdelete(&resp->vps, PW_EAP_MESSAGE, 0, -1);
+ pairdelete(&resp->vps, ATTRIBUTE_EAP_BASE+PW_EAP_IDENTITY, 0, -1);
last = &resp->vps;
for(vp = *last; vp != NULL; vp = vpnext)
VALUE_PAIR *vp, *statevp, *radstate, *eapid;
char statenamebuf[32], subtypenamebuf[32];
- if ((radstate = paircopy2(req->vps, PW_STATE, 0)) == NULL)
+ if ((radstate = paircopy2(req->vps, PW_STATE, 0, -1)) == NULL)
{
return 0;
}
- if ((eapid = paircopy2(req->vps, ATTRIBUTE_EAP_ID, 0)) == NULL)
+ if ((eapid = paircopy2(req->vps, ATTRIBUTE_EAP_ID, 0, -1)) == NULL)
{
return 0;
}
cleanresp(rep);
- if ((state = paircopy2(req->vps, PW_STATE, 0)) == NULL)
+ if ((state = paircopy2(req->vps, PW_STATE, 0, -1)) == NULL)
{
fprintf(stderr, "radeapclient: no state attribute found\n");
return 0;
}
- if ((id = paircopy2(req->vps, ATTRIBUTE_EAP_ID, 0)) == NULL)
+ if ((id = paircopy2(req->vps, ATTRIBUTE_EAP_ID, 0, -1)) == NULL)
{
fprintf(stderr, "radeapclient: no EAP-ID attribute found\n");
return 0;
*/
/* nuke any existing EAP-Messages */
- pairdelete(&req->vps, PW_EAP_MESSAGE, 0);
+ pairdelete(&req->vps, PW_EAP_MESSAGE, 0, -1);
memset(&ep, 0, sizeof(ep));
ep.code = eapcode;
}
/* find the EAP-Message, copy it to req2 */
- vp = paircopy2(req->vps, PW_EAP_MESSAGE);
+ vp = paircopy2(req->vps, PW_EAP_MESSAGE, 0, -1);
if(vp == NULL) continue;
* set to 127.0.0.1 for tunneled requests, and
* we don't want to tell the world that...
*/
- pairdelete(&request->proxy->vps, PW_FREERADIUS_PROXIED_TO, VENDORPEC_FREERADIUS);
+ pairdelete(&request->proxy->vps, PW_FREERADIUS_PROXIED_TO, VENDORPEC_FREERADIUS, -1);
RDEBUG2(" Tunneled session will be proxied. Not doing EAP.");
return RLM_MODULE_HANDLED;
* If there was a User-Password in the request,
* why the heck are they using EAP-GTC?
*/
- pairdelete(&handler->request->packet->vps, PW_USER_PASSWORD, 0);
+ pairdelete(&handler->request->packet->vps, PW_USER_PASSWORD, 0, -1);
vp = pairmake("User-Password", "", T_OP_EQ);
if (!vp) {
* the State attribute back, before passing
* the handler & request back into the tunnel.
*/
- pairdelete(&handler->request->packet->vps, PW_STATE, 0);
+ pairdelete(&handler->request->packet->vps, PW_STATE, 0, -1);
/*
* Fix the User-Name when proxying, to strip off
/*
* Clean up the tunneled reply.
*/
- pairdelete(&reply->vps, PW_PROXY_STATE, 0);
- pairdelete(&reply->vps, PW_EAP_MESSAGE, 0);
- pairdelete(&reply->vps, PW_MESSAGE_AUTHENTICATOR, 0);
+ pairdelete(&reply->vps, PW_PROXY_STATE, 0, -1);
+ pairdelete(&reply->vps, PW_EAP_MESSAGE, 0, -1);
+ pairdelete(&reply->vps, PW_MESSAGE_AUTHENTICATOR, 0, -1);
/*
* Delete MPPE keys & encryption policy. We don't
* want these here.
*/
- pairdelete(&reply->vps, 7, VENDORPEC_MICROSOFT);
- pairdelete(&reply->vps, 8, VENDORPEC_MICROSOFT);
- pairdelete(&reply->vps, 16, VENDORPEC_MICROSOFT);
- pairdelete(&reply->vps, 17, VENDORPEC_MICROSOFT);
+ pairdelete(&reply->vps, 7, VENDORPEC_MICROSOFT, -1);
+ pairdelete(&reply->vps, 8, VENDORPEC_MICROSOFT, -1);
+ pairdelete(&reply->vps, 16, VENDORPEC_MICROSOFT, -1);
+ pairdelete(&reply->vps, 17, VENDORPEC_MICROSOFT, -1);
t->accept_vps = reply->vps;
reply->vps = NULL;
/*
* Clean up the tunneled reply.
*/
- pairdelete(&reply->vps, PW_PROXY_STATE, 0);
- pairdelete(&reply->vps, PW_MESSAGE_AUTHENTICATOR, 0);
+ pairdelete(&reply->vps, PW_PROXY_STATE, 0, -1);
+ pairdelete(&reply->vps, PW_MESSAGE_AUTHENTICATOR, 0, -1);
t->accept_vps = reply->vps;
reply->vps = NULL;
* of attributes.
*/
pairdelete(&fake->packet->vps,
- PW_EAP_MESSAGE, 0);
+ PW_EAP_MESSAGE, 0, -1);
}
DEBUG2(" PEAP: Tunneled authentication will be proxied to %s", vp->vp_strvalue);
* Don't copy from the head, we've already
* checked it.
*/
- copy = paircopy2(vp, vp->attribute, vp->vendor);
+ copy = paircopy2(vp, vp->attribute, vp->vendor, -1);
pairadd(&fake->packet->vps, copy);
}
}
* Delete MPPE keys & encryption policy. We don't
* want these here.
*/
- pairdelete(&reply->vps, 7, VENDORPEC_MICROSOFT);
- pairdelete(&reply->vps, 8, VENDORPEC_MICROSOFT);
- pairdelete(&reply->vps, 16, VENDORPEC_MICROSOFT);
- pairdelete(&reply->vps, 17, VENDORPEC_MICROSOFT);
+ pairdelete(&reply->vps, 7, VENDORPEC_MICROSOFT, -1);
+ pairdelete(&reply->vps, 8, VENDORPEC_MICROSOFT, -1);
+ pairdelete(&reply->vps, 16, VENDORPEC_MICROSOFT, -1);
+ pairdelete(&reply->vps, 17, VENDORPEC_MICROSOFT, -1);
/*
* Use the tunneled reply, but not now.
* tunneled user!
*/
if (t->use_tunneled_reply) {
- pairdelete(&reply->vps, PW_PROXY_STATE, 0);
+ pairdelete(&reply->vps, PW_PROXY_STATE, 0, -1);
pairadd(&request->reply->vps, reply->vps);
reply->vps = NULL;
}
* Don't copy from the head, we've already
* checked it.
*/
- copy = paircopy2(vp, vp->attribute, vp->vendor);
+ copy = paircopy2(vp, vp->attribute, vp->vendor, -1);
pairadd(&fake->packet->vps, copy);
}
}
total -= size;
} while (total > 0);
- pairdelete(&handler->request->reply->vps, PW_EAP_MESSAGE);
+ pairdelete(&handler->request->reply->vps, PW_EAP_MESSAGE, -1);
pairadd(&handler->request->reply->vps, head);
return encoded;
pairfree(&reply_tmp);
if(!fallthrough(user->reply)) {
- pairdelete(&request->reply->vps, PW_FALL_THROUGH, 0);
+ pairdelete(&request->reply->vps, PW_FALL_THROUGH, 0, -1);
return(rad_check_return(user->check));
} else {
user=user->next;
pairfree(&reply_tmp);
if(!fallthrough(user->reply)) {
- pairdelete(&request->reply->vps, PW_FALL_THROUGH, 0);
+ pairdelete(&request->reply->vps, PW_FALL_THROUGH, 0, -1);
return(rad_check_return(user->check));
}
}
if(userfound || defaultfound) {
- pairdelete(&request->reply->vps, PW_FALL_THROUGH, 0);
+ pairdelete(&request->reply->vps, PW_FALL_THROUGH, 0, -1);
return(rad_check_return(request->config_items));
} else {
DEBUG2("rlm_fastusers: user not found");
/*
* Remove server internal parameters.
*/
- pairdelete(reply_pairs, PW_FALL_THROUGH, 0);
+ pairdelete(reply_pairs, PW_FALL_THROUGH, 0, -1);
/*
* See if we succeeded.
if (data->override)
{
RDEBUG("Override supplied IP address");
- pairdelete(&request->reply->vps, attr_ipaddr, vendor_ipaddr);
+ pairdelete(&request->reply->vps, attr_ipaddr, vendor_ipaddr, -1);
} else {
/* Abort */
RDEBUG("override is set to no. Return NOOP.");
vp = radius_paircreate(request, &request->reply->vps,
PW_DHCP_IP_ADDRESS_LEASE_TIME, DHCP_MAGIC_VENDOR, PW_TYPE_INTEGER);
vp->vp_integer = entry.timeout;
- pairdelete(&request->reply->vps, PW_SESSION_TIMEOUT, 0);
+ pairdelete(&request->reply->vps, PW_SESSION_TIMEOUT, 0, -1);
}
#endif
} else {
* Add the pair into the packet.
*/
if (!vals_idx){
- pairdelete(pairs, newpair->attribute, newpair->vendor);
+ pairdelete(pairs, newpair->attribute, newpair->vendor, newpair->flags.tag);
}
pairadd(&pairlist, newpair);
}
name = nvp->name;
attr = nvp->attribute;
vendor = nvp->vendor;
- vpa = paircopy2(nvp, attr, vendor);
+ vpa = paircopy2(nvp, attr, vendor, -1);
if (vpa->next) {
av = newAV();
pairfree(&vpa);
vpa = nvp; while ((vpa != NULL) && (vpa->attribute == attr) && (vpa->vendor == vendor))
vpa = vpa->next;
- pairdelete(&nvp, attr, vendor);
+ pairdelete(&nvp, attr, vendor, -1);
nvp = vpa;
}
}
*/
add = paircopy(i->reply);
ft = fallthrough(add);
- pairdelete(&add, PW_STRIP_USER_NAME, 0);
- pairdelete(&add, PW_FALL_THROUGH, 0);
+ pairdelete(&add, PW_STRIP_USER_NAME, 0, -1);
+ pairdelete(&add, PW_FALL_THROUGH, 0, -1);
pairxlatmove(request, &request->packet->vps, &add);
pairfree(&add);
updated = 1;
if (state != NULL) {
DEBUG("rlm_smsotp: Found reply to access challenge (AUTZ), Adding Auth-Type '%s'",opt->smsotp_authtype);
- pairdelete(&request->config_items, PW_AUTH_TYPE, 0); /* delete old auth-type */
+ pairdelete(&request->config_items, PW_AUTH_TYPE, 0, -1); /* delete old auth-type */
pairadd(&request->config_items, pairmake("Auth-Type", opt->smsotp_authtype, T_OP_SET));
}
sqlusername[0]= '\0';
/* Remove any user attr we added previously */
- pairdelete(&request->packet->vps, PW_SQL_USER_NAME, 0);
+ pairdelete(&request->packet->vps, PW_SQL_USER_NAME, 0, -1);
if (username != NULL) {
strlcpy(tmpuser, username, sizeof(tmpuser));
sqlsocket = sql_get_socket(inst);
if (sqlsocket == NULL) {
/* Remove the username we (maybe) added above */
- pairdelete(&request->packet->vps, PW_SQL_USER_NAME, 0);
+ pairdelete(&request->packet->vps, PW_SQL_USER_NAME, 0, -1);
return 1;
}
radlog_request(L_ERR, 0, request,
"Error getting group membership");
/* Remove the username we (maybe) added above */
- pairdelete(&request->packet->vps, PW_SQL_USER_NAME, 0);
+ pairdelete(&request->packet->vps, PW_SQL_USER_NAME, 0, -1);
sql_release_socket(inst, sqlsocket);
return 1;
}
/* Free the grouplist */
sql_grouplist_free(&group_list);
/* Remove the username we (maybe) added above */
- pairdelete(&request->packet->vps, PW_SQL_USER_NAME, 0);
+ pairdelete(&request->packet->vps, PW_SQL_USER_NAME, 0, -1);
sql_release_socket(inst, sqlsocket);
return 0;
}
/* Free the grouplist */
sql_grouplist_free(&group_list);
/* Remove the username we (maybe) added above */
- pairdelete(&request->packet->vps, PW_SQL_USER_NAME, 0);
+ pairdelete(&request->packet->vps, PW_SQL_USER_NAME, 0, -1);
sql_release_socket(inst,sqlsocket);
RDEBUG("sql_groupcmp finished: User is NOT a member of group %s",
radlog_request(L_ERR, 0, request,
"Error generating query; rejecting user");
/* Remove the grouup we added above */
- pairdelete(&request->packet->vps, PW_SQL_GROUP, 0);
+ pairdelete(&request->packet->vps, PW_SQL_GROUP, 0, -1);
sql_grouplist_free(&group_list);
return -1;
}
radlog_request(L_ERR, 0, request, "Error retrieving check pairs for group %s",
group_list_tmp->groupname);
/* Remove the grouup we added above */
- pairdelete(&request->packet->vps, PW_SQL_GROUP, 0);
+ pairdelete(&request->packet->vps, PW_SQL_GROUP, 0, -1);
pairfree(&check_tmp);
sql_grouplist_free(&group_list);
return -1;
if (!radius_xlat(querystr, sizeof(querystr), inst->config->authorize_group_reply_query, request, sql_escape_func, inst)) {
radlog_request(L_ERR, 0, request, "Error generating query; rejecting user");
/* Remove the grouup we added above */
- pairdelete(&request->packet->vps, PW_SQL_GROUP, 0);
+ pairdelete(&request->packet->vps, PW_SQL_GROUP, 0, -1);
pairfree(&check_tmp);
sql_grouplist_free(&group_list);
return -1;
radlog_request(L_ERR, 0, request, "Error retrieving reply pairs for group %s",
group_list_tmp->groupname);
/* Remove the grouup we added above */
- pairdelete(&request->packet->vps, PW_SQL_GROUP, 0);
+ pairdelete(&request->packet->vps, PW_SQL_GROUP, 0, -1);
pairfree(&check_tmp);
pairfree(&reply_tmp);
sql_grouplist_free(&group_list);
if (!radius_xlat(querystr, sizeof(querystr), inst->config->authorize_group_reply_query, request, sql_escape_func, inst)) {
radlog_request(L_ERR, 0, request, "Error generating query; rejecting user");
/* Remove the grouup we added above */
- pairdelete(&request->packet->vps, PW_SQL_GROUP, 0);
+ pairdelete(&request->packet->vps, PW_SQL_GROUP, 0, -1);
pairfree(&check_tmp);
sql_grouplist_free(&group_list);
return -1;
radlog_request(L_ERR, 0, request, "Error retrieving reply pairs for group %s",
group_list_tmp->groupname);
/* Remove the grouup we added above */
- pairdelete(&request->packet->vps, PW_SQL_GROUP, 0);
+ pairdelete(&request->packet->vps, PW_SQL_GROUP, 0, -1);
pairfree(&check_tmp);
pairfree(&reply_tmp);
sql_grouplist_free(&group_list);
* Delete the Sql-Group we added above
* And clear out the pairlists
*/
- pairdelete(&request->packet->vps, PW_SQL_GROUP, 0);
+ pairdelete(&request->packet->vps, PW_SQL_GROUP, 0, -1);
pairfree(&check_tmp);
pairfree(&reply_tmp);
}
sql_release_socket(inst, sqlsocket);
/* Remove the username we (maybe) added above */
- pairdelete(&request->packet->vps, PW_SQL_USER_NAME, 0);
+ pairdelete(&request->packet->vps, PW_SQL_USER_NAME, 0, -1);
pairfree(&check_tmp);
pairfree(&reply_tmp);
release:
/* Remove the username we (maybe) added above */
- pairdelete(&request->packet->vps, PW_SQL_USER_NAME, 0);
+ pairdelete(&request->packet->vps, PW_SQL_USER_NAME, 0, -1);
sql_release_socket(inst, sqlsocket);
rad_assert(request->packet != NULL);
/* Remove any user attr we added previously */
- pairdelete(&request->packet->vps, PW_SQL_USER_NAME, 0);
+ pairdelete(&request->packet->vps, PW_SQL_USER_NAME, 0, -1);
if (username != NULL) {
strlcpy(tmpuser, username, MAX_STRING_LEN);
* the WiMAX-MSK so that the client has a key available.
*/
if (inst->delete_mppe_keys) {
- pairdelete(&request->reply->vps, 16, VENDORPEC_MICROSOFT);
- pairdelete(&request->reply->vps, 17, VENDORPEC_MICROSOFT);
+ pairdelete(&request->reply->vps, 16, VENDORPEC_MICROSOFT, -1);
+ pairdelete(&request->reply->vps, 17, VENDORPEC_MICROSOFT, -1);
vp = radius_pairmake(request, &request->reply->vps, "WiMAX-MSK", "0x00", T_OP_EQ);
if (vp) {