diff options
author | Günther Deschner <gd@samba.org> | 2016-10-31 17:43:58 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2017-05-09 16:43:13 +0200 |
commit | 5eeb178fe8942b0a4c41dee4ed1195ffa4ab524e (patch) | |
tree | 912a6f963a20d6f7c48d2e3ed92736d704b146e0 /source3/rpc_server/spoolss | |
parent | 071faf59dc528a78f724a48b20754318da252968 (diff) | |
download | samba-5eeb178fe8942b0a4c41dee4ed1195ffa4ab524e.tar.gz |
s3-spoolss: add winreg_get_core_driver_internal()
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/rpc_server/spoolss')
-rw-r--r-- | source3/rpc_server/spoolss/srv_spoolss_util.c | 33 | ||||
-rw-r--r-- | source3/rpc_server/spoolss/srv_spoolss_util.h | 7 |
2 files changed, 40 insertions, 0 deletions
diff --git a/source3/rpc_server/spoolss/srv_spoolss_util.c b/source3/rpc_server/spoolss/srv_spoolss_util.c index 17acf515eb9..dd36c416da3 100644 --- a/source3/rpc_server/spoolss/srv_spoolss_util.c +++ b/source3/rpc_server/spoolss/srv_spoolss_util.c @@ -516,6 +516,39 @@ WERROR winreg_add_driver_internal(TALLOC_CTX *mem_ctx, return result; } +WERROR winreg_get_core_driver_internal(TALLOC_CTX *mem_ctx, + const struct auth_session_info *session_info, + struct messaging_context *msg_ctx, + const char *architecture, + const struct GUID *core_driver_guid, + struct spoolss_CorePrinterDriver **core_printer_driver) +{ + WERROR result; + struct dcerpc_binding_handle *b; + TALLOC_CTX *tmp_ctx; + + tmp_ctx = talloc_stackframe(); + if (tmp_ctx == NULL) { + return WERR_NOT_ENOUGH_MEMORY; + } + + result = winreg_printer_binding_handle(tmp_ctx, session_info, msg_ctx, &b); + if (!W_ERROR_IS_OK(result)) { + talloc_free(tmp_ctx); + return result; + } + + result = winreg_get_core_driver(mem_ctx, + b, + architecture, + core_driver_guid, + core_printer_driver); + + talloc_free(tmp_ctx); + return result; +} + + WERROR winreg_get_printer_secdesc_internal(TALLOC_CTX *mem_ctx, const struct auth_session_info *session_info, struct messaging_context *msg_ctx, diff --git a/source3/rpc_server/spoolss/srv_spoolss_util.h b/source3/rpc_server/spoolss/srv_spoolss_util.h index 8d6fb7848ee..3204a76de9b 100644 --- a/source3/rpc_server/spoolss/srv_spoolss_util.h +++ b/source3/rpc_server/spoolss/srv_spoolss_util.h @@ -157,4 +157,11 @@ WERROR winreg_enum_printer_key_internal(TALLOC_CTX *mem_ctx, const char *key, uint32_t *pnum_subkeys, const char ***psubkeys); +WERROR winreg_get_core_driver_internal(TALLOC_CTX *mem_ctx, + const struct auth_session_info *session_info, + struct messaging_context *msg_ctx, + const char *architecture, + const struct GUID *core_driver_guid, + struct spoolss_CorePrinterDriver **core_printer_driver); + #endif /* _SRV_SPOOLSS_UITL_H */ |