diff options
author | Volker Lendecke <vl@samba.org> | 2010-08-08 09:22:05 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-08-08 16:03:15 +0200 |
commit | 2d3623529fed0be2945cecfb19cef579e5af057e (patch) | |
tree | ca228e11cb6500c2ecd4469d772b08689f5f61df | |
parent | 33256d6478381af3bee9ef064566e69cb4943c39 (diff) | |
download | samba-2d3623529fed0be2945cecfb19cef579e5af057e.tar.gz samba-2d3623529fed0be2945cecfb19cef579e5af057e.tar.bz2 samba-2d3623529fed0be2945cecfb19cef579e5af057e.zip |
s3: Lift the smbd_messaging_context from rpc_pipe_open_internal
-rw-r--r-- | source3/include/proto.h | 4 | ||||
-rw-r--r-- | source3/printing/nt_printing_migrate.c | 1 | ||||
-rw-r--r-- | source3/rpc_server/rpc_ncacn_np_internal.c | 4 | ||||
-rw-r--r-- | source3/rpc_server/srv_netlog_nt.c | 3 | ||||
-rw-r--r-- | source3/rpc_server/srv_pipe_hnd.c | 2 | ||||
-rw-r--r-- | source3/rpc_server/srv_spoolss_util.c | 1 | ||||
-rw-r--r-- | source3/smbd/lanman.c | 11 | ||||
-rw-r--r-- | source3/winbindd/winbindd_samr.c | 2 |
8 files changed, 22 insertions, 6 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index c0d9963183..4937c62024 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -4499,8 +4499,10 @@ struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx, const char *client_address, struct auth_serversupplied_info *server_info, struct messaging_context *msg_ctx); -NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *abstract_syntax, +NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx, + const struct ndr_syntax_id *abstract_syntax, struct auth_serversupplied_info *serversupplied_info, + struct messaging_context *msg_ctx, struct rpc_pipe_client **presult); NTSTATUS rpc_connect_spoolss_pipe(connection_struct *conn, struct rpc_pipe_client **spoolss_pipe); diff --git a/source3/printing/nt_printing_migrate.c b/source3/printing/nt_printing_migrate.c index 7e7db562ec..aaf1d4f752 100644 --- a/source3/printing/nt_printing_migrate.c +++ b/source3/printing/nt_printing_migrate.c @@ -613,6 +613,7 @@ bool nt_printing_tdb_migrate(void) status = rpc_pipe_open_internal(tmp_ctx, &ndr_table_spoolss.syntax_id, server_info, + smbd_messaging_context(), &spoolss_pipe); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("Couldn't open internal spoolss pipe: %s\n", diff --git a/source3/rpc_server/rpc_ncacn_np_internal.c b/source3/rpc_server/rpc_ncacn_np_internal.c index 2d50c5cd5c..9d15e0d3f9 100644 --- a/source3/rpc_server/rpc_ncacn_np_internal.c +++ b/source3/rpc_server/rpc_ncacn_np_internal.c @@ -347,6 +347,7 @@ static NTSTATUS rpc_pipe_internal_dispatch(struct rpc_pipe_client *cli, NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *abstract_syntax, struct auth_serversupplied_info *serversupplied_info, + struct messaging_context *msg_ctx, struct rpc_pipe_client **presult) { struct rpc_pipe_client *result; @@ -361,8 +362,7 @@ NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx, result->dispatch = rpc_pipe_internal_dispatch; result->pipes_struct = make_internal_rpc_pipe_p( - result, abstract_syntax, "", serversupplied_info, - smbd_messaging_context()); + result, abstract_syntax, "", serversupplied_info, msg_ctx); if (result->pipes_struct == NULL) { TALLOC_FREE(result); return NT_STATUS_NO_MEMORY; diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c index 300d2d4bf6..393d2b70fa 100644 --- a/source3/rpc_server/srv_netlog_nt.c +++ b/source3/rpc_server/srv_netlog_nt.c @@ -406,6 +406,7 @@ NTSTATUS _netr_NetrEnumerateTrustedDomains(struct pipes_struct *p, status = rpc_pipe_open_internal(p->mem_ctx, &ndr_table_lsarpc.syntax_id, p->server_info, + p->msg_ctx, &cli); if (!NT_STATUS_IS_OK(status)) { return status; @@ -629,6 +630,7 @@ static NTSTATUS get_md4pw(struct samr_Password *md4pw, const char *mach_acct, status = rpc_pipe_open_internal(mem_ctx, &ndr_table_samr.syntax_id, server_info, + smbd_messaging_context(), &cli); if (!NT_STATUS_IS_OK(status)) { goto out; @@ -1032,6 +1034,7 @@ static NTSTATUS netr_set_machine_account_password(TALLOC_CTX *mem_ctx, status = rpc_pipe_open_internal(mem_ctx, &ndr_table_samr.syntax_id, server_info, + smbd_messaging_context(), &cli); if (!NT_STATUS_IS_OK(status)) { goto out; diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index ea04164f13..37efe061c3 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -24,6 +24,7 @@ #include "librpc/gen_ndr/ndr_named_pipe_auth.h" #include "../libcli/named_pipe_auth/npa_tstream.h" #include "rpc_server.h" +#include "smbd/globals.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV @@ -929,6 +930,7 @@ NTSTATUS rpc_connect_spoolss_pipe(connection_struct *conn, status = rpc_pipe_open_internal(conn, &ndr_table_spoolss.syntax_id, conn->server_info, + conn->sconn->msg_ctx, &conn->spoolss_pipe); if (!NT_STATUS_IS_OK(status)) { return status; diff --git a/source3/rpc_server/srv_spoolss_util.c b/source3/rpc_server/srv_spoolss_util.c index f8b29fc3b3..6f897dcc52 100644 --- a/source3/rpc_server/srv_spoolss_util.c +++ b/source3/rpc_server/srv_spoolss_util.c @@ -261,6 +261,7 @@ static WERROR winreg_printer_openkey(TALLOC_CTX *mem_ctx, status = rpc_pipe_open_internal(mem_ctx, &ndr_table_winreg.syntax_id, server_info, + smbd_messaging_context(), &pipe_handle); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("winreg_printer_openkey: Could not connect to winreg_pipe: %s\n", diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index ce7ad0e56d..2be2a8c4ac 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -2236,6 +2236,7 @@ static bool api_RNetShareAdd(struct smbd_server_connection *sconn, status = rpc_pipe_open_internal(mem_ctx, &ndr_table_srvsvc.syntax_id, conn->server_info, + conn->sconn->msg_ctx, &cli); if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("api_RNetShareAdd: could not connect to srvsvc: %s\n", @@ -2342,7 +2343,7 @@ static bool api_RNetGroupEnum(struct smbd_server_connection *sconn, status = rpc_pipe_open_internal( talloc_tos(), &ndr_table_samr.syntax_id, - conn->server_info, &samr_pipe); + conn->server_info, conn->sconn->msg_ctx, &samr_pipe); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("api_RNetUserEnum: Could not connect to samr: %s\n", nt_errstr(status))); @@ -2524,7 +2525,7 @@ static bool api_NetUserGetGroups(struct smbd_server_connection *sconn, status = rpc_pipe_open_internal( talloc_tos(), &ndr_table_samr.syntax_id, - conn->server_info, &samr_pipe); + conn->server_info, conn->sconn->msg_ctx, &samr_pipe); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("api_RNetUserEnum: Could not connect to samr: %s\n", nt_errstr(status))); @@ -2680,7 +2681,7 @@ static bool api_RNetUserEnum(struct smbd_server_connection *sconn, status = rpc_pipe_open_internal( talloc_tos(), &ndr_table_samr.syntax_id, - conn->server_info, &samr_pipe); + conn->server_info, conn->sconn->msg_ctx, &samr_pipe); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("api_RNetUserEnum: Could not connect to samr: %s\n", nt_errstr(status))); @@ -2923,6 +2924,7 @@ static bool api_SetUserPassword(struct smbd_server_connection *sconn, status = rpc_pipe_open_internal(mem_ctx, &ndr_table_samr.syntax_id, conn->server_info, + conn->sconn->msg_ctx, &cli); if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("api_SetUserPassword: could not connect to samr: %s\n", @@ -3139,6 +3141,7 @@ static bool api_SamOEMChangePassword(struct smbd_server_connection *sconn, status = rpc_pipe_open_internal(mem_ctx, &ndr_table_samr.syntax_id, conn->server_info, + conn->sconn->msg_ctx, &cli); if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("api_SamOEMChangePassword: could not connect to samr: %s\n", @@ -3692,6 +3695,7 @@ static bool api_RNetServerGetInfo(struct smbd_server_connection *sconn, status = rpc_pipe_open_internal(mem_ctx, &ndr_table_srvsvc.syntax_id, conn->server_info, + conn->sconn->msg_ctx, &cli); if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("api_RNetServerGetInfo: could not connect to srvsvc: %s\n", @@ -4114,6 +4118,7 @@ static bool api_RNetUserGetInfo(struct smbd_server_connection *sconn, status = rpc_pipe_open_internal(mem_ctx, &ndr_table_samr.syntax_id, conn->server_info, + conn->sconn->msg_ctx, &cli); if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("api_RNetUserGetInfo: could not connect to samr: %s\n", diff --git a/source3/winbindd/winbindd_samr.c b/source3/winbindd/winbindd_samr.c index e9e3e6f30d..05ba7a7260 100644 --- a/source3/winbindd/winbindd_samr.c +++ b/source3/winbindd/winbindd_samr.c @@ -61,6 +61,7 @@ static NTSTATUS open_internal_samr_pipe(TALLOC_CTX *mem_ctx, status = rpc_pipe_open_internal(mem_ctx, &ndr_table_samr.syntax_id, server_info, + winbind_messaging_context(), &cli); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("open_samr_pipe: Could not connect to samr_pipe: %s\n", @@ -132,6 +133,7 @@ static NTSTATUS open_internal_lsa_pipe(TALLOC_CTX *mem_ctx, status = rpc_pipe_open_internal(mem_ctx, &ndr_table_lsarpc.syntax_id, server_info, + winbind_messaging_context(), &cli); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("open_lsa_pipe: Could not connect to lsa_pipe: %s\n", |