1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

288 Commits

Author SHA1 Message Date
Volker Lendecke
0844cca1d5 Replace get_myname() with the talloc version from v3-3-test 2009-02-13 12:15:03 +01:00
Volker Lendecke
d3f9b0fab6 Next step disentangling async_req from NTSTATUS
Now I need to document this :-)
2009-02-02 20:15:03 +01:00
Volker Lendecke
c14b7e648b Split up async_req into a generic and a NTSTATUS specific part 2009-02-01 19:05:39 +01:00
Volker Lendecke
7967d8c779 Move rpc_pipe_open_internal to srv_pipe_hnd.c
This is a smbd-only function
2009-02-01 14:34:23 +01:00
Volker Lendecke
57de60a83f cli_get_pipe_name_from_interface does not really need a talloc_ctx 2009-02-01 14:34:22 +01:00
Volker Lendecke
f6d08849e1 Fix memleaks 2009-01-30 21:29:35 +01:00
Volker Lendecke
aef749b53f pass NULL to prs_give_memory, that is a pointer 2009-01-30 21:29:35 +01:00
Volker Lendecke
22e3004829 Add the "SMBD" rpc transport
The idea of this is that all client utils like smbpasswd and also for example
"net join" do not access our internal databases like passdb and secrets.tdb
directly anymore but pass everything throught the well-established RPC
interfaces.

The way you use this is the following: With rpc_cli_smbd_conn_init() or its
async variant you initialize a "struct rpc_cli_smbd_conn". This structure is
the link to a freshly forked smbd, ready to be used for RPC services. You
should only ever have one such structure in your program. More don't hurt, but
are plainly unnecessary.

If you want to use the SAMR pipe to change a passwort, you connect to that pipe
with rpc_pipe_open_local. Do you normal rpccli_samr calls on that and your
locally forked smbd will connect to passdb for you.

