diff options
author | Günther Deschner <gd@samba.org> | 2016-11-02 18:17:58 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2017-05-09 20:44:17 +0200 |
commit | cb17fcc5f53f336d802f6105e6bf3239ac2106a4 (patch) | |
tree | 9fcb30eaf967f8be127344db80fe4c3affef9f37 | |
parent | dceb6dc3864206a6562d02499f066e21a61e60d0 (diff) | |
download | samba-cb17fcc5f53f336d802f6105e6bf3239ac2106a4.tar.gz |
s3-spoolss: add winreg_del_driver_package_internal()
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue May 9 20:44:17 CEST 2017 on sn-devel-144
-rw-r--r-- | source3/rpc_server/spoolss/srv_spoolss_util.c | 30 | ||||
-rw-r--r-- | source3/rpc_server/spoolss/srv_spoolss_util.h | 5 |
2 files changed, 35 insertions, 0 deletions
diff --git a/source3/rpc_server/spoolss/srv_spoolss_util.c b/source3/rpc_server/spoolss/srv_spoolss_util.c index 3cbb03d3eae..be3c8fcddd7 100644 --- a/source3/rpc_server/spoolss/srv_spoolss_util.c +++ b/source3/rpc_server/spoolss/srv_spoolss_util.c @@ -646,6 +646,36 @@ WERROR winreg_get_driver_package_internal(TALLOC_CTX *mem_ctx, return result; } +WERROR winreg_del_driver_package_internal(TALLOC_CTX *mem_ctx, + const struct auth_session_info *session_info, + struct messaging_context *msg_ctx, + const char *package_id, + const char *architecture) +{ + 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_del_driver_package(mem_ctx, + b, + package_id, + architecture); + + 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 0c850ca282b..a9b3072ff82 100644 --- a/source3/rpc_server/spoolss/srv_spoolss_util.h +++ b/source3/rpc_server/spoolss/srv_spoolss_util.h @@ -182,4 +182,9 @@ WERROR winreg_get_driver_package_internal(TALLOC_CTX *mem_ctx, const char *architecture, const char **driver_store_path, const char **cab_path); +WERROR winreg_del_driver_package_internal(TALLOC_CTX *mem_ctx, + const struct auth_session_info *session_info, + struct messaging_context *msg_ctx, + const char *package_id, + const char *architecture); #endif /* _SRV_SPOOLSS_UITL_H */ |