fixup _spoolss_GetCorePrinterDrivers after idl changes
authorGünther Deschner <gd@samba.org>
Tue, 8 Nov 2016 15:50:39 +0000 (16:50 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 24 Oct 2023 13:36:29 +0000 (15:36 +0200)
source3/rpc_server/spoolss/srv_spoolss_nt.c

index d51acca0905dec2c819fc31bfc6252e6cd6fe715..c59cb5a2208157da412d7eb902fa04c393ef17dc 100644 (file)
@@ -11447,9 +11447,6 @@ HRESULT _spoolss_GetCorePrinterDrivers(struct pipes_struct *p,
        WERROR result;
        NTSTATUS status;
        const char *short_architecture;
-       const char **guid_strs;
-       DATA_BLOB blob;
-       bool ok;
        int i;
 
        if (r->in.core_printer_driver_count < 1) {
@@ -11461,15 +11458,7 @@ HRESULT _spoolss_GetCorePrinterDrivers(struct pipes_struct *p,
                return HRESULT_FROM_WERROR(WERR_INVALID_ENVIRONMENT);
        }
 
-       blob = data_blob_const((uint8_t *)r->in.core_driver_dependencies,
-                              r->in.core_driver_size*2);
-
-       ok = pull_reg_multi_sz(p->mem_ctx, &blob, &guid_strs);
-       if (!ok) {
-               return HRES_E_INVALIDARG;
-       }
-
-       for (i = 0; guid_strs[i] != NULL; i++) {
+       for (i = 0; r->in.core_driver_dependencies.string_array[i] != NULL; i++) {
        }
 
        if (i != r->in.core_printer_driver_count) {
@@ -11481,7 +11470,7 @@ HRESULT _spoolss_GetCorePrinterDrivers(struct pipes_struct *p,
                struct GUID guid;
                struct spoolss_CorePrinterDriver *c;
 
-               status = GUID_from_string(guid_strs[i], &guid);
+               status = GUID_from_string(r->in.core_driver_dependencies.string_array[i], &guid);
                if (!NT_STATUS_IS_OK(status)) {
                        return HRES_E_INVALIDARG;
                }