GD, this might make the distinction between the _l and _r calls in libnetapi
mostly unnecessary. At least it is intended to do so... :-)
2009-01-30 12:48:00 +01:00
Volker Lendecke
b7094c0b80 Abstract away the transport in cli_pipe.c
Sorry for the monster checkin, I could not really find a way to do this in
steps.
2009-01-22 22:59:54 +01:00
Volker Lendecke
031f246941 Fix a segfault: rpccli_* expect the reply_pdu to always be initialized 2009-01-22 17:54:16 +01:00
Volker Lendecke
3662c2b0f6 cli_get_pipe_name_from_iface does not need the cli_state
I leave the TALLOC_CTX in, we might have to allocate it in the future
2009-01-22 11:38:00 +01:00
Jelmer Vernooij
11a25f9050 Allow calling DCE/RPC server implementations directly using
rpc_pipe_client.
2009-01-21 14:05:51 +01:00
Volker Lendecke
0dbd396862 Add a macro async_req_setup()
This streamlines setting up a multi-step async request a bit
2009-01-18 16:45:07 +01:00
Volker Lendecke
c45b6ec29a Add code to torture the fragmentation code a bit 2009-01-18 15:40:45 +01:00
Volker Lendecke
a158ebbe49 Remove unused functions 2009-01-18 15:40:45 +01:00
Volker Lendecke
28c35b4c04 Make rpc_pipe_bind async 2009-01-18 15:40:45 +01:00
Volker Lendecke
ecb5184ce5 Fix an uninitialized variable 2009-01-18 15:40:45 +01:00
Volker Lendecke
3f9f188877 Remove sync rpc_api_pipe_req 2009-01-18 15:40:45 +01:00
Volker Lendecke
396ed3b363 Add async rpc_api_pipe_req 2009-01-18 15:40:45 +01:00
Volker Lendecke
c655f19e1f Add rpc_write_send/recv 2009-01-18 15:40:44 +01:00
Volker Lendecke
f96335afc0 Remove unused sync functions 2009-01-18 15:40:44 +01:00
Volker Lendecke
f6740aa7ad Make rpc_api_pipe async 2009-01-18 15:40:44 +01:00
Volker Lendecke
761d164420 Rename the async version of get_complete_pdu to get_complete_frag 2009-01-18 15:40:44 +01:00
Volker Lendecke
5e6f3eaae9 Move initialization of the reply prs_struct to rpc_api_pipe 2009-01-18 15:40:44 +01:00
Volker Lendecke
5987c82697 Always check the max send sizein rpc_api_pipe, not just with DEVELOPER 2009-01-18 15:40:44 +01:00
Volker Lendecke
6d47418bc1 Make cli_api_pipe async
Also move the transport switch to this routine
2009-01-18 15:40:43 +01:00
Volker Lendecke
173d6c84a6 Remove sync rpc_read wrapper 2009-01-18 15:40:43 +01:00
Volker Lendecke
5d71fe8043 Make cli_pipe_get_current_pdu async, rename it to get_current_pdu 2009-01-18 15:40:43 +01:00
Volker Lendecke
30413f12b9 Make rpc_read async 2009-01-18 15:40:43 +01:00
Volker Lendecke
9b3c38f4af Slightly simplify the paths after rpc_api_pipe() 2009-01-17 11:27:32 +01:00
Volker Lendecke
8c983af56d Make rpc_read look like a real read call
It doesn't really need to know about prs_structs
2009-01-14 17:08:40 +01:00
Volker Lendecke
e1aeb486e8 Make rpc_read() match the control flow normally used in Samba
Replace do { .. } while () with a while () { .. }
2009-01-14 17:08:40 +01:00
Volker Lendecke
11e3388083 Simplify rpc_read a bit
rpc_read always reads the whole bytes it was asked to read. So it is not really
necessary for it to update the current_pdu_offset, for clarity this can better
be done in the caller.
2009-01-14 17:08:39 +01:00
Volker Lendecke
15dd11b31e Remove an unnecessary size check
rpc_read is only ever called with at most fraglen-RPC_HEADER_SIZE length
2009-01-14 17:08:39 +01:00
Volker Lendecke
274f575b24 Check the fragment size the server has sent us 2009-01-14 17:08:39 +01:00
Volker Lendecke
583d7913c8 Slightly simplify rpc_read: It should not do the resize 2009-01-14 17:08:39 +01:00
Volker Lendecke
87f9f0b01a Always read with offset 0 from a named pipe 2009-01-14 17:08:39 +01:00
Volker Lendecke
ce5eded7e0 Move cli_api_pipe() to its only user cli_pipe.c 2009-01-11 22:53:24 +01:00
Volker Lendecke
19b783cce9 Async wrapper for open_socket_out_send/recv 2009-01-04 16:42:40 +01:00
Volker Lendecke
fafb9ecc61 open_socket_out is always used with SOCK_STREAM, remove argument "type" 2009-01-03 19:22:06 +01:00
Günther Deschner
b883bcd4ff s3: store user session key in cli_rpc_pipe_open_noauth().
Guenther
2008-12-05 14:27:03 +01:00
Günther Deschner
7f8bc6a2d9 errors: share dcerpc error function.
Guenther
2008-10-31 12:42:09 +01:00
Jelmer Vernooij
2d89b52be8 Use separate make variables for libutil and libcrypto. 2008-10-18 14:28:40 +02:00
Jeremy Allison
969a2fc4dd Don't use debug level 1 to log a trivial message.
Jeremy.
2008-10-15 18:07:15 -07:00
Volker Lendecke
29dd253e69 Tiny logic simplification: remove an else branch
(This used to be commit 9c4905ed67)
2008-09-03 13:52:13 +02:00
Günther Deschner
a77c9285b7 fix another build warning.
Guenther
(This used to be commit 43693ce6c6)
2008-08-20 22:07:40 +02:00
Volker Lendecke
a20c498310 Remove unused function rpccli_is_pipe_idx
(This used to be commit 287ffc17a0)
2008-07-21 14:36:31 +02:00
Volker Lendecke
303f98af2f Remove now unused cli_get_pipe_name
(This used to be commit ed4a447103)
2008-07-21 14:36:30 +02:00
Volker Lendecke
346a8d1bdc Remove now unused cli_get_pipe_idx
(This used to be commit e02a550527)
2008-07-21 14:36:29 +02:00
Volker Lendecke
9664f24ecf Remove now unused cli_get_iface
(This used to be commit 2e60701e8d)
2008-07-21 14:36:28 +02:00