1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00

286 Commits

Author SHA1 Message Date
Andrew Tridgell
86a604429e a fairly major upgrade to the dcerpc system
* added a NDR validator. The way it works is that when the
   DCERPC_DEBUG_VALIDATE_* flags are set the dcerpc system will
   perform NDR buffer validation. On sending a request the packet is
   first marshalled, then unmarahslled, then marshalled again, and it is
   confirmed that the two marshalling results are idential. This
   ensures that our pull and push routines are absolutely in sync, so
   that we can be very confident that if a routine works in the client
   then the corresponding routine must work on the server side. A
   similar validation is performed on all replies.

 * a result of this change is that pidl is fussier about the [ref]
   tag. You can only use it on pointers (which is the only place it
   makes sense)

 * fixed a basic alignment bug in the push side of the NDR code

 * added server side pull/push support. Our dcerpc system is now fully
   ready to be used on the server side.

 * fixed the relative offset pointer list. It must be traversed in
   reverse order on push

 * added automatic value setting for the size parameter in outgoing
   SdBuf structures.

 * expanded the ndr debugging code to always give a message on any
   failure

 * fixed the subcontext push code

 * fixed some memory leaks in smbtorture RPC tests
(This used to be commit 8ecf720206a2eef3f8ea7cbdb1f460664a5dba9a)
2003-11-22 08:11:32 +00:00
Andrew Tridgell
3f2598abad added Parse::RecDescent module into pidl to ensure we all use the same
version. This should fix the problems Richard was seeing.
(This used to be commit 76c24a5cb09b096a9cb490f3bb42af0b9d0f5fa9)
2003-11-22 01:40:24 +00:00
Andrew Tridgell
0a0f8b5e3a fixed a bug with pushing non-pointer unions
(This used to be commit bc2fbc79cc7c0308934f351b067a88b4b397de37)
2003-11-21 22:34:45 +00:00
Andrew Tridgell
a465add90f * changed the way strings are handled in pidl to a much more general
interface. We now support an arbitrary set of flags to each parser,
  and these can be used to control the string types. I have provided
  some common IDL string types in librpc/idl/idl_types.h which needs to
  be included in every IDL file.

* added IDL for the endpoint mapper. Added a test suite that enumerates
  all endpoints on the server.
(This used to be commit d2665f36a75b482ff82733f72ffac938c2acf87a)
2003-11-21 13:14:17 +00:00
Andrew Tridgell
9fc7be869b added support for 'ascstr', a ascii string in MSRPC !
(This used to be commit a5eeb3be0577e0ce91ac1f6e641782e4acbbda07)
2003-11-21 02:19:09 +00:00
Andrew Tridgell
d869d8c8eb ignore generated idl.pm
(This used to be commit e9d18ecc2d513dc7aba9a0545808a95893544fe6)
2003-11-20 22:51:02 +00:00
Andrew Tridgell
15776970a5 we now use a copy of pidl inside the samba4 source tree at
source/build/pidl/

I imported the code using direct respository manipulation to preserve
the commit history
(This used to be commit 2ed87a52ccc343c281e29f5a18f3f99fe06beb28)
2003-11-20 22:46:01 +00:00
Andrew Tridgell
5d77cda1dc make sure we don't try to use c++ style variable declaration
(This used to be commit 9fee73793171e2cd295899ec0db8bcecfa95ca72)
2003-11-20 07:28:59 +00:00
Andrew Tridgell
e2254cc18f fixed pushing structures containing pointers inside unions
(This used to be commit bb30f42cd4e20d53066634727347a601b4eb562e)
2003-11-20 07:07:09 +00:00
Andrew Tridgell
08026ca1e0 a bit neater way of emitting code
(This used to be commit 964c3237215b36f5768b98c19689ddc43cf86cac)
2003-11-20 06:34:18 +00:00
Andrew Tridgell
9fb8ee5765 * cope with pidl not being in $HOME/pidl
* cope with empty structures in unions
(This used to be commit a706ff78937bea64acd28381466770749566399f)
2003-11-20 05:39:54 +00:00
Andrew Tridgell
b2fd4284b6 use a precompiled grammer in pidl. This speeds up pidl by about a
factor of 2 on my system.
(This used to be commit a291dd835f68ae5a109670b1d1ca1a48b2aacfb6)
2003-11-20 04:36:09 +00:00
Andrew Tridgell
cde87e39c6 avoid compiler warnings for unused variables with [relative] pointers
(This used to be commit 786566e53c22d8d0813cf006a70aef8508bba4dd)
2003-11-20 02:06:25 +00:00
Andrew Tridgell
52461a3d14 its LoadStructure() in util.pm that doesn't like strict perl - any
perl gurus out there know why?
(This used to be commit a1d9afc92fce52a76c0a233513b2cb24f0cb9cf5)
2003-11-20 02:03:36 +00:00
Andrew Tridgell
427bb5541b damn, "use strict;" in util.pm breaks pidl - but why?
(This used to be commit 8f54792392ccaa6c1464ed8ec90e44c0048b5ee2)
2003-11-20 01:55:32 +00:00
Andrew Tridgell
91b960e22b use strict perl package everywhere for error checking
(This used to be commit 3b7a4b70a321a1e8e378b8c5cc1e87a1c3399e91)
2003-11-20 01:43:35 +00:00
Andrew Tridgell
cd3c6c3cc7 * added a 'lstring' type for spoolss
* added some notes on type equivalents in NOTES.txt
(This used to be commit a44d952fcb7ebf85d3072b622e5656dcf25cfbb0)
2003-11-20 01:27:17 +00:00
Andrew Tridgell
fd15fc58e7 * added support for empty case elements (including default cases)
* changed to midl syntax using [case(x)] instead of case(x)
(This used to be commit 6ecdb25e137c25e6bf9a7037a4eb602ae1afc514)
2003-11-20 00:57:00 +00:00
Andrew Tridgell
5d4bfbd30d switched to a new way of handling unions, so that we can handle
alignment correctly for unions that have non-uint16 discriminants

