diff options
author | Swen Schillig <swen@linux.ibm.com> | 2019-06-04 09:01:02 +0200 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2019-06-30 11:32:18 +0000 |
commit | bf020a8c8db6bb6a0386d3bf69d40116601b1aca (patch) | |
tree | f932cb3e93dc812eb63569a748232b6fdd346e66 /nsswitch/wbinfo.c | |
parent | 39a518b6717a4687f43333b3e62a1765d45f5bff (diff) | |
download | samba-bf020a8c8db6bb6a0386d3bf69d40116601b1aca.tar.gz |
nsswitch: Update all consumers of strtoul_err(), strtoull_err() to new API
Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Diffstat (limited to 'nsswitch/wbinfo.c')
-rw-r--r-- | nsswitch/wbinfo.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c index b8f04536299..ae89f876a9d 100644 --- a/nsswitch/wbinfo.c +++ b/nsswitch/wbinfo.c @@ -140,7 +140,7 @@ static bool parse_wbinfo_domain_user(const char *domuser, fstring domain, * Return true if input was valid, false otherwise. */ static bool parse_mapping_arg(char *arg, int *id, char **sid) { - char *tmp, *endptr; + char *tmp; int error = 0; if (!arg || !*arg) @@ -154,9 +154,8 @@ static bool parse_mapping_arg(char *arg, int *id, char **sid) /* Because atoi() can return 0 on invalid input, which would be a valid * UID/GID we must use strtoul() and do error checking */ - *id = strtoul_err(tmp, &endptr, 10, &error); - - if (endptr[0] != '\0' || error != 0) + *id = smb_strtoul(tmp, NULL, 10, &error, SMB_STR_FULL_STR_CONV); + if (error != 0) return false; return true; @@ -1421,7 +1420,7 @@ static bool wbinfo_lookuprids(const char *domain, const char *arg) int error = 0; uint32_t rid; - rid = strtoul_err(ridstr, NULL, 10, &error); + rid = smb_strtoul(ridstr, NULL, 10, &error, SMB_STR_STANDARD); if (error != 0) { d_printf("failed to convert rid\n"); goto done; |