1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-29 21:47:30 +03:00

51 Commits

Author SHA1 Message Date
Stefan Metzmacher
56c66f4a09 r3984: success full parse the repsFrom/repsTo LDAP fields
metze
2007-10-10 13:06:11 -05:00
Stefan Metzmacher
44f168c44d r3956: start to decode the repsFrom and repsTo fileds but not ready
metze
2007-10-10 13:06:07 -05:00
Jelmer Vernooij
8693344772 r3611: DCOM client support works!!
The torture test DCOM-SIMPLE now successfully does an
IStream_Read and a IStream_Write call.

This test can now be run successfully against the "Simple DCOM" Visual
Studio example.

(You have to quote out line 337 in pidl. pidl complains if the variable
 that contains the array size follows the array. I still need to fix this
 properly)

Next goals:
 - Clean up code
 - Server side support
 - Support custom marshalling
 - Support DCOM interfaces in files other then dcom.idl
2007-10-10 13:05:39 -05:00
Andrew Tridgell
bad6a88371 r3549: added support for DOS extended attribute lists (name/value pairs)
stored in posix xattrs
2007-10-10 13:05:31 -05:00
Stefan Metzmacher
8251d8b3e5 r3484: - add support for conformant string arrays at the end of a struct
- add support for strings where the length excludes the NULLTERM

metze
2007-10-10 13:05:21 -05:00
Andrew Tridgell
e694aeefe7 r3424: don't run mkproto.pl on pidl generated code, instead rely on pidl generating the
prototypes itself
2007-10-10 13:05:08 -05:00
Andrew Tridgell
2cf35cb4d2 r3395: added support for "string32" type, to fix the fixed width string
problem that tim found.
2007-10-10 13:05:05 -05:00
Jelmer Vernooij
7c823f886a r2990: Add support to pidl for autogenerating ndr_size_*() functions. Adding
the [gensize] property to a struct or union will make pidl generate a
ndr_size_*() function.

(not all nasty bits of NDR are completely covered yet by the
 ndr_size*() functions, support for those will be added when necessary)

I also have a local patch (not applied now) that simplifies the pidl output
and eliminates the number of functions required. It would, however, make
pidl more complex.
2007-10-10 12:59:55 -05:00
Andrew Tridgell
dbe6430d78 r2948: added support for the [range(low,high)] attribute in pidl. This allows
range checking of any integer value, to help protect against denial of
service attacks (which could otherwise cause large memory allocations)
2007-10-10 12:59:50 -05:00
Andrew Tridgell
bd45329a3f r2204: added [flag(RELATIVE_CURRENT)] to change [relative] pointer behaviour
for this struct and all sub-structures to be like spoolss relative
pointers (where offset is relative to current position).

volker will test this for me :)
2007-10-10 12:58:31 -05:00
Andrew Tridgell
7fdb778f81 r2180: added RPC flags "padcheck" which enables checking of all received pad
bytes to make sure they are zero. Non-zero values usually indicate one
of two things:

 - the server is leaking data through sending uninitialised memory
 - we have mistaken a real field in the IDL for padding

to differentiate between the two you really need to run with
"print,padcheck" and look carefully at whether the non-zero pad bytes
are random or appear to be deliberate.
2007-10-10 12:58:29 -05:00
Andrew Tridgell
6ffdfd7799 r1985: take advantage of the new talloc in a few more places 2007-10-10 12:58:14 -05:00
Stefan Metzmacher
874d450609 r1884: remove empty header file
metze
2007-10-10 12:58:08 -05:00
Stefan Metzmacher
7f1fceeb7f r1848: fix LIBNDR_STRING_FLAGS to include LIBNDR_STRING_BYTESIZE
metze
2007-10-10 12:58:01 -05:00
Stefan Metzmacher
6d094d60d3 r1847: add STR_BYTESIZE flag, to handle cases where
the size is in bytes not in unicode chars

metze
2007-10-10 12:58:01 -05:00
Andrew Tridgell
ecb7378bbc r1757: much simpler (and smaller, faster etc) way of doing relative pointers
in pidl. This mechanism should be much easier to extend to the
"retrospective subcontexts" that jelmer needs.

also produced more standards complient full-pointer offsets. This
keeps ethereal happy with decoding our epmapper frames.
2007-10-10 12:57:54 -05:00
Tim Potter
d379dcdfd5 r1269: Add a 'base' field to the ndr_ofs_list structure which is the base to
which the offset applies to.  In an array of structures containing
relative members, the offset applies to the start of the array element
being marshalled.  Previously, there was no way to access the relevant
structure start as by the time we have hit buffers, the head of the
offset list will be the last structure being marshalled.

Interestingly enough, this makes relstrs go away.  I think we thought
they were a special case in samba 3 but it turns out they are just
regular relative elements in the idl.  This makes spoolss a lot simpler
than I thought it would be.

I've run the samr and lsa tests and this doesn't seem to break anything.
It looks like security descriptors are the only structures that contain
relative members.