added recursive structure alignment. This gets quite hairy, but I
think I've got it mostly right.
(This used to be commit c0d96f87ea633b1372a383f705aaf4ed3099b4a7)
2003-11-19 22:11:17 +00:00
Andrew Tridgell
d60fe82970 slightly more accurate structure alignment code - I need to do proper
recursive alignment soon
(This used to be commit d3838c3668d5acb4aee86e3dd5b8d7d23bc842ff)
2003-11-19 07:29:55 +00:00
Andrew Tridgell
3425f1bfe4 auto-generate the pipe UUID version and name
(This used to be commit cdba426e62a5b30263b75f53f97b191da224a55f)
2003-11-18 04:59:29 +00:00
Andrew Tridgell
cb22240eb4 support the 'default' case in IDL unions
(This used to be commit 7f3f274cdc0f22324049952f2b744902a6fdf652)
2003-11-18 03:25:51 +00:00
Andrew Tridgell
7b185ccb32 auto-generate top-level debug print functions when a flag is set on
the dcerpc pipe. This saves lots of code in each test suite.
(This used to be commit db74a03d15d96d7f8bd751b8f857cc5b2be7d4c2)
2003-11-18 01:17:10 +00:00
Andrew Tridgell
fb53302c8e auto-generate functions for printing top-level function
parameters. You can choose to print just the [in] parameters, just the
[out] parameters or both
(This used to be commit 6afc3a465e3fc568636ff52975a6d339f8bc3179)
2003-11-17 11:53:12 +00:00
Andrew Tridgell
c562794e74 started documenting the extension to IDL that pidl implements
(This used to be commit 22b5418a53149b42e71fd887866f75cdd53b81af)
2003-11-17 09:32:57 +00:00
Andrew Tridgell
fa83432e10 * support inline arrays
* add enough to allow security descriptors to be IDL described

* added "noprint" property to allow fancy printing for specific
  functions
(This used to be commit 08df20c8bed57bbb9a9a907c807ad850382fd4e8)
2003-11-17 06:25:51 +00:00
Andrew Tridgell
ff9558bdf9 handle non-NTSTATUS return types
(This used to be commit 5832a1447c1d757a89d1f09324144132f9427cb1)
2003-11-17 02:57:04 +00:00
Andrew Tridgell
cc5f231e95 better [relative] handling, allowing for nested relative structures
and arrays of relative structures
(This used to be commit eb887f883a3ef2a90edec5bb495e140656c2f70d)
2003-11-17 02:17:01 +00:00
Andrew Tridgell
c4b7585288 * the beginnings of non-constant fixed arrays
* added relative pointers support
(This used to be commit 4a34a4f29cf8ab79582ce7b503da907df7b4d209)
2003-11-16 13:48:05 +00:00
Andrew Tridgell
0c5759a4b2 added support for "relstr", structure and union properties and public
functions
(This used to be commit fb2f8c6bffdaacdddbb7fb82439af70e17ce9a4b)
2003-11-16 11:34:32 +00:00
Andrew Tridgell
3d7524c7ae added the "subcontext" attribute for auto-handling of user-marshalled
sub-context buffers
(This used to be commit 01cc199d78da9e60aa8a279b37fbf8298cf61004)
2003-11-16 05:59:05 +00:00
Andrew Tridgell
b5fccdd9ee fixed the handling of much more general C expressions in value()
statements
(This used to be commit 8b38041f6530e42c5d294a5947c15a7f6a2d3c61)
2003-11-16 05:05:38 +00:00
Andrew Tridgell
54ccb9c6a2 added support for varying conformant arrays (needed for samr
userinfo3)
(This used to be commit f5b577a2b9d8084c8ee3f5b646b059c3297695b4)
2003-11-15 10:57:17 +00:00
Andrew Tridgell
1e9ea7fe86 fixed alignment of the buffers part structures
(This used to be commit f38ecd7ff7c2b2b36995e53af544cb99f0c084e0)
2003-11-15 09:13:55 +00:00
Andrew Tridgell
5a28ca7bf3 support a new value() attribute that allows us to auto-fill certain
elements. Used at the moment for string lengths.

