summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc/dcerpc_smb.c
AgeCommit message (Collapse)AuthorFilesLines
2013-10-17s4:librpc/rpc: remove unused dcerpc_smb_tree()Stefan Metzmacher1-15/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17s4:librpc/rpc: add dcerpc_secondary_smb_send/recv()Stefan Metzmacher1-0/+19
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17s4:librpc/rpc: remove unused dcerpc_smb_fnum()Stefan Metzmacher1-15/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2012-12-21s4-librpc: Remove dead code in smb_send_request().Andreas Schneider1-4/+0
If trigger_read we return earlier. Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2012-08-01s4:librpc/dcerpc_smb: make use of smbXcli_session_application_key()Stefan Metzmacher1-4/+15
metze
2011-11-30s4:libcli/raw: implement on top of smbXcli_conn/reqStefan Metzmacher1-4/+6
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Nov 30 15:13:36 CET 2011 on sn-devel-104
2011-10-28s4:librpc/dcerpc_smb: fix smb_write_callback()Stefan Metzmacher1-5/+10
The should use smb_raw_write_recv() to get the result. metze
2011-08-04s4-librpc: Fix double free.Andreas Schneider1-5/+6
Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Thu Aug 4 12:31:18 CEST 2011 on sn-devel-104
2011-03-11s4:librpc/rpc: s/struct dcerpc_connection/struct dcecli_connection/gStefan Metzmacher1-19/+19
The name 'struct dcerpc_connection' will be used in the new generic dcerpc code. It will be used for client and server. metze
2011-02-24build: moved librpc/rpc/*.c into a rpccommon libraryAndrew Tridgell1-0/+1
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Thu Feb 24 02:42:37 CET 2011 on sn-devel-104
2009-10-15s4-smb: declare root_fid as a file handleAndrew Tridgell1-1/+1
In order to implement root_fid in the s4 SMB server we need to declare it as a handle type, just as for other fnum values in SMB. This required some extensive (but simple) changes in many bits of code.
2009-09-17s4-rpc: added NDR64 supportAndrew Tridgell1-1/+5
This adds support for the nd464 binding string option
2009-07-01fixed rpc smb code to not reply on talloc_free being a function pointerAndrew Tridgell1-1/+7
The upcoming talloc_free/talloc_reference changes change talloc_free to be a macro. These two bits of code relied on it being a function pointer
2009-02-02s4:libcliraw: s/private/private_dataStefan Metzmacher1-8/+8
metze
2008-07-07dcerpc_smb: trans->in.max_data should not depend on the smb max sizeStefan Metzmacher1-1/+8
We now support async multi fragment SMBtrans calls. metze (This used to be commit 6813e22e9d300696a40993476629227d5cc4d35f)
2008-04-02Install public header files again and include required prototypes.Jelmer Vernooij1-3/+4
(This used to be commit 47ffbbf67435904754469544390b67d34c958343)
2007-10-10r25316: Remove last few instances of old BOOL type in librpc/.Jelmer Vernooij1-2/+3
(This used to be commit 80d1dd41d4b224c46ad545f0afd97a847b99860b)
2007-10-10r24994: Fix some C++ warnings.Jelmer Vernooij1-10/+10
(This used to be commit 925abf74fa1ed5ae726bae8781ec549302786b39)
2007-10-10r24937: Merge tests spoolss RPC callbacks.Jelmer Vernooij1-1/+3
(This used to be commit 9b256a0ca232ea6e89771bf73a1adf877273a752)
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-10r22944: fix bug #4618:Stefan Metzmacher1-14/+14
rename private -> private_data metze (This used to be commit 58551f2f28fce8f1fcd04736c47ecd7458f32ea2)
2007-10-10r22838: Add in an explority test for what QFSINFO operations are valid on IPC$Andrew Bartlett1-0/+15
It seems most opertaions are supported, but that the values are not consistant. I think these are very much hand-hacked stubs, which is what they will be on Samba4 too. I'll need to add some more 'don't fail for...' hacks before this passes against Win2k3. Andrew Bartlett (This used to be commit dcb858d0c716b23be6c5d36b4aa6f155582ada63)
2007-10-10r22683: fix the logic for skipping the pipe_dead()Stefan Metzmacher1-2/+2
code on the 2nd run. thanks volker for finding this! metze (This used to be commit 00ccc217da62a7f4125f28e77030ae526d573f3a)
2007-10-10r22528: remember that the connection was marked dead and don'tStefan Metzmacher1-0/+21
allow sending packet over the broken connection, as we would segfault... metze (This used to be commit 738b2c74117bdbef3b314c37f01f2f73b7a80685)
2007-10-10r22485: don't crash when the main dcerpc code haven't setupStefan Metzmacher1-1/+11
transport.recv_data yet also return always a usefull error metze (This used to be commit 0a8b4c328dfac972186564d2a4e1757d5135ec47)
2007-10-10r22470: merge handling of broken connections from wins replication client codeStefan Metzmacher1-3/+3
to the rpc client code we need to always ask for read events on the socket otherwise we never get the connection error reported. shutdown the transport when a request timeout. metze (This used to be commit 3403c0cb15e08ec838b0bc834f941051fb94d124)
2007-10-10r21535: - fixed a crash in the RAW-ACLS test. When a dcerpc_pipe is createdAndrew Tridgell1-3/+16
using the pattern in the clilsa code, it didn't fill in the p->binding structure. This affects nearly all users of dcerpc_pipe_open_smb(), so the simplest fix is to ensure that dcerpc_pipe_open_smb() initialises the binding if its not already there. - re-enable the RAW-ACLS test (This used to be commit d8875c286d2be49c01703d8fd58bbc1842054bd9)
2007-10-10r17322: make better use of the composite apiStefan Metzmacher1-47/+22
metze (This used to be commit 5e66bf463b0998b2981380f1250b60b723595ac4)
2007-10-10r14714: On DCE/RPC, we need the name of the remote server used on the socket,Andrew Bartlett1-9/+19
for Kerberos. It must be the full name contacted, not the 'called name' we might want to use for \\server things, so add another function. Andrew Bartlett (This used to be commit 6d57d1dbb76e7d1ca2fd4f1a6c0bacfa7a189e2b)
2007-10-10r14542: Remove librpc, libndr and libnbt from includes.hJelmer Vernooij1-0/+1
(This used to be commit 51b4270513752d2eafbe77f9de598de16ef84a1f)
2007-10-10r14256: - rename smb_file -> smb_handleStefan Metzmacher1-4/+4
- move it into the in/out substructs again - allow file.path only on smb_fileinfo/smb_setfileinfo metze (This used to be commit be6d5298a2cdb7e7c61d70471bad445645af5963)
2007-10-10r14208: removed use of req->flags2 inside the ntvfs layer. This should helpAndrew Tridgell1-0/+1
metze on his quest to unify the ntvfs strucures for the smb and smb2 servers. The only place we needed flags2 inside ntvfs was for the FLAGS2_READ_PERMIT_EXECUTE bit, which only affects readx, so I added a readx.in.read_for_execute flag instead. (This used to be commit b78abbbce60ab0009da19a72dd769800c44298a2)
2007-10-10r14173: change smb interface structures to always useStefan Metzmacher1-4/+4
a union smb_file, to abtract - const char *path fot qpathinfo and setpathinfo - uint16_t fnum for SMB - smb2_handle handle for SMB2 the idea is to later add a struct ntvfs_handle *ntvfs so that the ntvfs subsystem don't need to know the difference between SMB and SMB2 metze (This used to be commit 2ef3f5970901b5accdb50f0d0115b5d46b0c788f)
2007-10-10r13210: Revert my named pipes patch until it passes not just 'make ↵Jelmer Vernooij1-1/+1
quicktest' but also 'make test' (This used to be commit e3d0676aee84e96e5c87bed4cd0cde75a4191953)
2007-10-10r13208: Clearly separate named pipes from the IPC$ NTVFS type.Jelmer Vernooij1-1/+1
This allows the easy addition of additional named pipes and removes the circular dependencies between the CIFS, RPC and RAP servers. Simple tests for a custom named pipe included. (This used to be commit 898d15acbd18e3b302a856c847e08c22c5024792)
2007-10-10r12608: Remove some unused #include lines.Jelmer Vernooij1-1/+0
(This used to be commit 70e7449318aa0e9d2639c76730a7d1683b2f4981)
2007-10-10r11824: fixed a valgrind error in the dcerpc_smb codeAndrew Tridgell1-1/+2
(This used to be commit 128b5ea7b369df6e7433609a24128f8bf623c4fe)
2007-10-10r11515: Add some talloc_get_typeVolker Lendecke1-2/+2
(This used to be commit 558c29971d5855308a9d8dfd21e8ac7ec24abc01)
2007-10-10r10699: fixed the dcerpc code so that you can shutdown the pipe safely fromAndrew Tridgell1-4/+15
within a callback on the pipe. This should fix a problem volker encountered with winbind. The fix invoolves making the recv_data handler free the memory for a packet, instead of having the transport layer free it after calling recv_data. When the transport layer freed it, it had no way of knowing if the callback had shutdown the pipe, so it had no way of knowing if it could safely use the pointer. Also changed the pipe shutdown hook for the smb transport to use an async SMB close. This ensures that when you shutdown the pipe, you don't block waiting for the server to ack the close of the pipe fnum. (This used to be commit c87d7f580e39245db181605f50883de07dd9632e)
2007-10-10r10683: Samba3's wbinfo -t should give the correct answer now.Volker Lendecke1-1/+1
Tridge, if you have time, you might want to look at the segfault I was still seeing. Now I store the handle to the netlogon pipe in the global winbind state and free it on the next entry into check_machacc. The problem seems to be that talloc_free()ing a pipe struct from within a callback function on that pipe is not possible. I think I can live with that, but it has been not really obvious. To reproduce the segfault you might want to look at putting a talloc_free(state->getcreds->out.netlogon) into wbsrv_samba3_check_machacc_receive_creds. This is called from a dcerpc callback function. In particular if the check failed it would be nice if I could delete the pipe directly and not post a different event to some winbind queue. I tried to delete the pipe from a timed event triggered immediately, but this also fails because the inner loop seems to hit the same event again, calling it twice. Volker (This used to be commit 5436d7764812bb632ba865e633005ed07923b57f)
2007-10-10r10681: Convert dcerpc_open_smb to a composite function.Volker Lendecke1-42/+113
Volker (This used to be commit 42ff218ac98fab00bd58c4f50f11843ef32b4698)
2007-10-10r8520: fixed a pile of warnings from the build farm gcc -Wall output onAndrew Tridgell1-1/+1
S390. This is an attempt to avoid the panic we're seeing in the automatic builds. The main fixes are: - assumptions that sizeof(size_t) == sizeof(int), mostly in printf formats - use of NULL format statements to perform dn searches. - assumption that sizeof() returns an int (This used to be commit a58ea6b3854973b694d2b1e22323ed7eb00e3a3f)
2007-10-10r7932: don't use the nbt called name as server name, for dcerpc_server_name()Stefan Metzmacher1-9/+8
in the ncacn_np trnaport it's now supported to use the ip address in smbtorture for ncacn_np tests that use dcerpc_server_name(), and we can now pass the dns host name in the tree connect when we have the dns name on the smbtorture command line metze (This used to be commit e29edbc7e62c738564ae842c9c01c969f5c70e5d)
2007-10-10r7658: don't timeout at the smb level for rpc requests as otherwise some rpcAndrew Tridgell1-0/+4
level sign/seal mechanisms can break (This used to be commit 9df569f023f9a1e0d8c35de8135a344933bc69bf)
2007-10-10r7633: this patch started as an attempt to make the dcerpc code use a givenAndrew Tridgell1-13/+0
event_context for the socket_connect() call, so that when things that use dcerpc are running alongside anything else it doesn't block the whole process during a connect. Then of course I needed to change any code that created a dcerpc connection (such as the auth code) to also take an event context, and anything that called that and so on .... thus the size of the patch. There were 3 places where I punted: - abartlet wanted me to add a gensec_set_event_context() call instead of adding it to the gensec init calls. Andrew, my apologies for not doing this. I didn't do it as adding a new parameter allowed me to catch all the callers with the compiler. Now that its done, we could go back and use gensec_set_event_context() - the ejs code calls auth initialisation, which means it should pass in the event context from the web server. I punted on that. Needs fixing. - I used a NULL event context in dcom_get_pipe(). This is equivalent to what we did already, but should be fixed to use a callers event context. Jelmer, can you think of a clean way to do that? I also cleaned up a couple of things: - libnet_context_destroy() makes no sense. I removed it. - removed some unused vars in various places (This used to be commit 3a3025485bdb8f600ab528c0b4b4eef0c65e3fc9)
2007-10-10r5902: A rather large change...Andrew Bartlett1-1/+15
I wanted to add a simple 'workstation' argument to the DCERPC authenticated binding calls, but this patch kind of grew from there. With SCHANNEL, the 'workstation' name (the netbios name of the client) matters, as this is what ties the session between the NETLOGON ops and the SCHANNEL bind. This changes a lot of files, and these will again be changed when jelmer does the credentials work. I also correct some schannel IDL to distinguish between workstation names and account names. The distinction matters for domain trust accounts. Issues in handling this (issues with lifetime of talloc pointers) caused me to change the 'creds_CredentialsState' and 'struct dcerpc_binding' pointers to always be talloc()ed pointers. In the schannel DB, we now store both the domain and computername, and query on both. This should ensure we fault correctly when the domain is specified incorrectly in the SCHANNEL bind. In the RPC-SCHANNEL test, I finally fixed a bug that vl pointed out, where the comment claimed we re-used a connection, but in fact we made a new connection. This was achived by breaking apart some of the dcerpc_secondary_connection() logic. The addition of workstation handling was also propogated to NTLMSSP and GENSEC, for completeness. The RPC-SAMSYNC test has been cleaned up a little, using a loop over usernames/passwords rather than manually expanded tests. This will be expanded further (the code in #if 0 in this patch) to use a newly created user account for testing. In making this test pass test_rpc.sh, I found a bug in the RPC-ECHO server, caused by the removal of [ref] and the assoicated pointer from the IDL. This has been re-added, until the underlying pidl issues are solved. (This used to be commit 824289dcc20908ddec957a4a892a103eec2da9b9)
2007-10-10r5137: fix typesStefan Metzmacher1-1/+1
metze (This used to be commit add1c579375d08040f722946da31ee3862f9e7ac)
2007-10-10r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for theAndrew Tridgell1-5/+5
large commit. I thought this was worthwhile to get done for consistency. (This used to be commit ec32b22ed5ec224f6324f5e069d15e92e38e15c0)
2007-10-10r4757: added the ability of the clisocket level of libcli to handle asyncAndrew Tridgell1-1/+1
socket connections. This was complicated by a few factors: - it meant moving the event context from clitransport to clisocket, so lots of structures changed - we need to asynchronously handle connection to lists of port numbers, not just one port number. The code internally tries each port in the list in turn, without ever blocking - the man page on how connect() is supposed to work asynchronously doesn't work in practice (now why doesn't this surprise me?). The getsockopt() for SOL_ERROR is supposed to retrieve the error, but in fact the next (unrelated) connect() call on the same socket also gets an error, though not the right error. To work around this I need to tear down the whole socket between each attempted port. I hate posix. Note that clisocket.c still does a blocking name resolution call in smbcli_sock_connect_byname(). That will be fixed when we add the async NBT resolution code. Also note that I arranged things so that every SMB connection is now async internally, so using plain smbclient or smbtorture tests all the async features of this new code. (This used to be commit 468f8ebbfdbdf37c757fdc4863626aa9946a8870)
2007-10-10r4616: the first phase in the addition of proper support forAndrew Tridgell1-64/+59
dcerpc_alter_context and multiple context_ids in the dcerpc client library. This stage does the following: - split "struct dcerpc_pipe" into two parts, the main part being "struct dcerpc_connection", which contains all the parts not dependent on the context, and "struct dcerpc_pipe" which has the context dependent part. This is similar to the layering in libcli_*() for SMB - disable the current dcerpc_alter code. I've used a #warning until i get the 2nd phase finished. I don't know how portable #warning is, but it won't be long before I add full alter context support anyway, so it won't last long - cleanup the allocation of dcerpc_pipe structures. The previous code was quite awkward. (This used to be commit 4004c69937be7e5dae56f9567ca607f982d395d3)