summaryrefslogtreecommitdiffstats
path: root/src/providers/proxy
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2010-10-25 15:14:24 +0200
committerStephen Gallagher <sgallagh@redhat.com>2010-10-26 08:00:21 -0400
commit580374daba2ab2c6075a7d0de9512abff133e2e9 (patch)
treedfd9abe14efa5f6c79291ef72b1d2ac0b8326334 /src/providers/proxy
parent13147b598a8409c338abb9472e74bbd606f224bd (diff)
downloadsssd-580374daba2ab2c6075a7d0de9512abff133e2e9.tar.gz
sssd-580374daba2ab2c6075a7d0de9512abff133e2e9.tar.xz
sssd-580374daba2ab2c6075a7d0de9512abff133e2e9.zip
Always use uint32_t for UID/GID numbers
Diffstat (limited to 'src/providers/proxy')
-rw-r--r--src/providers/proxy/proxy_id.c7
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");