diff options
Diffstat (limited to 'source4/librpc')
-rw-r--r-- | source4/librpc/idl/netlogon.idl | 16 | ||||
-rw-r--r-- | source4/librpc/idl/samr.idl | 6 | ||||
-rw-r--r-- | source4/librpc/idl/xattr.idl | 12 | ||||
-rw-r--r-- | source4/librpc/ndr/libndr.h | 21 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_basic.c | 52 |
5 files changed, 43 insertions, 64 deletions
diff --git a/source4/librpc/idl/netlogon.idl b/source4/librpc/idl/netlogon.idl index 3d3005685b..cb537d75a3 100644 --- a/source4/librpc/idl/netlogon.idl +++ b/source4/librpc/idl/netlogon.idl @@ -76,8 +76,8 @@ interface netlogon /* in netr_AcctLockStr size seems to be be 24, and rrenard thinks that the structure of the bindata looks like this: - uint64 lockout_duration; - uint64 reset_count; + dlong lockout_duration; + udlong reset_count; uint32 bad_attempt_lockout; uint32 dummy; @@ -407,9 +407,9 @@ interface netlogon uint16 min_password_length; uint16 password_history_length; /* yes, these are signed. They are in negative 100ns */ - int64 max_password_age; - int64 min_password_age; - uint64 sequence_num; + dlong max_password_age; + dlong min_password_age; + udlong sequence_num; NTTIME domain_create_time; uint32 SecurityInformation; sec_desc_buf sdbuf; @@ -504,7 +504,7 @@ interface netlogon netr_String primary_domain_name; dom_sid2 *sid; netr_QUOTA_LIMITS quota_limits; - uint64 sequence_num; + udlong sequence_num; NTTIME db_create_time; uint32 SecurityInformation; sec_desc_buf sdbuf; @@ -635,7 +635,7 @@ interface netlogon [case(NETR_DELTA_DELETE_SECRET)] netr_DELTA_DELETE_SECRET delete_secret; [case(NETR_DELTA_DELETE_GROUP2)] netr_DELTA_DELETE_USER *delete_group; [case(NETR_DELTA_DELETE_USER2)] netr_DELTA_DELETE_USER *delete_user; - [case(NETR_DELTA_MODIFY_COUNT)] uint64 *modified_count; + [case(NETR_DELTA_MODIFY_COUNT)] udlong *modified_count; } netr_DELTA_UNION; typedef union { @@ -681,7 +681,7 @@ interface netlogon [in] netr_Authenticator credential, [in,out] netr_Authenticator return_authenticator, [in] netr_SamDatabaseID database_id, - [in,out] uint64 sequence_num, + [in,out] udlong sequence_num, [in] uint32 preferredmaximumlength, [out] netr_DELTA_ENUM_ARRAY *delta_enum_array ); diff --git a/source4/librpc/idl/samr.idl b/source4/librpc/idl/samr.idl index fd6229bf63..db7f4aa6cc 100644 --- a/source4/librpc/idl/samr.idl +++ b/source4/librpc/idl/samr.idl @@ -135,8 +135,8 @@ uint16 password_history_length; uint32 password_properties; /* yes, these are signed. They are in negative 100ns */ - int64 max_password_age; - int64 min_password_age; + dlong max_password_age; + dlong min_password_age; } samr_DomInfo1; typedef struct { @@ -144,7 +144,7 @@ samr_String comment; samr_String domain; /* domain name */ samr_String primary; /* PDC name if this is a BDC */ - uint64 sequence_num; + udlong sequence_num; uint32 unknown2; samr_Role role; uint32 unknown3; diff --git a/source4/librpc/idl/xattr.idl b/source4/librpc/idl/xattr.idl index 501ac2ab7d..afcefe49bc 100644 --- a/source4/librpc/idl/xattr.idl +++ b/source4/librpc/idl/xattr.idl @@ -23,8 +23,8 @@ interface xattr typedef struct { uint32 attrib; uint32 ea_size; - uint64 size; - uint64 alloc_size; + udlong size; + udlong alloc_size; NTTIME create_time; NTTIME change_time; } xattr_DosInfo1; @@ -35,8 +35,8 @@ interface xattr uint32 flags; uint32 attrib; uint32 ea_size; - uint64 size; - uint64 alloc_size; + udlong size; + udlong alloc_size; NTTIME create_time; NTTIME change_time; NTTIME write_time; /* only used when sticky write time is set */ @@ -82,8 +82,8 @@ interface xattr typedef struct { uint32 flags; - uint64 size; - uint64 alloc_size; + udlong size; + udlong alloc_size; utf8string name; } xattr_DosStream; diff --git a/source4/librpc/ndr/libndr.h b/source4/librpc/ndr/libndr.h index b5a5573448..7070ae80ec 100644 --- a/source4/librpc/ndr/libndr.h +++ b/source4/librpc/ndr/libndr.h @@ -199,27 +199,6 @@ enum ndr_err_code { } \ } while(0) -#define NDR_SIZE_ALIGN(t, n, flags) ((flags & LIBNDR_FLAG_NOALIGN)?(t):(((t) + (n-1)) & ~(n-1))) -#define ndr_size_uint8(t, p, flags) (NDR_SIZE_ALIGN(t, 1, flags) + 1) -#define ndr_size_uint16(t, p, flags) (NDR_SIZE_ALIGN(t, 2, flags) + 2) -#define ndr_size_int32(t, p, flags) (NDR_SIZE_ALIGN(t, 4, flags) + 4) -#define ndr_size_uint32(t, p, flags) (NDR_SIZE_ALIGN(t, 4, flags) + 4) -#define ndr_size_ptr(t, p, flags) (NDR_SIZE_ALIGN(t, 4, flags) + 4) -/* - * [u]int64 uses 4 Byte alignment - * and HYPER_T uses 8 Byte alignment - */ -#define ndr_size_int64(t, p, flags) (NDR_SIZE_ALIGN(t, 4, flags) + 8) -#define ndr_size_uint64(t, p, flags) (NDR_SIZE_ALIGN(t, 4, flags) + 8) -#define ndr_size_HYPER_T(t, p, flags) (NDR_SIZE_ALIGN(t, 8, flags) + 8) - - -#define ndr_size_NTTIME(t, p, flags) ndr_size_uint64(t, p, flags) -#define ndr_size_NTTIME_1sec(t, p, flags) ndr_size_HYPER_T(t, p, flags) - -#define ndr_size_WERROR(t, p, flags) ndr_size_uint32(t, p, flags) -#define ndr_size_NTSTATUS(t, p, flags) ndr_size_uint32(t, p, flags) - /* these are used to make the error checking on each element in libndr less tedious, hopefully making the code more readable */ #define NDR_CHECK(call) do { NTSTATUS _status; \ diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c index 6476f58764..7ca930d78d 100644 --- a/source4/librpc/ndr/ndr_basic.c +++ b/source4/librpc/ndr/ndr_basic.c @@ -118,9 +118,9 @@ NTSTATUS ndr_pull_ptr(struct ndr_pull *ndr, uint32_t *v) } /* - parse a uint64 + parse a udlong */ -NTSTATUS ndr_pull_uint64(struct ndr_pull *ndr, uint64_t *v) +NTSTATUS ndr_pull_udlong(struct ndr_pull *ndr, uint64_t *v) { NDR_PULL_ALIGN(ndr, 4); NDR_PULL_NEED_BYTES(ndr, 8); @@ -131,20 +131,20 @@ NTSTATUS ndr_pull_uint64(struct ndr_pull *ndr, uint64_t *v) } /* - parse a int64 + parse a dlong */ -NTSTATUS ndr_pull_int64(struct ndr_pull *ndr, int64_t *v) +NTSTATUS ndr_pull_dlong(struct ndr_pull *ndr, int64_t *v) { - return ndr_pull_uint64(ndr, (uint64_t *)v); + return ndr_pull_udlong(ndr, (uint64_t *)v); } /* - parse a HYPER_T + parse a hyper */ -NTSTATUS ndr_pull_HYPER_T(struct ndr_pull *ndr, HYPER_T *v) +NTSTATUS ndr_pull_HYPER_T(struct ndr_pull *ndr, uint64_t *v) { NDR_PULL_ALIGN(ndr, 8); - return ndr_pull_uint64(ndr, v); + return ndr_pull_udlong(ndr, v); } /* @@ -251,7 +251,7 @@ NTSTATUS ndr_pull_array_uint32(struct ndr_pull *ndr, int ndr_flags, uint32_t *da /* pull a const array of HYPER_T */ -NTSTATUS ndr_pull_array_HYPER_T(struct ndr_pull *ndr, int ndr_flags, HYPER_T *data, uint32_t n) +NTSTATUS ndr_pull_array_HYPER_T(struct ndr_pull *ndr, int ndr_flags, uint64_t *data, uint32_t n) { uint32_t i; if (!(ndr_flags & NDR_SCALARS)) { @@ -330,7 +330,7 @@ NTSTATUS ndr_push_int32(struct ndr_push *ndr, int32_t v) /* push a uint64 */ -NTSTATUS ndr_push_uint64(struct ndr_push *ndr, uint64_t v) +NTSTATUS ndr_push_udlong(struct ndr_push *ndr, uint64_t v) { NDR_PUSH_ALIGN(ndr, 4); NDR_PUSH_NEED_BYTES(ndr, 8); @@ -343,18 +343,18 @@ NTSTATUS ndr_push_uint64(struct ndr_push *ndr, uint64_t v) /* push a int64 */ -NTSTATUS ndr_push_int64(struct ndr_push *ndr, int64_t v) +NTSTATUS ndr_push_dlong(struct ndr_push *ndr, int64_t v) { - return ndr_push_uint64(ndr, (uint64_t)v); + return ndr_push_udlong(ndr, (uint64_t)v); } /* push a HYPER_T */ -NTSTATUS ndr_push_HYPER_T(struct ndr_push *ndr, HYPER_T v) +NTSTATUS ndr_push_HYPER_T(struct ndr_push *ndr, uint64_t v) { NDR_PUSH_ALIGN(ndr, 8); - return ndr_push_uint64(ndr, v); + return ndr_push_udlong(ndr, v); } NTSTATUS ndr_push_align(struct ndr_push *ndr, size_t size) @@ -435,7 +435,7 @@ NTSTATUS ndr_push_array_uint32(struct ndr_push *ndr, int ndr_flags, const uint32 /* push an array of HYPER_T */ -NTSTATUS ndr_push_array_HYPER_T(struct ndr_push *ndr, int ndr_flags, const HYPER_T *data, uint32_t n) +NTSTATUS ndr_push_array_HYPER_T(struct ndr_push *ndr, int ndr_flags, const uint64_t *data, uint32_t n) { int i; if (!(ndr_flags & NDR_SCALARS)) { @@ -946,7 +946,7 @@ size_t ndr_string_array_size(struct ndr_push *ndr, const char *s) */ NTSTATUS ndr_push_NTTIME(struct ndr_push *ndr, NTTIME t) { - NDR_CHECK(ndr_push_uint64(ndr, t)); + NDR_CHECK(ndr_push_udlong(ndr, t)); return NT_STATUS_OK; } @@ -955,7 +955,7 @@ NTSTATUS ndr_push_NTTIME(struct ndr_push *ndr, NTTIME t) */ NTSTATUS ndr_pull_NTTIME(struct ndr_pull *ndr, NTTIME *t) { - NDR_CHECK(ndr_pull_uint64(ndr, t)); + NDR_CHECK(ndr_pull_udlong(ndr, t)); return NT_STATUS_OK; } @@ -982,7 +982,7 @@ NTSTATUS ndr_pull_NTTIME_1sec(struct ndr_pull *ndr, NTTIME *t) /* pull a NTTIME_hyper */ -NTSTATUS ndr_pull_NTTIME_hyper(struct ndr_pull *ndr, NTTIME_hyper *t) +NTSTATUS ndr_pull_NTTIME_hyper(struct ndr_pull *ndr, NTTIME *t) { NDR_CHECK(ndr_pull_HYPER_T(ndr, t)); return NT_STATUS_OK; @@ -991,7 +991,7 @@ NTSTATUS ndr_pull_NTTIME_hyper(struct ndr_pull *ndr, NTTIME_hyper *t) /* push a NTTIME_hyper */ -NTSTATUS ndr_push_NTTIME_hyper(struct ndr_push *ndr, NTTIME_hyper t) +NTSTATUS ndr_push_NTTIME_hyper(struct ndr_push *ndr, NTTIME t) { NDR_CHECK(ndr_push_HYPER_T(ndr, t)); return NT_STATUS_OK; @@ -1068,7 +1068,7 @@ void ndr_print_int32(struct ndr_print *ndr, const char *name, int32_t v) ndr->print(ndr, "%-25s: %d", name, v); } -void ndr_print_uint64(struct ndr_print *ndr, const char *name, uint64_t v) +void ndr_print_udlong(struct ndr_print *ndr, const char *name, uint64_t v) { ndr->print(ndr, "%-25s: 0x%08x%08x (%llu)", name, (uint32_t)(v >> 32), @@ -1076,7 +1076,7 @@ void ndr_print_uint64(struct ndr_print *ndr, const char *name, uint64_t v) v); } -void ndr_print_int64(struct ndr_print *ndr, const char *name, int64_t v) +void ndr_print_dlong(struct ndr_print *ndr, const char *name, int64_t v) { ndr->print(ndr, "%-25s: 0x%08x%08x (%lld)", name, (uint32_t)(v >> 32), @@ -1084,9 +1084,9 @@ void ndr_print_int64(struct ndr_print *ndr, const char *name, int64_t v) v); } -void ndr_print_HYPER_T(struct ndr_print *ndr, const char *name, HYPER_T v) +void ndr_print_HYPER_T(struct ndr_print *ndr, const char *name, uint64_t v) { - ndr->print(ndr, "%-25s: 0x%08x%08x", name, (uint32_t)(v >> 32), (uint32_t)(v & 0xFFFFFFFF)); + ndr_print_dlong(ndr, name, v); } void ndr_print_ptr(struct ndr_print *ndr, const char *name, const void *p) @@ -1112,7 +1112,7 @@ void ndr_print_NTTIME(struct ndr_print *ndr, const char *name, NTTIME t) ndr->print(ndr, "%-25s: %s", name, nt_time_string(ndr, t)); } -void ndr_print_NTTIME_1sec(struct ndr_print *ndr, const char *name, NTTIME_1sec t) +void ndr_print_NTTIME_1sec(struct ndr_print *ndr, const char *name, NTTIME t) { /* this is a standard NTTIME here * as it's already converted in the pull/push code @@ -1120,7 +1120,7 @@ void ndr_print_NTTIME_1sec(struct ndr_print *ndr, const char *name, NTTIME_1sec ndr_print_NTTIME(ndr, name, t); } -void ndr_print_NTTIME_hyper(struct ndr_print *ndr, const char *name, NTTIME_hyper t) +void ndr_print_NTTIME_hyper(struct ndr_print *ndr, const char *name, NTTIME t) { ndr_print_NTTIME(ndr, name, t); } @@ -1163,7 +1163,7 @@ void ndr_print_array_WERROR(struct ndr_print *ndr, const char *name, } void ndr_print_array_HYPER_T(struct ndr_print *ndr, const char *name, - const HYPER_T *data, uint32_t count) + const uint64_t *data, uint32_t count) { int i; |