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

42 Commits

Author SHA1 Message Date
Volker Lendecke
e742661bd2 tstream: Add tstream_npa_existing_stream()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Apr  1 20:36:19 UTC 2021 on sn-devel-184
2021-04-01 20:36:19 +00:00
Volker Lendecke
1b47dd65a3 tstream_npa: Allow NULL output parameters
When reading the info4, the substructs might not be interesting for
you.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-04-01 19:32:36 +00:00
Volker Lendecke
bbfdf2708e tstream_npa: Return named_pipe_auth_req_info4 from accept_existing
Callers might want the full picture. We need to make
named_pipe_auth_req_info4 public for that.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-04-01 19:32:36 +00:00
Volker Lendecke
3a03c0a1ad tstream_npa: Keep "named_pipe_auth_req" around in tstream_npa_accept_existing_send()/recv()
This will make it simpler to return a copy of the struct
named_pipe_auth_req_info4 in the next commit.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-04-01 19:32:36 +00:00
Volker Lendecke
833fcdc024 libcli: Simplify tstream_npa_connect_readv_done()
tevent_req_error takes care of the ==0 case

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-03-09 22:36:28 +00:00
Volker Lendecke
9d656edffb libcli: Add a NULL check to tstream_npa
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-03-09 22:36:28 +00:00
Samuel Cabrero
27b01d0aa3 tstream_npa: Set local server name in auth requests
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2019-10-18 16:07:35 +00:00
Volker Lendecke
60e31c5556 rpc: Convert npa_tstream.c to use tstream_u32_read_send
This avoids a bit of code duplication. Overall the last two commits
add a few lines, but that also contains the header file and another GPL
header for tstream_u32_read.c.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Apr  5 01:00:48 UTC 2019 on sn-devel-144
2019-04-05 01:00:48 +00:00
Volker Lendecke
05c358759c rpc: Add tstream_u32_read
In npa_tstream.c we have two next_vector functions reading a big
endian uin32_t length and then the blob described by the length. This
factors that next_vector out into a central routine.

Why? I'll add another NPA protocol in the future, and this would add
yet another two copies of that next_vector code

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-04-05 00:00:10 +00:00
Volker Lendecke
a80ea6bf4f rpc: Fix a typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Apr  3 17:53:30 UTC 2019 on sn-devel-144
2019-04-03 17:53:30 +00:00
Volker Lendecke
7bea354125 tstream_npa: Avoid an unnecessary ZERO_STRUCTP
tevent_req_create already zeros out "state"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-03-22 18:02:17 +00:00
Volker Lendecke
636c09c813 libcli: Add a comment explaining lack of overflow checks
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-03-18 19:21:23 +00:00
Mathieu Parent
f74090c817 Fix spelling s/conection/connection/
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2018-05-12 02:09:26 +02:00
Gary Lockyer
68200d0d88 named_pipe_auth: Rename client -> remote_client and server -> local_server
While these names may have been clear, much of Samba uses
remote_address and local_address, and this difference has hidden bugs.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-by: Gary Lockyer <gary@catalyst.net.nz>
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
2017-03-29 02:37:28 +02:00
Stefan Metzmacher
fcf0d3ebef libcli/named_pipe_auth: call smb_set_close_on_exec() in tstream_npa_socketpair()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11312

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2015-06-05 14:33:19 +02:00
Volker Lendecke
ab26e84da1 tstream: Make socketpair nonblocking
When we have a large RPC reply, we can't block in the RPC server.

Test: Do rpcclient netshareenumall with a thousand shares defined

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-06-04 01:02:26 +02:00
Andreas Schneider
fa8c2b1578 libcli: Fix the comment for the address.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2014-01-17 14:50:30 +01:00
Andreas Schneider
eec05fb70f libcli: Add tstream_npa_socketpair() function.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-29 15:31:45 +01:00
Andrew Bartlett
7891848357 libcli/smb move FILE_TYPE constants in common
This allows us to remove another _SAMBA_BUILD_ conditional

