From 36493bf2f6634b84c57107bcb86bcbf3e82e80fc Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Wed, 6 Jan 2010 12:13:35 +0800 Subject: s3: Fix infinite loop in NCACN_IP_TCP asa there is no timeout. Assume lsa_pipe_tcp is ok but network is down, then send request is ok, but select() on writeable fds loops forever since there is no response. Signed-off-by: Bo Yang --- source3/include/proto.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/include/proto.h') diff --git a/source3/include/proto.h b/source3/include/proto.h index b3921c468e..d956ede4c9 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5396,6 +5396,7 @@ NTSTATUS rpc_transport_np_init(TALLOC_CTX *mem_ctx, struct cli_state *cli, const struct ndr_syntax_id *abstract_syntax, struct rpc_cli_transport **presult); struct cli_state *rpc_pipe_np_smb_conn(struct rpc_pipe_client *p); +void rpccli_close_np_fd(struct rpc_pipe_client *p); /* The following definitions come from rpc_client/rpc_transport_smbd.c */ @@ -5426,11 +5427,15 @@ NTSTATUS rpc_transport_smbd_init(TALLOC_CTX *mem_ctx, struct rpc_cli_smbd_conn *conn, const struct ndr_syntax_id *abstract_syntax, struct rpc_cli_transport **presult); +struct cli_state *rpc_pipe_smbd_smb_conn(struct rpc_pipe_client *p); /* The following definitions come from rpc_client/rpc_transport_sock.c */ NTSTATUS rpc_transport_sock_init(TALLOC_CTX *mem_ctx, int fd, struct rpc_cli_transport **presult); +int rpccli_set_sock_timeout(struct rpc_pipe_client *rpccli, int timeout); +void rpccli_close_sock_fd(struct rpc_pipe_client *rpccli); +bool rpc_pipe_tcp_connection_ok(struct rpc_pipe_client *rpccli); /* The following definitions come from rpc_client/cli_samr.c */ -- cgit From c1c7b6cecb848c35c2cead332483ce117552d6bc Mon Sep 17 00:00:00 2001 From: Björn Jacke Date: Wed, 6 Jan 2010 19:31:41 +0100 Subject: s3:lib/time: remove unused nt_time_equals we have nt_time_equal doing the same in lib/util/ --- source3/include/proto.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source3/include/proto.h') diff --git a/source3/include/proto.h b/source3/include/proto.h index d956ede4c9..af5e564e4b 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1059,7 +1059,6 @@ void cli_put_dos_date3(struct cli_state *cli, char *buf, int offset, time_t unix time_t cli_make_unix_date(struct cli_state *cli, const void *date_ptr); time_t cli_make_unix_date2(struct cli_state *cli, const void *date_ptr); time_t cli_make_unix_date3(struct cli_state *cli, const void *date_ptr); -bool nt_time_equals(const NTTIME *nt1, const NTTIME *nt2); void TimeInit(void); void get_process_uptime(struct timeval *ret_time); time_t nt_time_to_unix_abs(const NTTIME *nt); -- cgit From c5f24c3eacf8892270702eeb0e1e037a0a1b4dde Mon Sep 17 00:00:00 2001 From: Björn Jacke Date: Wed, 6 Jan 2010 21:32:35 +0100 Subject: s3:lib/time: remoce null_mtime() - use null_time() --- source3/include/proto.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source3/include/proto.h') diff --git a/source3/include/proto.h b/source3/include/proto.h index af5e564e4b..5b16120294 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1065,7 +1065,6 @@ time_t nt_time_to_unix_abs(const NTTIME *nt); time_t uint64s_nt_time_to_unix_abs(const uint64_t *src); void unix_timespec_to_nt_time(NTTIME *nt, struct timespec ts); void unix_to_nt_time_abs(NTTIME *nt, time_t t); -bool null_mtime(time_t mtime); const char *time_to_asc(const time_t t); const char *display_time(NTTIME nttime); bool nt_time_is_set(const NTTIME *nt); -- cgit