if (end)
*end = '\0';
- strncpy(name, vrf, len - 1);
+ strlcpy(name, vrf, len);
break;
}
}
if (vrf)
*vrf = '\0';
- strncpy(vpath, start, len - 1);
- vpath[len - 1] = '\0';
+ strlcpy(vpath, start, len);
/* if vrf path is just / then return nothing */
if (!strcmp(vpath, "/"))
out:
free(mnt);
+ drop_cap();
+
return rc;
}
return 0;
}
- if (ip_linkaddr_list(0, ipvrf_filter_req, &linfo, NULL) == 0) {
+ if (ip_link_list(ipvrf_filter_req, &linfo) == 0) {
struct nlmsg_list *l;
unsigned nvrf = 0;
int n;