Andrew Bartlett
2011-07-06 05:32:59 +02:00
Günther Deschner
89ceb48978 libcli/named_pipe_auth: add forward declaration in npa_tstream.h.
Guenther
2011-05-02 15:03:43 +02:00
Andrew Tridgell
5adf85e6af tstream: make npa_tstream a private library
this prevents symbol duplication of the npa_tstream symbols

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-04-06 08:12:19 +02:00
Andrew Bartlett
d66150c14d libcli/named_pipe_auth Change from 'info3' to auth_session_info_transport
This changes the structure being used to convey the current user state
from the netlogon-derived 'netr_SamInfo3' structure to a purpose-built
structure that matches the internals of the Samba auth subsystem and
contains the final group list, as well as the final privilege set and
session key.

These previously had to be re-created on the server side of the pipe
each time.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-02-10 06:51:06 +01:00
Andrew Bartlett
543ef3b5bf libcli/named_pipe_auth Remove support for unused levels 0-2.
The only client and server for this code uses level 3 exclusively.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-02-10 06:51:06 +01:00
Volker Lendecke
eb769f2234 raw.h is only needed in the S4 build
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Nov  9 14:49:14 UTC 2010 on sn-devel-104
2010-11-09 14:49:14 +00:00
Jelmer Vernooij
3deece5591 s4: Remove the old perl/m4/make/mk-based build system.
The new waf-based build system now has all the same functionality, and
the old build system has been broken for quite some time.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct 31 02:01:44 UTC 2010 on sn-devel-104
2010-10-31 02:01:44 +00:00
Matthias Dieter Wallnöfer
5c33ef2758 s3/s4:libcli/tstream - add more "char *" casts in order to suppress Solaris warnings 2010-09-10 22:45:49 +02:00
Stefan Metzmacher
eb3ee7801f libcli/named_pipe_auth: fix error handling in _tstream_npa_connect_recv()
metze
2010-06-21 16:20:25 +02:00
Stefan Metzmacher
67a24fe933 libcli/named_pipe_auth: fix memory handling for temporary data
In a tevent_req based function tevent_req_create() should be the first
function! If it fails it's the only reason, why the function
could every return NULL.

And all temporary data belongs to 'state' and gets free'ed by
tevent_req_received() in the _recv function.

metze
2010-06-21 16:16:15 +02:00
Matthias Dieter Wallnöfer
276a1a7fec s3/s4 - remove "talloc_tos()" from common code since s4 doesn't support it
Please don't use this in common code parts until we change the policy regarding
it.
2010-06-21 12:35:51 +02:00
Jeremy Allison
c705c35076 Fix warning messages about unused result of talloc_move. We're really talloc_steal'ing here. 2010-06-14 16:26:13 -07:00
Andrew Bartlett
d25e9ab9a1 named_pipe_auth Always lower case the incoming pipe name
Windows connects to an upper case NETLOGON pipe, and we can't find the
socket to connect to until we lower case the name.

Andrew Bartlett
2010-06-07 23:34:28 +10:00
Simo Sorce
b7159e6ffd named_pipe_auth: implement tstream_npa_accept_existing_send/recv
Pair-programmed-with: Stefan Metzmacher <metze@samba.org>
2010-05-26 09:23:47 +02:00
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
Stefan Metzmacher
21ec116bbf libcli/named_pipe_auth: we need to hide length of the message mode header from the caller
metze
2010-04-28 15:45:38 +02:00
Andrew Tridgell
b690fedef5 s4-waf: removed the AUTOGENERATED markers
we won't be using the mk -> wscript generator again
2010-04-06 20:27:16 +10:00
Andrew Tridgell
f9eae32f4b s4-waf: mark the wscript files as python so vim/emacs knows how to highlight them 2010-04-06 20:27:11 +10:00
Andrew Tridgell
845e0cbe6f build: commit all the waf build files in the tree 2010-04-06 20:26:48 +10:00
Stefan Metzmacher
825484ee6d libcli/named_pipe_auth: pass gssapi delegated credentials through the named pipe
metze
2009-09-18 20:34:42 +02:00
Volker Lendecke
831b73ec82 Fix an unitialized variable warning 2009-05-10 07:43:24 +02:00
Tim Prouty
72bd5ff983 libcli: Fix shadowed name in header also 2009-05-04 14:38:59 -07:00
Tim Prouty
032bb807c7 libcli: Fix shadowed variable warning 2009-05-04 08:52:26 -07:00
Stefan Metzmacher
92a1890b90 libcli/named_pipe_auth: add tstream_npa_connect_send/recv()
Add a tstream client implemenation for the named pipe auth
code. This supports byte and message mode.

metze
2009-05-01 17:42:08 +02:00