1
0
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:
Stefan Metzmacher 2009-03-12 18:10:19 +01:00
parent 2ae92c7599
commit 92a1890b90
4 changed files with 1123 additions and 0 deletions

View 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

File diff suppressed because it is too large Load Diff

View 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 */

View File

@ -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