diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2010-10-25 15:14:24 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-10-26 07:59:50 -0400 |
commit | c5289758293a2b44b644242e997095c9f3cfd4a3 (patch) | |
tree | bf1dec679bc072fc741f72a7363a236b0dae6e99 /src/providers/proxy | |
parent | 09aa3d91f8fa667b09494612d5696da2b8461cb2 (diff) | |
download | sssd-c5289758293a2b44b644242e997095c9f3cfd4a3.tar.gz sssd-c5289758293a2b44b644242e997095c9f3cfd4a3.tar.xz sssd-c5289758293a2b44b644242e997095c9f3cfd4a3.zip |
Always use uint32_t for UID/GID numbers
Diffstat (limited to 'src/providers/proxy')
-rw-r--r-- | src/providers/proxy/proxy_id.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/providers/proxy/proxy_id.c b/src/providers/proxy/proxy_id.c index ff3ddf803..35fc9c492 100644 --- a/src/providers/proxy/proxy_id.c +++ b/src/providers/proxy/proxy_id.c @@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "util/strtonum.h" #include "providers/proxy/proxy.h" /* =Getpwnam-wrapper======================================================*/ @@ -1077,8 +1078,7 @@ 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"); @@ -1107,8 +1107,7 @@ 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"); |