summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2010-04-21 18:12:50 +0200
committerGünther Deschner <gd@samba.org>2010-04-23 16:23:48 +0200
commitb33e877aad0485c88ba4ff0223004e92c4cb78e2 (patch)
treed8ed1625c2074c470364b39b6a356952a6e823fd /source3
parentd4f563d9d4fcefc0523cfdc5c75b2256e4f28aeb (diff)
downloadsamba-b33e877aad0485c88ba4ff0223004e92c4cb78e2.tar.gz
samba-b33e877aad0485c88ba4ff0223004e92c4cb78e2.tar.bz2
samba-b33e877aad0485c88ba4ff0223004e92c4cb78e2.zip
s3-spoolss: Added more winreg hepler functions.
Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_spoolss_util.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_spoolss_util.c b/source3/rpc_server/srv_spoolss_util.c
index 79af761b0d..a20a772f57 100644
--- a/source3/rpc_server/srv_spoolss_util.c
+++ b/source3/rpc_server/srv_spoolss_util.c
@@ -1058,6 +1058,26 @@ static WERROR winreg_enumval_to_multi_sz(TALLOC_CTX *mem_ctx,
return WERR_OK;
}
+static WERROR winreg_enumval_to_blob(TALLOC_CTX *mem_ctx,
+ struct spoolss_PrinterEnumValues *v,
+ const char *valuename,
+ DATA_BLOB *blob)
+{
+ /* just return if it is not the one we are looking for */
+ if (strcmp(valuename, v->value_name) != 0) {
+ return WERR_NOT_FOUND;
+ }
+
+ if (v->type != REG_BINARY) {
+ return WERR_INVALID_DATATYPE;
+ }
+
+ blob->data = v->data->data;
+ blob->length = v->data_length;
+
+ return WERR_OK;
+}
+
/********************************************************************
Public winreg function for spoolss
********************************************************************/