diff options
author | Stefan Metzmacher <metze@samba.org> | 2017-07-10 11:29:58 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-07-10 23:22:10 +0200 |
commit | 77cbced5d2f8bf65c8d02f5edfaba8cbad519d08 (patch) | |
tree | 9af3709dcd0242f7af8223c2214f0bf12490f3bc | |
parent | 305eb1b6f4e963ddf07ddf13e9f375248130a240 (diff) | |
download | samba-77cbced5d2f8bf65c8d02f5edfaba8cbad519d08.tar.gz |
s3:smbd: consistently use talloc_tos() memory for rpc_pipe_open_interface()
The result is only used temporary and should not be leaked on a long term
memory context as 'conn'.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12890
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r-- | source3/smbd/lanman.c | 20 | ||||
-rw-r--r-- | source3/smbd/reply.c | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index c3e540ff810..6854527500d 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -831,7 +831,7 @@ static bool api_DosPrintQGetInfo(struct smbd_server_connection *sconn, goto out; } - status = rpc_pipe_open_interface(conn, + status = rpc_pipe_open_interface(mem_ctx, &ndr_table_spoolss, conn->session_info, conn->sconn->remote_address, @@ -1029,7 +1029,7 @@ static bool api_DosPrintQEnum(struct smbd_server_connection *sconn, return(True); } - status = rpc_pipe_open_interface(conn, + status = rpc_pipe_open_interface(mem_ctx, &ndr_table_spoolss, conn->session_info, conn->sconn->remote_address, @@ -3144,7 +3144,7 @@ static bool api_RDosPrintJobDel(struct smbd_server_connection *sconn, ZERO_STRUCT(handle); - status = rpc_pipe_open_interface(conn, + status = rpc_pipe_open_interface(mem_ctx, &ndr_table_spoolss, conn->session_info, conn->sconn->remote_address, @@ -3273,7 +3273,7 @@ static bool api_WPrintQueueCtrl(struct smbd_server_connection *sconn, ZERO_STRUCT(handle); - status = rpc_pipe_open_interface(conn, + status = rpc_pipe_open_interface(mem_ctx, &ndr_table_spoolss, conn->session_info, conn->sconn->remote_address, @@ -3456,7 +3456,7 @@ static bool api_PrintJobInfo(struct smbd_server_connection *sconn, ZERO_STRUCT(handle); - status = rpc_pipe_open_interface(conn, + status = rpc_pipe_open_interface(mem_ctx, &ndr_table_spoolss, conn->session_info, conn->sconn->remote_address, @@ -4601,7 +4601,7 @@ static bool api_WPrintJobGetInfo(struct smbd_server_connection *sconn, ZERO_STRUCT(handle); - status = rpc_pipe_open_interface(conn, + status = rpc_pipe_open_interface(mem_ctx, &ndr_table_spoolss, conn->session_info, conn->sconn->remote_address, @@ -4744,7 +4744,7 @@ static bool api_WPrintJobEnumerate(struct smbd_server_connection *sconn, ZERO_STRUCT(handle); - status = rpc_pipe_open_interface(conn, + status = rpc_pipe_open_interface(mem_ctx, &ndr_table_spoolss, conn->session_info, conn->sconn->remote_address, @@ -4945,7 +4945,7 @@ static bool api_WPrintDestGetInfo(struct smbd_server_connection *sconn, ZERO_STRUCT(handle); - status = rpc_pipe_open_interface(conn, + status = rpc_pipe_open_interface(mem_ctx, &ndr_table_spoolss, conn->session_info, conn->sconn->remote_address, @@ -5078,7 +5078,7 @@ static bool api_WPrintDestEnum(struct smbd_server_connection *sconn, queuecnt = 0; - status = rpc_pipe_open_interface(conn, + status = rpc_pipe_open_interface(mem_ctx, &ndr_table_spoolss, conn->session_info, conn->sconn->remote_address, @@ -5390,7 +5390,7 @@ static bool api_RNetSessionEnum(struct smbd_server_connection *sconn, return False; } - status = rpc_pipe_open_interface(conn, + status = rpc_pipe_open_interface(mem_ctx, &ndr_table_srvsvc, conn->session_info, conn->sconn->remote_address, diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index e430a8e2d0f..d102b7a876c 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -5942,7 +5942,7 @@ void reply_printqueue(struct smb_request *req) ZERO_STRUCT(handle); - status = rpc_pipe_open_interface(conn, + status = rpc_pipe_open_interface(mem_ctx, &ndr_table_spoolss, conn->session_info, conn->sconn->remote_address, |