summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/ndr.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r24532: rename struct dcerpc_syntax_id into struct ndr_syntax_idStefan Metzmacher1-2/+2
and move it into misc.idl The goal is to get rid a all dcerpc specific stuff in the generated ndr layer. metze (This used to be commit 2ed014cfb894cccab1654e3f7d5876393e2b52d7)
2007-10-10r23792: convert Samba4 to GPLv3Andrew Tridgell1-3/+2
There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa)
2007-10-10r21814: use ndr_push_error in the ndr layer, not just a NTSTATUS failureAndrew Tridgell1-1/+2
(This used to be commit 37aa32e2fe4829ec467c606cfcc7485508a2682c)
2007-10-10r21812: fixed an integer overflow error in the ndr push code.Andrew Tridgell1-2/+9
This needs to be fixed in Samba3 as well. It might be exploitable (I haven't confirmed one way or the other), so I think this should be fixed for 3.0.25 (This used to be commit 4766175ff2d0de8af92046e29280c7893ac8fe1f)
2007-10-10r21389: give a better error when our parser hasn't consumed all dataStefan Metzmacher1-2/+2
metze (This used to be commit 03b06398a405e491ce4e2bc91513a57e0d59466f)
2007-10-10r20963: remove unused functions, run LOCAL-TDR by defaultJelmer Vernooij1-14/+0
(This used to be commit 0f34c67fff53d5bd3c1b5a5618190ad7154e8d07)
2007-10-10r19341: ndr_push_union_blob() needs the same fix as ndr_push_struct_blob()Stefan Metzmacher1-0/+2
metze (This used to be commit 5c766ad48d0790b7ae865408fd0dbdb1769da2d8)
2007-10-10r19326: don't leak a ndr_push structure on ndr_push_struct_blob()Andrew Tridgell1-0/+2
(This used to be commit 9817cc235c5fd787855c60fa58f68b14f78cdb94)
2007-10-10r17930: Merge noinclude branch:Jelmer Vernooij1-1/+1
* Move dlinklist.h, smb.h to subsystem-specific directories * Clean up ads.h and move what is left of it to dsdb/ (only place where it's used) (This used to be commit f7afa1cb77f3cfa7020b57de12e6003db7cfcc42)
2007-10-10r15629: fix some warningsStefan Metzmacher1-1/+1
metze (This used to be commit 803a602990b78eaec7b674ef3214b8ccea6a98f3)
2007-10-10r15624: add some useful helper functionsStefan Metzmacher1-0/+48
metze (This used to be commit 8fa6059100d1f6e235bacc722a83a961e460ebb2)
2007-10-10r15427: Rename private to private_data to prevent errors from C++ errors (whichJelmer Vernooij1-6/+6
we care about in Samba3) (This used to be commit eb07aea711a5e3606e169d77b208b03bd876c639)
2007-10-10r14642: fix shadow warningsStefan Metzmacher1-9/+12
metze (This used to be commit 09850fd13334667a2a7a7b6ee24fa3379c67825a)
2007-10-10r14542: Remove librpc, libndr and libnbt from includes.hJelmer Vernooij1-0/+2
(This used to be commit 51b4270513752d2eafbe77f9de598de16ef84a1f)
2007-10-10r13840: Mark some functions as public.Jelmer Vernooij1-57/+57
(This used to be commit 9a188eb1f48a50d92a67a4fc2b3899b90074059a)
2007-10-10r12856: make the logic much more saneStefan Metzmacher1-3/+7
metze (This used to be commit ed4a3e53fd71679fbdfc2f2932c1098e03026285)
2007-10-10r12803: if we free the ndr structure how should we access the private ↵Stefan Metzmacher1-1/+3
pointer anymore? thanks valgrind! metze (This used to be commit ab58decf8248f3923703fabdaab697f1a8d116c8)
2007-10-10r12634: make the [validate] binding string switch also check to see if theAndrew Tridgell1-0/+36
string form of the structure we receive matches the generated form. This has the effect of checking things like value() attributes. (This used to be commit f2e68ec649658976e5bf4887713a92c14850c277)
2007-10-10r12513: Similar change as my previous commit, but now for transfer syntaxes.Jelmer Vernooij1-0/+11
Avoids converting a static string to GUID every time we check whether a transfer syntax is equal to that of NDR. (This used to be commit 8dcfcaf75ab8cf4a54cf5e56f6be25acc68e3989)
2007-10-10r10141: if some of the LIBNDR_ALIGN_* flags and LIBNDR_FLAG_REMAINING are set,Stefan Metzmacher1-0/+6
ndr_pull_data_blob() doesn't work correct. so make them exclute each other. jelmer, tridge: does that look correct? it fixes a problem, abartlet had with krb5pac.idl, where the align flags are inherited from the parent, and we want to get the [flag(NDR_REMAINING)] DATA_BLOB signature; metze (This used to be commit b9ea3e8f9f85098b63081bf12e2be65687921874)
2007-10-10r9373: - create a hierachical memory tree with recursiv ndr_pull_* functionsStefan Metzmacher1-0/+2
- with this it's also possible to talloc_free() the ndr_pull structure and talloc_steal(ndr->current_mem_ctx); to fetch the whole data of the hierachical tree - if the toplevel struct is a valid talloc pointer it's also possible to use NDR_PULL_SET_MEM_CTX(ndr, mem_ctx); to the the toplevel pointer with the struct pointer (NOTE: no callers are using this yet, but they shortly will) metze (This used to be commit 1a2b8369586642cc9bc15d015c1e4256c3a92732)
2007-10-10r9372: - make the subcontext handling autogenerated code look nicer,Stefan Metzmacher1-34/+64
- unify the handling of subcontext, compression and obfucation metze (This used to be commit 09de7e0af7f9f7539cf63791baf90ac202536176)
2007-10-10r9356: a better way of coping with NULL arrays in the array bounds checking. ↵Andrew Tridgell1-8/+0
This copes with the case of size_is(*size) where size is NULL, and the array is NULL (This used to be commit 56769b4b1d900cce60cd35298b642a85e4eddfee)
2007-10-10r9347: this array bounds checking is harder than it looks ...Andrew Tridgell1-0/+8
this copes with 2 more situations: 1) where the array is NULL, which would previously be coped with by a if (ptr) check, but now in the deferred array bounds checking needs to look at the array variable in the ndr code. Not nice. 2) nest the array checking along with the SCALARS vs BUFFERS checks, ensuring we don't do array bounds checking for a buffer when in scalars only mode (This used to be commit ad1b9867a5a14bc9ed2e1a5eb8f05bb2046bc645)
2007-10-10r8519: better method of ensuring null terminationAndrew Tridgell1-1/+3
(This used to be commit f93bd0ced6b0b2b4ee3bf15e53ba30138fd6b533)
2007-10-10r8518: ensure all constructed NDR packets are null terminated. This is neededAndrew Tridgell1-8/+9
by the new ldb code dealing with binary records, but is also a good defensive strategy in general (This used to be commit 17decd129928290a6916a1d1cec73dad924d64f8)
2007-10-10r8210: - make the ndr_token_* function publicStefan Metzmacher1-18/+29
- allow comparison function to be passed for ndr_token_retrive_cmp_fn(), this is for matching the keys, if NULL is passed, the old behavior tok->key == key is used metze (This used to be commit 019f3dc767ef703768df3acdbbd80808c122855c)
2007-10-10r8108: Fix indentation, and remove a discard_const_p() that we don't need ↵Andrew Bartlett1-4/+4
any more. Perhaps like minimal_includes.pl, we should have a way to find these automaticly. Hmm... Andrew Bartlett (This used to be commit d13b9f548e9d3696505178476d2615835cae8fe2)
2007-10-10r7865: changed pidl to take a "const void *" instead of a "void *" for theAndrew Tridgell1-1/+1
structure in ndr_push_*() and ndr_print_*(). The push and print functions really should not modify the structure. metze, to make this work I had to change your spoolss hand marshaller. Can you please check it is OK? I think that the IN and OUT sides of that function are not ever called on the same structure, so I think that attempt at remembering the value by assigning to r->in._offered was not doing anything anyway, but please correct me if I have misunderstood it. If you really do need to remember something on those structures I'd suggest the ndr_token_store() and ndr_token_retrieve() functions, which are used by pidl for just this sort of thing. (This used to be commit eee528be97fa43ca53bdc5652b4d29a0a2caf563)
2007-10-10r7193: add some bail out checks and fix pushing of relative pointersStefan Metzmacher1-2/+19
metze (This used to be commit 58a214d98fc7a2b46a0876e57e05dec82438bc53)
2007-10-10r7186: add [relative_base] property, which is allowed on typedef'sStefan Metzmacher1-53/+123
(maybe we could add them to elements latter...) with this property all relative pointers from inside the struct or union are relative to the struct/union start metze (This used to be commit c0dd18326c058e3e218d43f48ecff418f4b0b51e)
2007-10-10r7184: remove unused ndr_pull/push_struct_start/end() functionsStefan Metzmacher1-30/+0
metze (This used to be commit 95d3286a327467c32ee25fcac913fc5f3113a74b)
2007-10-10r7182: remove current support for RELATIVE_CURRENT, this will be replaced ↵Stefan Metzmacher1-11/+2
with a better aproach later metze (This used to be commit 9a4e9f68fbddaae3fc86e30d39b69fc76261c0ea)
2007-10-10r6973: Merge new version of pidl into the main SAMBA_4_0 branch.Jelmer Vernooij1-117/+3
The main difference in this new version is the extra data structure generated between the IDL data structure and the NDR parser: IDL -> NDR -> { ndr_parser, ndr_header, eparser, etc } This makes the ndr_parser.pm internals much more sane. Other changes include: - Remove unnecessary calls with NDR_BUFFERS (for example, GUID doesn't have any buffers, just scalars) as well as some (unnecessary) nested setting of flags. - Parse array loops in the C code rather then calling ndr_pull_array(). This allows us to have, for example, arrays of pointers or arrays of pointers to arrays, etc.. - Use if() {} rather then if () goto foo; everywhere - NDR_IN no longer implies LIBNDR_FLAG_REF_ALLOC - By default, top level pointers are now "ref" (as is the default in most other IDL compilers). This can be overridden using the default_pointer_top() property. - initial work on new ethereal parser generators by Alan DeKok and me - pidl now writes errors in the standard format used by compilers, which is parsable by most editors - ability to warn about the fact that pidl extension(s) have been used, useful for making sure IDL files work with other IDL compilers. oh, and there's probably some other things I can't think of right now.. (This used to be commit 13cf227615f6b9e0e5fa62e59197024410254f01)
2007-10-10r6932: Comment out static function - not used anywhere?Tim Potter1-0/+6
(This used to be commit 742989c952421ebdf2d21c98e1de1b2b74b9f435)
2007-10-10r6795: Make some functions static and remove some unused ones.Jelmer Vernooij1-2/+2
(This used to be commit 46509eb89980bfe6dabd71264d570ea356ee5a22)
2007-10-10r6746: added ndr_push_union_blob() for pushing IDL unions into a DATA_BLOBAndrew Tridgell1-0/+23
(This used to be commit dc25be9d69a65680f7942ed29c2d791d6ce7248a)
2007-10-10r6720: added support for the remaining 2 types of CLDAP netlogonAndrew Tridgell1-0/+39
response. To work around the fact that the type of the returned data is not encoded in the packet, this required adding ndr_pull_union_blob() which allows us to pull a blob into a union with a specified switch value, in this case the switch value comes from the calling NtVer field. (This used to be commit bd27e626c27be72913d1a1569ee6e2e2711df84e)
2007-10-10r6690: added ndr_pull_struct_blob_all(), which is like ↵Andrew Tridgell1-0/+21
ndr_pull_struct_blob() but checks that all bytes are consumed (This used to be commit 7951e9bd647b35d2f92d7ba4dbbc2ac05f31491a)
2007-10-10r6189: move function to the right placeStefan Metzmacher1-8/+5
metze (This used to be commit 08d22a07cfa84fe959320058e8574c8983e1d71f)
2007-10-10r6188: correct fix for rev 6182Stefan Metzmacher1-6/+2
we should start with an empty switch_list in ndr_print as we do for ndr_pull/ndr_push metze (This used to be commit 848f553117b369fc6697086b3f7d36dd17b60f5b)
2007-10-10r6182: Jelmer, I think we need to initialize the switch_list, else we areRichard Sharpe1-0/+4
crash city. (This used to be commit 6526f21fb72094e8ff62bfc2693a49a3b1679a95)
2007-10-10r6180: Use token_lists for storing switch valuesJelmer Vernooij1-17/+13
(This used to be commit f66e11137eed69b44f0739f1064625cbd96243bd)
2007-10-10r5797: - add idl property [subcontext_size()]Stefan Metzmacher1-16/+39
this can be used like this [subcontext_size(28),subcontext(0)] dom_sid sid; this descripes a fixed 28 byte buffer which contains a dom_sid, and the rest of the buffer is padded with zero bytes if the dom_sid doesn't need all 28 byte in it's ndr encoding. - only push and pull the subcontext when we are in the NDR_SCALARS section (tridge, jelmer: I hope this is correct for all cases...!?:-) metze (This used to be commit 483bb1418fd5c70c418142ade80c1e286adfa05a)
2007-10-10r5775: Remove some unused functions (unions are no longer as special as they ↵Jelmer Vernooij1-21/+7
used to be) Add oxid mapping table support in DCOM (This used to be commit e193555f0eec2dda8c8760e9668181200fef0a1e)
2007-10-10r5736: fix to avoid endless recursion in ndr_size_*() calculationStefan Metzmacher1-2/+8
metze (This used to be commit eaac0f214703f91f186eb54f97e15e56461762bd)
2007-10-10r5672: Use switch_type() and the token storage mechanism for unions:Jelmer Vernooij1-0/+26
- Makes union handling less special - Allows unions in arrays, etc - Compatible with midl - Pidl will warn about switch_type() and the type of the switch_is() variable being different (This used to be commit dc6b4ffc82a191631bc16a4b93a4916a39183ec6)
2007-10-10r5663: Revert some changes I didn't mean to commit...Jelmer Vernooij1-26/+0
(This used to be commit 54e0be6f1eccbd870eb0e60ae8cdb90d2dc7f657)
2007-10-10r5661: Be a little stricter on syntax regarding arrays. A pointer to anJelmer Vernooij1-0/+26
array can now only be : type *name[]; rather then : type *name; which was supported in the past. Warnings will be given when the first syntax is used. Reasons for this change in behaviour include improved readability and the fact that the second format makes dealing with multiple levels of pointers harder. (This used to be commit a416de5825c540fd3741731c4be05e9a659a6fdb)
2007-10-10r5506: Simplify the use of subcontexts and make them a bit less a special case.Jelmer Vernooij1-76/+2
(This used to be commit 48d54a9b57c0b233c7c60392b23876b426bbdec1)