diff options
Diffstat (limited to 'src/providers/proxy/proxy.c')
-rw-r--r-- | src/providers/proxy/proxy.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/providers/proxy/proxy.c b/src/providers/proxy/proxy.c index 144ab45f..b501b584 100644 --- a/src/providers/proxy/proxy.c +++ b/src/providers/proxy/proxy.c @@ -31,6 +31,7 @@ #include <security/pam_modules.h> #include "util/util.h" +#include "util/strtonum.h" #include "providers/dp_backend.h" #include "db/sysdb.h" #include "proxy.h" @@ -2822,8 +2823,7 @@ static void proxy_get_account_info(struct be_req *breq) EINVAL, "Invalid attr type"); } else { char *endptr; - errno = 0; - uid = (uid_t) strtoul(ar->filter_value, &endptr, 0); + uid = (uid_t) strtouint32(ar->filter_value, &endptr, 0); if (errno || *endptr || (ar->filter_value == endptr)) { return proxy_reply(breq, DP_ERR_FATAL, EINVAL, "Invalid attr type"); @@ -2877,8 +2877,7 @@ static void proxy_get_account_info(struct be_req *breq) EINVAL, "Invalid attr type"); } else { char *endptr; - errno = 0; - gid = (gid_t) strtoul(ar->filter_value, &endptr, 0); + gid = (gid_t) strtouint32(ar->filter_value, &endptr, 0); if (errno || *endptr || (ar->filter_value == endptr)) { return proxy_reply(breq, DP_ERR_FATAL, EINVAL, "Invalid attr type"); |