diff options
author | Volker Lendecke <vl@samba.org> | 2010-08-08 10:52:19 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-08-08 16:03:19 +0200 |
commit | ae6a3ac22503fe342e7e04f83dd6c7a449e204ea (patch) | |
tree | 2b5922d6e9706a8c2fb2c6d4dd0044bf398ec0f2 /source3/rpc_server | |
parent | 3a85d0c79a660555b5dfaaf38340900edb624d3f (diff) | |
download | samba-ae6a3ac22503fe342e7e04f83dd6c7a449e204ea.tar.gz samba-ae6a3ac22503fe342e7e04f83dd6c7a449e204ea.tar.bz2 samba-ae6a3ac22503fe342e7e04f83dd6c7a449e204ea.zip |
s3: Lift the smbd_messaging_context from winreg_get_driver
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 21 | ||||
-rw-r--r-- | source3/rpc_server/srv_spoolss_util.c | 7 | ||||
-rw-r--r-- | source3/rpc_server/srv_spoolss_util.h | 1 |
3 files changed, 19 insertions, 10 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 04208d5267..43ae480d24 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -1839,7 +1839,7 @@ WERROR _spoolss_DeletePrinterDriver(struct pipes_struct *p, if ((version = get_version_id(r->in.architecture)) == -1) return WERR_INVALID_ENVIRONMENT; - status = winreg_get_driver(p->mem_ctx, p->server_info, + status = winreg_get_driver(p->mem_ctx, p->server_info, p->msg_ctx, r->in.architecture, r->in.driver, version, &info); if (!W_ERROR_IS_OK(status)) { @@ -1849,6 +1849,7 @@ WERROR _spoolss_DeletePrinterDriver(struct pipes_struct *p, version = 3; status = winreg_get_driver(p->mem_ctx, p->server_info, + p->msg_ctx, r->in.architecture, r->in.driver, version, &info); @@ -1872,6 +1873,7 @@ WERROR _spoolss_DeletePrinterDriver(struct pipes_struct *p, if (version == 2) { status = winreg_get_driver(p->mem_ctx, p->server_info, + p->msg_ctx, r->in.architecture, r->in.driver, 3, &info_win2k); if (W_ERROR_IS_OK(status)) { @@ -1936,8 +1938,8 @@ WERROR _spoolss_DeletePrinterDriverEx(struct pipes_struct *p, version = r->in.version; status = winreg_get_driver(p->mem_ctx, p->server_info, - r->in.architecture, r->in.driver, - version, &info); + p->msg_ctx, r->in.architecture, + r->in.driver, version, &info); if (!W_ERROR_IS_OK(status)) { status = WERR_UNKNOWN_PRINTER_DRIVER; @@ -1953,7 +1955,7 @@ WERROR _spoolss_DeletePrinterDriverEx(struct pipes_struct *p, /* try for Win2k driver if "Windows NT x86" */ version = 3; - status = winreg_get_driver(info, p->server_info, + status = winreg_get_driver(info, p->server_info, p->msg_ctx, r->in.architecture, r->in.driver, version, &info); @@ -1996,7 +1998,7 @@ WERROR _spoolss_DeletePrinterDriverEx(struct pipes_struct *p, /* also check for W32X86/3 if necessary; maybe we already have? */ if ( (version == 2) && ((r->in.delete_flags & DPD_DELETE_SPECIFIC_VERSION) != DPD_DELETE_SPECIFIC_VERSION) ) { - status = winreg_get_driver(info, p->server_info, + status = winreg_get_driver(info, p->server_info, p->msg_ctx, r->in.architecture, r->in.driver, 3, &info_win2k); if (W_ERROR_IS_OK(status)) { @@ -4990,7 +4992,9 @@ static WERROR construct_printer_driver_info_level(TALLOC_CTX *mem_ctx, return WERR_INVALID_PRINTER_NAME; } - result = winreg_get_driver(mem_ctx, server_info, architecture, + result = winreg_get_driver(mem_ctx, server_info, + smbd_messaging_context(), + architecture, pinfo2->drivername, version, &driver); DEBUG(8,("construct_printer_driver_info_level: status: %s\n", @@ -5008,7 +5012,9 @@ static WERROR construct_printer_driver_info_level(TALLOC_CTX *mem_ctx, /* Yes - try again with a WinNT driver. */ version = 2; - result = winreg_get_driver(mem_ctx, server_info, architecture, + result = winreg_get_driver(mem_ctx, server_info, + smbd_messaging_context(), + architecture, pinfo2->drivername, version, &driver); DEBUG(8,("construct_printer_driver_level: status: %s\n", @@ -6736,6 +6742,7 @@ static WERROR enumprinterdrivers_level_by_architecture(TALLOC_CTX *mem_ctx, DEBUG(5, ("\tdriver: [%s]\n", drivers[i])); result = winreg_get_driver(mem_ctx, server_info, + smbd_messaging_context(), architecture, drivers[i], version, &driver); if (!W_ERROR_IS_OK(result)) { diff --git a/source3/rpc_server/srv_spoolss_util.c b/source3/rpc_server/srv_spoolss_util.c index ac32fbc454..668fec7bb1 100644 --- a/source3/rpc_server/srv_spoolss_util.c +++ b/source3/rpc_server/srv_spoolss_util.c @@ -3993,6 +3993,7 @@ done: WERROR winreg_get_driver(TALLOC_CTX *mem_ctx, struct auth_serversupplied_info *server_info, + struct messaging_context *msg_ctx, const char *architecture, const char *driver_name, uint32_t driver_version, @@ -4022,7 +4023,7 @@ WERROR winreg_get_driver(TALLOC_CTX *mem_ctx, /* look for Win2k first and then for NT4 */ result = winreg_printer_opendriver(tmp_ctx, server_info, - smbd_messaging_context(), + msg_ctx, driver_name, architecture, 3, @@ -4033,7 +4034,7 @@ WERROR winreg_get_driver(TALLOC_CTX *mem_ctx, if (!W_ERROR_IS_OK(result)) { result = winreg_printer_opendriver(tmp_ctx, server_info, - smbd_messaging_context(), + msg_ctx, driver_name, architecture, 2, @@ -4046,7 +4047,7 @@ WERROR winreg_get_driver(TALLOC_CTX *mem_ctx, /* ok normal case */ result = winreg_printer_opendriver(tmp_ctx, server_info, - smbd_messaging_context(), + msg_ctx, driver_name, architecture, driver_version, diff --git a/source3/rpc_server/srv_spoolss_util.h b/source3/rpc_server/srv_spoolss_util.h index 6dfdc25da6..ef2d8be518 100644 --- a/source3/rpc_server/srv_spoolss_util.h +++ b/source3/rpc_server/srv_spoolss_util.h @@ -536,6 +536,7 @@ WERROR winreg_add_driver(TALLOC_CTX *mem_ctx, WERROR winreg_get_driver(TALLOC_CTX *mem_ctx, struct auth_serversupplied_info *server_info, + struct messaging_context *msg_ctx, const char *architecture, const char *driver_name, uint32_t driver_version, |