From 9728b5a0d5a5c09615a09a97bf217bcacb773579 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 2 Mar 2011 19:06:15 +1100 Subject: librpc/ndr use hyper for uid_t/gid_t rather than udlong This has 8 byte alignment, which is what was specified in pidl for these types. Andrew Bartlett Autobuild-User: Andrew Bartlett Autobuild-Date: Wed Mar 9 09:03:09 CET 2011 on sn-devel-104 --- librpc/ndr/ndr_basic.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/librpc/ndr/ndr_basic.c b/librpc/ndr/ndr_basic.c index 8e0789a425..b4443003d0 100644 --- a/librpc/ndr/ndr_basic.c +++ b/librpc/ndr/ndr_basic.c @@ -814,7 +814,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_time_t(struct ndr_pull *ndr, int ndr_flags, */ _PUBLIC_ enum ndr_err_code ndr_push_uid_t(struct ndr_push *ndr, int ndr_flags, uid_t u) { - return ndr_push_udlong(ndr, NDR_SCALARS, (uint64_t)u); + return ndr_push_hyper(ndr, NDR_SCALARS, (uint64_t)u); } /* @@ -823,7 +823,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_uid_t(struct ndr_push *ndr, int ndr_flags, u _PUBLIC_ enum ndr_err_code ndr_pull_uid_t(struct ndr_pull *ndr, int ndr_flags, uid_t *u) { uint64_t uu; - NDR_CHECK(ndr_pull_udlong(ndr, ndr_flags, &uu)); + NDR_CHECK(ndr_pull_hyper(ndr, ndr_flags, &uu)); *u = (uid_t)uu; if (unlikely(uu != *u)) { DEBUG(0,(__location__ ": uid_t pull doesn't fit 0x%016llx\n", @@ -839,7 +839,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_uid_t(struct ndr_pull *ndr, int ndr_flags, u */ _PUBLIC_ enum ndr_err_code ndr_push_gid_t(struct ndr_push *ndr, int ndr_flags, gid_t g) { - return ndr_push_udlong(ndr, NDR_SCALARS, (uint64_t)g); + return ndr_push_hyper(ndr, NDR_SCALARS, (uint64_t)g); } /* @@ -848,7 +848,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_gid_t(struct ndr_push *ndr, int ndr_flags, g _PUBLIC_ enum ndr_err_code ndr_pull_gid_t(struct ndr_pull *ndr, int ndr_flags, gid_t *g) { uint64_t gg; - NDR_CHECK(ndr_pull_udlong(ndr, ndr_flags, &gg)); + NDR_CHECK(ndr_pull_hyper(ndr, ndr_flags, &gg)); *g = (gid_t)gg; if (unlikely(gg != *g)) { DEBUG(0,(__location__ ": gid_t pull doesn't fit 0x%016llx\n", -- cgit