1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-27 08:23:49 +03:00
Commit Graph

123 Commits

Author SHA1 Message Date
Andrew Tridgell
be94cc4032 r511: fix some const handling 2007-10-10 12:51:46 -05:00
Andrew Tridgell
10844cf925 r327: fixed an uninitialised variable found by valgrind 2007-10-10 12:51:33 -05:00
Andrew Tridgell
849d0d314a r275: added IDL and test code for samr_QueryDisplayInfo3(),
samr_AddMultipleMembersToAlias(),
samr_RemoveMultipleMembersFromAlias(), samr_OemChangePasswordUser2(),
and samr_ChangePasswordUser2()

The password change functions don't actually work yet (but should
soon). At this stage I have just completed the IDL for them. Next step
is to get the hash verifiers right and the torture test should be able
to do password changes.
2007-10-10 12:51:19 -05:00
Andrew Tridgell
af34710d4d r152: a quick airport commit ....
added ldbedit, a _really_ useful command

added ldbadd, ldbdel, ldbsearch and ldbmodify to build

solved lots of timezone issues, we now pass the torture tests with
client and server in different zones

fixed several build issues

I know this breaks the no-LDAP build. Wait till I arrive in San Jose for that
fix.
2007-10-10 12:51:11 -05:00
Stefan Metzmacher
40abf3c584 - add 'print' to the DCERPC binding strings
e.g.
  ncacn_np:myserver:[samr,sign,print]

  will now enable the packet debugging

  and the debugging is not bound anymore to the debuglevel >= 2
  in the torture tests

- also the dcesrv_remote module now supports debugging of the packets
  use the 'dcerpc_remote:binding' smb.conf parameter.

metze
-
Andrew Tridgell
399f95536b added dom_sid_string() function -
Stefan Metzmacher
917e45dafd This patch adds a better dcerpc server infastructure.
1.) We now register endpoint servers add startup via register_backend()
    and later use the smb.conf 'dcerpc endpoint servers' parameter to setup the dcesrv_context

2.) each endpoint server can register at context creation time as much interfaces as it wants
    (multiple interfaces on one endpoint are supported!)
    (NOTE:  there's a difference between 'endpoint server' and 'endpoint'!
	    for details look at rpc_server/dcesrv_server.h)

3.) one endpoint can have a security descriptor registered to it self
    this will be checked in the future when a client wants to connect
    to an smb pipe endpoint.

4.) we now have a 'remote' endpoint server, which works like the ntvfs_cifs module
    it takes this options in the [globals] section:

    dcerpc remote:interfaces = srvsvc, winreg, w32time, epmapper
    dcerpc remote:binding = ...
    dcerpc remote:user = ...
    dcerpc remote:password = ...

5.) we currently have tree endpoint servers: epmapper, rpcecho and remote

    the default for the 'dcerpc endpiont servers = epmapper, rpcecho'

    for testing you can also do
    dcerpc endpoint servers = rpcecho, remote, epmapper
    dcerpc remote:interfaces = srvsvc, samr, netlogon

6,) please notice the the epmapper now only returns NO_ENTRIES
    (but I think we'll find a solution for this too:-)

7.) also there're some other stuff left, but step by step :-)

This patch also includes updates for the
register_subsystem() , ntvfs_init(), and some other funtions
to check for duplicate subsystem registration


metze

(hmmm, my first large commit...I hope it works as supposed :-)
-
Andrew Tridgell
1f89d89954 the endpoint mapper now works in bigendian mode -
Andrew Tridgell
9cd0a0b8b9 addition of samr_SetSecurity() from kai
we needed to adjust the alignment of [relative] buffers for this to
work. I wonder if they are always 4 byte aligned?
-
Andrew Tridgell
abe7ffcece fixed the AddAliasMem test code -
Andrew Tridgell
7895796ef8 fixed formatting of uuids in debug output -
Andrew Tridgell
a0a51af6b7 added support for big-endian ucs2 strings (as used by big-endian
msrpc).

this was easier than I expected!
-
Andrew Tridgell
bb1af644a5 a fairly large commit!
This adds support for bigendian rpc in the client. I have installed
SUN pcnetlink locally and am using it to test the samba4 rpc
code. This allows us to easily find places where we have stuffed up
the types (such as 2 uint16 versus a uint32), as testing both
big-endian and little-endian easily shows which is correct. I have now
used this to fix several bugs like that in the samba4 IDL.

