summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc/dcerpc_util.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r3124: Add dcerpc_binding_from_tower()Jelmer Vernooij1-2/+134
Add tests for dcerpc_binding_from_tower() (This used to be commit 88c6d34bba1a409127b26f86bd963bfab30a804c)
2007-10-10r3123: Add dcerpc_binding_build_tower()Jelmer Vernooij1-10/+184
Add local test for testing the functions dcerpc_parse_binding(), dcerpc_binding_string() and dcerpc_binding_build_tower() (This used to be commit 7a07c2c769b8e51178789eed4a31577f5d39f63a)
2007-10-10r3114: - More work on merging the various structs that describe endpointsJelmer Vernooij1-11/+36
- Add protocol sequence to dcerpc transports (will be used later on) - Add more transports to the list (This used to be commit ab110192e6e2c1e5a3b2befe7b61158744f15d18)
2007-10-10r3111: Add a few more protocol identifiers, rhs for ncalrpcJelmer Vernooij1-22/+22
(This used to be commit 53567a83cbca9df60bef76a15df24d2cd89a16b0)
2007-10-10r3047: Always include a \ again before the pipe name we're opening. Without aJelmer Vernooij1-0/+4
backslash works, but is not like Windows does it. (This used to be commit f6deb3d065e1a88f92bcb8a4a138453650c97b0b)
2007-10-10r3046: \\PIPE\\ is internal (not actually included on the wire)Jelmer Vernooij1-5/+2
(This used to be commit 7771b5d8fa3db759487474eb7172df45bb3221ae)
2007-10-10r3043: Use binding strings for specifying endpoints. The property forJelmer Vernooij1-9/+28
specifying a endpoint is now also 'endpoint' instead of 'endpoints'. The default endpoint (if none is specified) is still "ncacn_np:[\\pipe\\ifacename]", where ifacename is the name of the interface. Examples: [ uuid(60a15ec5-4de8-11d7-a637-005056a20182), endpoint("ncacn_np:[\\pipe\\rpcecho]", "ncacn_ip_tcp:") ] interface rpcecho { void dummy(); } dcerpc_binding is now converted to ep_description in the server, but I hope to completely eliminate ep_description later on. The eventual goal of all these changes is to make it easier to add transports as I'm going to add support for ncalrpc (local RPC over named pipes) and ncacn_unix_stream (Unix sockets). (This used to be commit f3da7c8b443a29b0c656c687a277384ae1353792)
2007-10-10r3032: Somewhat stricter syntax for binding strings:Jelmer Vernooij1-43/+56
[] is now mandatory : after the hostname is no longer allowed examples of allowed binding strings: ncacn_np:myhost[samr] ncacn_ip_tcp:10.0.0.1[1045] ncacn_ip_tcp:2001:7b8:37b:1:210:dcff:fecb:a9e3[1024,sign,seal] ncacn_np:myhost ncacn_ip_tcp:192.168.4.2 308FB580-1EB2-11CA-923B-08002B1075A7@ncacn_ip_tcp:192.168.4.2 308FB580-1EB2-11CA-923B-08002B1075A7@ncacn_ip_tcp:192.168.4.2[,print] Note that the last two lines are not recognized by smbtorture as a binding string yet. dcerpc_parse_binding() does accept them though. (This used to be commit c15862e778507287bddef7967383d4b5d22eaee9)
2007-10-10r2990: Add support to pidl for autogenerating ndr_size_*() functions. AddingJelmer Vernooij1-52/+0
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. (This used to be commit 7c823f886afd0c4c6ee838f17882ca0658417011)
2007-10-10r2956: Fix towers_length for now. I'm currently working on a pidl extensionJelmer Vernooij1-0/+52
that can generate these kinds of functions (This used to be commit ebca2516502560edfd4056fbb4cfc9718a108efa)
2007-10-10r2938: Use IDL to dissect the RHS of floors in protocol towersJelmer Vernooij1-34/+7
(This used to be commit 273d0049b5339e3288b264e5a4393bfab1d4e239)
2007-10-10r2921: Add a few more protocols and fix the numbers associated with some ofJelmer Vernooij1-3/+3
the current ones. It took me three hours to realise that the DCOM standard contains false protocol numbers (apparently someone converted the protocol numbers to hex twice, i.e. 13 -> 0c and 14 to 0d). There are no longer duplicates in the list with protocol numbers now. (This used to be commit f355cd426462a72575ef3c3b769f676334976986)
2007-10-10r2763: use no-auth bind on ncacn_np unless we specify at least one of ↵Andrew Tridgell1-1/+2
"sign", "seal" or "connect" (This used to be commit f3adabf6896b75f5293dbde3f9de737f35d95a10)
2007-10-10r2710: continue with the new style of providing a parent context wheneverAndrew Tridgell1-3/+2
possible to a structure creation routine. This makes for much easier global cleanup. (This used to be commit e14ee428ec357fab76a960387a9820a673786e27)
2007-10-10r2668: steal the cli pointer into the pipe context so a single free destroys ↵Andrew Tridgell1-1/+2
the cli context too (This used to be commit 417d0c0ba182aab3a3a23db76ff7ac7cbc663cb6)
2007-10-10r2660: - converted the libcli/raw/ library to use talloc_increase_ref_count()Andrew Tridgell1-1/+1
rather than manual reference counts - properly support SMBexit in the cifs and posix backends - added a logoff method to all backends With these changes the RAW-CONTEXT test now passes against the posix backend (This used to be commit c315d6ac1cc40546fde1474702a6d66d07ee13c8)
2007-10-10r2634: use discard_const_p() in a few placesAndrew Tridgell1-2/+2
(This used to be commit 56ecda2178e33508c55c6195ccec41c06e099d6f)
2007-10-10r2614: support CONNECT level DCE/RPC security in both client andAndrew Tridgell1-8/+3
server. CONNECT security uses NTLMSSP, but does not do any signing or sealing (or equivalently, its like signing, but with a zero filled checksum). (This used to be commit f4660857bc708db7f5aa7487bf7ab04bffe68928)
2007-10-10r2538: Support IPv6 as transport for MSRPC. Tested against Win2k3Jelmer Vernooij1-2/+2
Implemented using the POSIX getaddrinfo() call (specified by POSIX 1003.1-2003 and 2553) I'm not sure how portable this function is, so we might have to add a sys_getaddrinfo() later on. (This used to be commit 0fb0530389751c6fb4ca58f5e9a0f23491699f17)
2007-10-10r2284: Thanks to some great detective work by tridge, NTLM2 signing now works.Andrew Bartlett1-5/+12
This means that 'require NTLMv2 session security' now works for RPC pipe signing. We don't yet have sealing, but it can't be much further. This is almost all tridge's code, munged into a form that can work with the GENSEC API. This commit also includes more lsakey fixes - that key is used for all DCE-RPC level authenticated connections, even over CIFS/ncacn_np. No doubt I missed something, but I'm going to get some sleep :-) Andrew Bartlett (This used to be commit a1fe175eec884280fb7e9ca8f528134cf4600beb)
2007-10-10r2266: yay! LSA session keys on TCP now work!Andrew Tridgell1-15/+1
(This used to be commit f6ea24296acaaadcd2d59740bc88ef1a93fb1c28)
2007-10-10r2180: added RPC flags "padcheck" which enables checking of all received padAndrew Tridgell1-0/+1
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. (This used to be commit 7fdb778f81f14aaab75ab204431e4342a462957a)
2007-10-10r2100: rework the dcerpc client side library so that it is async. We nowAndrew Tridgell1-11/+11
generate a separate *_send() async function for every RPC call, and there is a single dcerpc_ndr_request_recv() call that processes the receive side of any rpc call. The caller can use dcerpc_event_context() to get a pointer to the event context for the pipe so that events can be waited for asynchronously. The only part that remains synchronous is the initial bind calls. These could also be made async if necessary, although I suspect most applications won't need them to be. (This used to be commit f5d004d8eb8c76c03342cace1976b27266cfa1f0)
2007-10-10r1850: when we have a username and use sign or seal on a dcerpc over npStefan Metzmacher1-1/+2
use dcerpc auth instead off smb auth metze (This used to be commit 6b429234968da7e51de95b6ede2afe3c1605debb)
2007-10-10r1821: fixed reference to "status" that should be "result"Andrew Tridgell1-1/+1
(This used to be commit bdf7d66d299b0956fbf17b38291089585b2b54bf)
2007-10-10r1703: - Lots of RPC updates, adding new pipes and protocols.Jelmer Vernooij1-3/+3
- More updates/fixes to the ethereal parser generator (This used to be commit 547f860285b117e291bf3dbaca0707dc268b214e)
2007-10-10r1654: rename cli_ -> smbcli_Stefan Metzmacher1-8/+8
rename CLI_ -> SMBCLI_ metze (This used to be commit 8441750fd9427dd6fe477f27e603821b4026f038)
2007-10-10r1294: A nice, large, commit...Andrew Bartlett1-2/+4
This implements gensec for Samba's server side, and brings gensec up to the standards of a full subsystem. This means that use of the subsystem is by gensec_* functions, not function pointers in structures (this is internal). This causes changes in all the existing gensec users. Our RPC server no longer contains it's own generalised security scheme, and now calls gensec directly. Gensec has also taken over the role of auth/auth_ntlmssp.c An important part of gensec, is the output of the 'session_info' struct. This is now reference counted, so that we can correctly free it when a pipe is closed, no matter if it was inherited, or created by per-pipe authentication. The schannel code is reworked, to be in the same file for client and server. ntlm_auth is reworked to use gensec. The major problem with this code is the way it relies on subsystem auto-initialisation. The primary reason for this commit now.is to allow these problems to be looked at, and fixed. There are problems with the new code: - I've tested it with smbtorture, but currently don't have VMware and valgrind working (this I'll fix soon). - The SPNEGO code is client-only at this point. - We still do not do kerberos. Andrew Bartlett (This used to be commit 07fd885fd488fd1051eacc905a2d4962f8a018ec)
2007-10-10r1200: Add 'gensec', our generic security layer.Andrew Bartlett1-2/+2
This layer is used for DCERPC security, as well as ntlm_auth at this time. It expect things like SASL and the CIFS layer to use it as well. The particular purpose of this layer is to introduce SPENGO, which needs generic access to the actual implementation mechanisms. Schannel, due to it's 'interesting' setup properties is in GENSEC, but is only in the RPC code. Andrew Bartlett (This used to be commit 902af49006fb8cfecaadd3cc0c10e2e542083fb1)
2007-10-10r1136: - added IDL for netr_LogonGetDomainInfo()Andrew Tridgell1-0/+35
- added workstation to auth_session_info in rpc servers - added session key fetch hook in crypto backends in dcesrv - store and fetch seed as well as a session key in schannel ldb - when a client uses schannel to setup a netlogon pipe connection we also need to setup the credentials from the schannel negotiation so credentials chaining works - added server side netr_LogonGetDomainInfo() call (This used to be commit a35459387de3b6a422c5af6f658338fc7e4314b0)
2007-10-10r1077: fix segfault in schannel over ncacn_ip_tcpStefan Metzmacher1-13/+13
metze (This used to be commit 9e9a52692ebe9d47f1a08740ea1dcb8f46041211)
2007-10-10r1068: make the dcerpc client side auth/crypto code much more genericStefan Metzmacher1-2/+2
metze (This used to be commit 1706ff88a72c6578a109c2cf24f2f009812c3892)
2007-10-10r1041: - pulled the domain join code out of the netlogon test and made it a ↵Andrew Tridgell1-32/+52
separate utility function, to allow multiple torture tests to temporarily join a domain - fixed a session key size problem - added a schannel test suite - allow schannel to work with ncacn_ip_tcp (This used to be commit 36f05e4d575099fcb957b8a55781c38dcd2e1177)
2007-10-10r1030: added server side schannel supportAndrew Tridgell1-4/+4
(This used to be commit 2ac79dfba0e64056a680f21d7dd0c007f79d4a70)
2007-10-10r962: convert 'unsigned' and 'unsigned int' to uint_tStefan Metzmacher1-1/+1
metze (This used to be commit 57151e80eb1090281401930c8fe25b20a8cf3a38)
2007-10-10r884: convert samba4 to use [u]int32_t instead of [u]int32Stefan Metzmacher1-10/+10
metze (This used to be commit 0e5517d937a2eb7cf707991d1c7498c1ab456095)
2007-10-10r610: - Merge the Samba3 'ntlm_auth --diagnostics' testsuite to Samba4.Andrew Bartlett1-16/+10
- This required using NETLOGON_NEG_AUTH2_FLAGS for the SetupCredentials2 negotiation flags, which is what Samba3 does, because otherwise the server uses different crypto. - This tests the returned session keys, which we decrypt. - Update the Samba4 notion of a 'session key' to be a DATA_BLOB in most places. - Fix session key code to return NT_STATUS_NO_SESSION_KEY if none is available. - Remove a useless argument to SMBsesskeygen_ntv1 - move netr_CredentialState from the .idl to the new credentials.h Andrew Bartlett (This used to be commit 44f8b5b53e6abd4de8a676f78d729988fadff320)
2007-10-10r390: added my best guess for how session keys are supposed to work when youAndrew Tridgell1-5/+14
use NTLMSSP sign or seal at the RPC layer It doesn't work yet, but then again neither does the old code (which just assumed the SMB session key was used, which of course makes no sense on a ncacn_ip_tcp connection) (This used to be commit e8782329269bc78d36d8ca83fb7a4e38b9c6b167)
2007-10-10r101: added lsa_SetSecret() and lsa_QuerySecret()Andrew Tridgell1-0/+22
this required some crypto infrastructure and some sid utilities (This used to be commit 37d0efa9c2af8532536bea88412f0dd3ed39ecfc)
2004-02-10- modified the dcerpc client security code to be generic, so ntlmsspAndrew Tridgell1-1/+14
and schannel are both instances of possible security modules - added schannel sign and sign/seal support to the dcerpc client code. You select it with binding options of "schannel,sign" or "schannel,seal". (This used to be commit 05db0b9d942cad8f1dd574dc35b759e5e79d4195)
2004-02-03- add 'print' to the DCERPC binding stringsStefan Metzmacher1-0/+1
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 (This used to be commit 40abf3c584efed7f977ddd688ea064540e5a5b13)
2004-01-20added code to the RPC-SPOOLSS test that demonstrates that policyAndrew Tridgell1-0/+39
handles are not shared between open dcerpc connections, even when those connections are on the same SMB socket. I have tested this with w2k3, w2k and NT4. It seems that policy handles have a strict scope of the dcerpc connection on which they were opened. I realise that this goes against existing folk-law in the team, but it seems that the previous testing (I'm not sure who did this?) was wrong. Perhaps clients do send us policy handles from other connections, but if they do then the correct thing to do is to fail the operation with a dcerpc fault. I suspect that failing it with exactly the right dcerpc fault code is important. (This used to be commit 2ed24d29bafd9055d5782acdd595cd0f378a651a)
2003-12-19fixed removal of moe than one ncacn_* option from option listAndrew Tridgell1-0/+1
(This used to be commit 09a9b25c8d916c0467a124d959d5cd911b782dfa)
2003-12-17fixed a segv in RPC-* when debug level > 2Andrew Tridgell1-1/+1
thanks to Kai for spotting this! (This used to be commit 0fc42c33d3b0930fdf1dc71a407f4fcaac69d82d)
2003-12-17Fix typo.Tim Potter1-1/+1
(This used to be commit 3f1b781c5659361d7e9cc3ab2072e1462d40df55)
2003-12-17added a smb.conf flag "rpc big endian" that tells our rpc server toAndrew Tridgell1-3/+2
send packets in bigendian format. (This used to be commit 44df662960e662a55a9f27627f838771503a7a59)
2003-12-16fixed the RPC-MGMT and RPC-SCANNER tests to work with the newAndrew Tridgell1-24/+75
dcerpc_binding_string code (This used to be commit 1fa68c18facfb6c96d5a274cfd9560cb4b2956f6)
2003-12-16no longer require the pipe name or tcp port number to be the firstAndrew Tridgell1-0/+4
option in the ncacn_* syntax (This used to be commit 74f36d32bb14e94a80e1963cbc95f8fba3f23335)
2003-12-16a fairly large commit!Andrew Tridgell1-4/+10
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. (This used to be commit bb1af644a5a7b188290ce36232f255da0e5d66d2)
2003-12-15more flexible handling of [] in binding stringsAndrew Tridgell1-2/+14
(This used to be commit edc67fffeaee5fe4bbbc6fbd76345d0a9d5b2093)