Split out code to parse host:port into a utility function.

This commit is contained in:
Todd C. Miller
2019-11-02 12:04:26 -06:00
parent f1d0c99e03
commit b270b0c887
5 changed files with 102 additions and 30 deletions

View File

@@ -207,6 +207,10 @@ __dso_public int sudo_parse_gids_v1(const char *gidstr, const gid_t *basegid, GE
__dso_public int sudo_getgrouplist2_v1(const char *name, gid_t basegid, GETGROUPS_T **groupsp, int *ngroupsp);
#define sudo_getgrouplist2(_a, _b, _c, _d) sudo_getgrouplist2_v1((_a), (_b), (_c), (_d))
/* host_port.c */
__dso_public bool sudo_parse_host_port_v1(char *str, char **hostp, char **portp, char *defport);
#define sudo_parse_host_port(_a, _b, _c, _d) sudo_parse_host_port_v1((_a), (_b), (_c), (_d))
/* key_val.c */
__dso_public char *sudo_new_key_val_v1(const char *key, const char *value);
#define sudo_new_key_val(_a, _b) sudo_new_key_val_v1((_a), (_b))