lib:printer_driver: Parse SourceDisksNames section
authorJustin Stephenson <jstephen@redhat.com>
Fri, 16 Nov 2018 21:11:02 +0000 (16:11 -0500)
committerBjoern Jacke <bjacke@samba.org>
Mon, 28 Jan 2019 14:44:18 +0000 (15:44 +0100)
This allows a driver inf with a [SourceDisksNames] section
excluding the system architecture to be parsed.

https://docs.microsoft.com/en-us/windows-hardware/drivers/install/inf-sourcedisksnames-section?f=255&MSPPError=-2147217396

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
lib/printer_driver/printer_driver.c

index 50616a869f353f25b3e66b593591b01174769a28..3b076b766ff60466a8337185d89e7d499d6f5282 100644 (file)
@@ -939,6 +939,15 @@ static NTSTATUS process_source_disk_name(struct gp_inifile_context *ctx,
                return status;
        }
 
+       if (keys == NULL && values == NULL) {
+               key = "SourceDisksNames";
+
+               status = gp_inifile_enum_section(ctx, key, &num_keys, &keys, &values);
+               if (!NT_STATUS_IS_OK(status)) {
+                       return status;
+               }
+       }
+
        for (i = 0; i < num_keys; i++) {
 
                /*