Oh yeah, this will probably require a 'make clean && make' otherwise you
will get bizzare errors.
2007-10-10 12:56:47 -05:00
Stefan Metzmacher
0e5517d937 r884: convert samba4 to use [u]int32_t instead of [u]int32
metze
2007-10-10 12:56:15 -05:00
Andrew Tridgell
1f89d89954 the endpoint mapper now works in bigendian mode -
Andrew Tridgell
3dd978b12b * netr_ServerPasswordSet() now works - the test suite changes the
machine account password.

  * neater handling on value() options in IDL. The auto-print code
    will now display the right value so you don't need to initialise
    it in your C code
-
Andrew Tridgell
bb42107dcc added netr_ServerReqChallenge and cleaned up byte array printing -
Andrew Tridgell
ccd9ddeed6 added auto-generation of the IDL interface tables. This makes two less
places that need to be edited when someone adds a new IDL file.
-
Andrew Tridgell
f94bc07990 added the dcerpc remote management interfaces as mgmt.idl, and wrote a
test suite. The test suite dumps all of the interfaces available on
all pipes. There sure are a lot more interfaces on w2k3 than w2k !
-
Andrew Tridgell
92bcad0258 ooh, this is fun!
I have recoded the core dcerpc packet structures (all the PDUs etc) in
terms of IDL, which means we now use pidl to generate all the code for
handling the most basic dcerpc packets. This is not normally possible
as it isn't completely valid NDR, but pidl has a number of extensions
that make it quite easy.

This also means we get the server side dcerpc
marshalling/unmarshalling code for free.
-
Andrew Tridgell
8ecf720206 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
-
Andrew Tridgell
d2665f36a7 * 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.
-
Tim Potter
c8b87f5feb Start of winreg idl. Implement OpenHKLM, GetVersion and CloseKey. -
Tim Potter
99fff7b1e2 Add initial work on eventlog - doesn't quite work yet. -
Andrew Tridgell
683259a4dd * fixed libndr.h header
* "make clean" now removed the generated files
-
Tim Potter
2740584867 Added ATSVC pipe. -
Andrew Tridgell
f8397cbc85 added samr_LookupNames() and test code -
Andrew Tridgell
7b5d028729 switched to a new way of handling unions, so that we can handle
alignment correctly for unions that have non-uint16 discriminants

fixed the union handling in srvsvc.idl. (metze, please take a look at
the changes, your IDL did match what was one the wire in most cases,
but isn't the way IDL is usually coded)
-
Andrew Tridgell
54d3cb22dc srvsvc IDL and test code from metze. Thanks! -
Andrew Tridgell
3305226140 added wkssvc.idl and test code
I think this is our first complete pipe for Samba4 (albeit a simple
one). Of course, there may be lots more info levels that Samba3 didn't
do. Time to explore :)
-
Andrew Tridgell
33bb878562 * add another WERR err code
* use the top-level function argument printing to show more detail in
   RPC-* tests
-
Andrew Tridgell
d5a15257fd security descriptors are no longer a "special" type, they are handled
using the [relative] property

this also fixes level3 of PrinterInfo (a relative secdesc)
-
Andrew Tridgell
8301a6b6ad * more info levels for EnumPrinter
* use WERROR return type in spoolss EnumPrinter
-
Andrew Tridgell
060421c7dc nicer method of handling spoolss EnumPrinters
this also handles the return of several printers (an array of relative
subcontexts)
-
Andrew Tridgell
69c6017c94 use nstring and [relative] to support levels 1 and 2 of EnumPrinters
fully
-
Andrew Tridgell
e18dba7d5a added support for level1 of EnumPrinters in spoolss. This uses a
number of "magic" add-ons to IDL to make it less painful, hopefully
this will make IDL generation useful for horrible systems like spoolss
-
Andrew Tridgell
5e852f694c added samr_UserInfo2 and samr_UserInfo3 -
Andrew Tridgell
7c162eaf3b added the first couple of calls from samr as IDL
samr_EnumDomains() works nicely
-
Tim Potter
35e889cf33 Skeleton IDL for SPOOLSS pipe. For this inital version, only OpenPrinterEx
works but without a devicemode.
-
Andrew Tridgell
1f93cbc1d5 added lsa_QuerySecObj() and the necessary sec_desc_buf supporting code
also adding printing of security descriptors
-
Andrew Tridgell
095ab42cbd * fixed conformant arrays in structures
* expanded the rpcecho test

* started adding the NETDFS pipe
-
Andrew Tridgell
2cc354bd82 lsa_PrivilegeSet seems to be a very strange beast indeed. It has a
constant sized array of size 1 at the end?
-
Andrew Tridgell
b2ced24fc0 added 9 more info levels to lsa_QueryInfoPolicy -
Andrew Tridgell
e81040a902 start using automatic union printing -
Andrew Tridgell
81d6181172 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.
-
Andrew Tridgell
3983b2aee7 - corrected some lsa idl
- updated lsa parse code from pidl
-