In order to make this work I also had to redefine a GUID as a true
structure, not a blob. From the pcnetlink wire it is clear that it is
indeed defined as a structure (the byte order changes). This required
changing lots of Samba code to use a GUID as a structure.

I also had to fix the if_version code in dcerpc syntax IDs, as it
turns out they are a single uint32 not two uint16s.

The big-endian support is a bit ugly at the moment, and breaks the
layering in some places. More work is needed, especially on the server
side.
-
Tim Potter
370512f664 Added routines for arrays of uint16s. -
Andrew Tridgell
46e0a35819 * the RPC-ECHO pipe now works in smbd, as long as the data sizes
don't cause fragmented pdus (I'll add fragments shortly)

 * change data_blob_talloc() to not zero memory when the 2nd argument
   is NULL. The zeroing just masks bugs, and can't even allow a DOS
   attack

 * modified pidl to ensure that [ref] arguments to the out side of
   functions are allocated when parsing the in side. This allows rpc
   backends to assume that [ref] variables are all setup. Doesn't work
   correctly for [ref] arrays yet

 * changed DLIST_ADD_END() to take the type instead of a tmp
   variable. This means you don't need to declare a silly tmp variable in
   the caller
-
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
3d64eefb46 started adding netlogon IDL and test suite -
Tim Potter
a818439b59 Added EnumPrinterDriver, GetPrinterDriver (still in progress) -
Tim Potter
a06cbbbf1f Added EnumJobs, GetJob, SetJob RPCs. -
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.
-
Tim Potter
822750592c Implemented EnumForms and GetForm. -
Andrew Tridgell
c18c9b5585 signed DCERPC over TCP now works !
* moved ntlmssp code into libcli/auth/, and updated to latest ntlmssp
   code from samba3 (thanks Andrew! the new interface is great)

 * added signing/ntlmssp support in the dcerpc code

 * added a dcerpc_auth.c module for the various dcerpc auth mechanisms
-
Andrew Tridgell
570ad78525 added tests for epm_Map endpointer map calls -
Andrew Tridgell
00f9b0e120 added tests for the remaining calls on the rpc management interface -
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
229a325c3c added a tool called 'ndrdump' that allows you to dump NDR data
according to the current IDL taking the data from a file. In
combination with a little hack to ethereal to extract data this is a
quite powerful IDL development tool.
-
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
60ced76160 * fixed null terminated string handling
* fixed nested relative offsets in push functions

the spoolss torture test now passes!
-
Andrew Tridgell
9d5078962f * fixed NDR flag inheritance across push subcontexts
* don't consider not doing lsa_QueryInfoPolicy level 11 a failure
   (w2k3 doesn't have this level, w2k does)

 * on a NDR validation failure dump the failed data at level 3
-
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
5962f1cffa added some explanations for epmapper IDL and dom_sid2 -
Andrew Tridgell
4022e71075 cleaner handling of relative pointers to strings -
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. -
Andrew Tridgell
63b9d2803c avoid calling the print routines completely if debug level < 2 -
Andrew Tridgell
53ff3a572a only display really verbose packet dumps when smbtorture is run at
debug level 2 or above. This is more useful for checking that
something hasn't broken without swamping yourself with output.
-
Andrew Tridgell
f4cc593a5c added 4 more levels to samr_QueryDisplayInfo() -
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
-
Andrew Tridgell
49c72d4276 moved the pidl auto-generated files out of CVS -
Andrew Tridgell
3337906d52 extensive samr_SetUserInfo/samr_QueryUserInfo testing, with
cross-checking of all settable fields
-
Andrew Tridgell
26238b0f8a * fixed level2 of QueryUserInfo
* added per-field testing of SetUserInfo

 * fixed strlen_m()
-
Andrew Tridgell
47128b3d50 started on samr_SetUserInfo()
cope with the 'samrtorturetest' user already existing in the samr test
(to cope with previously failed runs)
-
Andrew Tridgell
ab4056e25c fixed srvsvc_NetShareEnumAll() -
Richard Sharpe
9810e6f180 Add a 1004 level for srvsvc. -
Tim Potter
2740584867 Added ATSVC pipe. -
Andrew Tridgell
c32c33a791 added samr_LookupRids() and test code -
Andrew Tridgell
f8397cbc85 added samr_LookupNames() and test code -
Andrew Tridgell
4b901bd717 make the echo idl match the win32 IDL again -