From 308cc429eb7c07d94609f2818e9d81239cb4cbb9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 20 Nov 2003 03:09:19 +0000 Subject: added samr_LookupNames() and test code (This used to be commit f8397cbc8554b721093b8ae6ac6fb26d0ee9a7cf) --- source4/librpc/ndr/ndr_basic.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source4/librpc/ndr/ndr_basic.c') diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c index fcf64b6790..0cb4456399 100644 --- a/source4/librpc/ndr/ndr_basic.c +++ b/source4/librpc/ndr/ndr_basic.c @@ -308,7 +308,15 @@ NTSTATUS ndr_push_length4_end(struct ndr_push *ndr, struct ndr_push_save *save) */ NTSTATUS ndr_push_ptr(struct ndr_push *ndr, const void *p) { - return ndr_push_uint32(ndr, p?0xaabbccdd:0); + uint32 ptr = 0; + if (p) { + /* we do this to ensure that we generate unique ref ids, + which means we can handle the case where a MS programmer + forgot to mark a pointer as unique */ + ndr->ptr_count++; + ptr = 0xaabbcc00 + ndr->ptr_count; + } + return ndr_push_uint32(ndr, ptr); } /* -- cgit