mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
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
This commit is contained in:
parent
2ae92c7599
commit
92a1890b90
4
libcli/named_pipe_auth/config.mk
Normal file
4
libcli/named_pipe_auth/config.mk
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[SUBSYSTEM::NAMED_PIPE_AUTH_TSTREAM]
|
||||||
|
PUBLIC_DEPENDENCIES = NDR_NAMED_PIPE_AUTH TEVENT TSOCKET
|
||||||
|
|
||||||
|
NAMED_PIPE_AUTH_TSTREAM_OBJ_FILES = ../libcli/named_pipe_auth/npa_tstream.o
|
1059
libcli/named_pipe_auth/npa_tstream.c
Normal file
1059
libcli/named_pipe_auth/npa_tstream.c
Normal file
File diff suppressed because it is too large
Load Diff
59
libcli/named_pipe_auth/npa_tstream.h
Normal file
59
libcli/named_pipe_auth/npa_tstream.h
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
/*
|
||||||
|
Unix SMB/CIFS implementation.
|
||||||
|
|
||||||
|
Copyright (C) Stefan Metzmacher 2009
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef NPA_TSTREAM_H
|
||||||
|
#define NPA_TSTREAM_H
|
||||||
|
|
||||||
|
struct tevent_req;
|
||||||
|
struct tevent_context;
|
||||||
|
struct netr_SamInfo3;
|
||||||
|
|
||||||
|
struct tevent_req *tstream_npa_connect_send(TALLOC_CTX *mem_ctx,
|
||||||
|
struct tevent_context *ev,
|
||||||
|
struct smb_iconv_convenience *smb_iconv_c,
|
||||||
|
const char *directory,
|
||||||
|
const char *npipe,
|
||||||
|
const struct tsocket_address *client,
|
||||||
|
const char *client_name,
|
||||||
|
const struct tsocket_address *server,
|
||||||
|
const char *server_name,
|
||||||
|
const struct netr_SamInfo3 *info3,
|
||||||
|
DATA_BLOB session_key);
|
||||||
|
int _tstream_npa_connect_recv(struct tevent_req *req,
|
||||||
|
int *perrno,
|
||||||
|
TALLOC_CTX *mem_ctx,
|
||||||
|
struct tstream_context **stream,
|
||||||
|
uint16_t *file_type,
|
||||||
|
uint16_t *device_state,
|
||||||
|
uint64_t *allocation_size,
|
||||||
|
const char *location);
|
||||||
|
#define tstream_npa_connect_recv(req, perrno, mem_ctx, stream, f, d, a) \
|
||||||
|
_tstream_npa_connect_recv(req, perrno, mem_ctx, stream, f, d, a, \
|
||||||
|
__location__)
|
||||||
|
|
||||||
|
int _tstream_npa_existing_socket(TALLOC_CTX *mem_ctx,
|
||||||
|
int fd,
|
||||||
|
uint16_t file_type,
|
||||||
|
struct tstream_context **_stream,
|
||||||
|
const char *location);
|
||||||
|
#define tstream_npa_existing_socket(mem_ctx, fd, ft, stream) \
|
||||||
|
_tstream_npa_existing_socket(mem_ctx, fd, ft, stream, \
|
||||||
|
__location__)
|
||||||
|
|
||||||
|
#endif /* NPA_TSTREAM_H */
|
@ -57,3 +57,4 @@ mkinclude ../libcli/auth/config.mk
|
|||||||
mkinclude ../libcli/drsuapi/config.mk
|
mkinclude ../libcli/drsuapi/config.mk
|
||||||
mkinclude ../libcli/samsync/config.mk
|
mkinclude ../libcli/samsync/config.mk
|
||||||
mkinclude ../libgpo/config.mk
|
mkinclude ../libgpo/config.mk
|
||||||
|
mkinclude ../libcli/named_pipe_auth/config.mk
|
||||||
|
Loading…
Reference in New Issue
Block a user