the regular expression isn't right, but it works for the case I need.
Perl expert needed :)
(This used to be commit c7ddd6b2aadeb3bbd2ad520a9e074866b434cbba)
2003-11-15 07:49:03 +00:00
Tim Potter
7290260c1a Fix bug in generation of function ndr_pull code generation. This patch
makes the code symmetric with the ndr_push code.
(This used to be commit 4a6f192ff8396c644520050041a740856d72d40b)
2003-11-15 05:15:40 +00:00
Andrew Tridgell
5a1779b982 it turns out that all MS servers ignore the artifact struct_len fields
in OpenPolicy and OpenPolicy2, so we don't in fact need the
[struct_len] attribute. This makes our IDL much closer to the MS IDL.
(This used to be commit f0a8f063a680b5d0a68c5ac7cccf9c9a13adfb81)
2003-11-14 21:39:13 +00:00
Andrew Tridgell
4922823167 * make pidl.pl exit with an error on a parse error
* fixed a buffers/scalars bug in structures
(This used to be commit e66daf527357c65228db55a3d3319a0c20d8f51c)
2003-11-14 13:15:20 +00:00
Andrew Tridgell
565fd2da76 fixed another problem with pointers to arrays in structures
(This used to be commit cf880a83121421403db43ef87e95a5326e9c9cb8)
2003-11-14 07:55:43 +00:00
Andrew Tridgell
5b7f049829 fixed the handling of unions of pointers
(This used to be commit 7b0f2ccf07fc4f097c2abb4e8e63a5d457383a11)
2003-11-14 07:19:32 +00:00
Andrew Tridgell
b6b4cc752b * differentiate between pointers and non-pointers in switch_is union
elements in structures

* layout the pull/push/print generated functions with all push
  together, all pull together etc, as this makes for easier debugging

(note that I have no redirected commit messages for pidl to the
samba-cvs mailing list, so you may be seeing these messages for the
first time. See the pidl cvs repository for details on pidl)
(This used to be commit b5888b53157c539242ce84c07415e0b0d84dc264)
2003-11-14 02:20:41 +00:00
Andrew Tridgell
ff02537261 I think we now handle conformant arrays in structures correctly - the
test cases pass
(This used to be commit 22e15023509f8f1682865d72765e79f41ab7d149)
2003-11-13 09:23:58 +00:00
Andrew Tridgell
6735b72a8d handle constant sized arrays
(This used to be commit 673e7bcdc2d7ee949ca0f56f9ba3cd04b5c38397)
2003-11-12 05:32:37 +00:00
Andrew Tridgell
5475c9f978 added support for 8 byte aligned HYPER_T
(This used to be commit 259d5d7a0e2fa51d5d2ee36431c9e89784ee4a0c)
2003-11-11 07:55:41 +00:00
Andrew Tridgell
023a8fcb80 fixed the NDR structure alignment rules
still not perfect, but works for all the cases I have seen so far
(This used to be commit ce15cc87fbbe8ee0d383ad115168e9be29fe9efc)
2003-11-11 06:53:12 +00:00
Andrew Tridgell
d720f3d2e4 fixed handling on pointers to arrays of structures in unions
(This used to be commit a29145df04d08c13ee1b019b2de57ffd6883907a)
2003-11-11 06:20:18 +00:00
Andrew Tridgell
161321f68d automatic printing of unions
(This used to be commit 73b530075589f24f7bb9a001fde979ec6930d2bb)
2003-11-11 04:38:10 +00:00
Andrew Tridgell
cecbf0cd8b automatically generate ndr_print_*() functions for every IDL
structure. This allows easy debug and test tool writing without having
to write functions that print every element of complex structures.
(This used to be commit 81d6181172e36c6fbae0907550a29511ce708574)
2003-11-11 04:04:36 +00:00
Andrew Tridgell
be443f914a - added support for the pull side of unions
- don't generate parse functions for pull/push functions that are not
  used
(This used to be commit 54613574bcd8b365c13848c6aa9366cadeb5da0e)
2003-11-11 01:59:28 +00:00
Andrew Tridgell
db7012397f much cleaner handling of the different types of variables
(This used to be commit 4df59bcff56a00e413fbde1a40ffebcb16763d3c)
2003-11-10 11:33:21 +00:00