From: Justin Stephenson Date: Tue, 20 Nov 2018 16:24:34 +0000 (-0500) Subject: lib:printer_driver: Retrieve Class value X-Git-Tag: ldb-1.6.1~300 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7783c62bbf7d4237a3df02a02196c43d1152ed27;p=thirdparty%2Fsamba.git lib:printer_driver: Retrieve Class value Retrieve the Class value from the inf file [Version] section. Signed-off-by: Justin Stephenson Reviewed-by: Andreas Schneider Reviewed-by: Bjoern Jacke --- diff --git a/lib/printer_driver/printer_driver.c b/lib/printer_driver/printer_driver.c index bd846035cca..2176d4ae948 100644 --- a/lib/printer_driver/printer_driver.c +++ b/lib/printer_driver/printer_driver.c @@ -1034,6 +1034,13 @@ static NTSTATUS setup_driver_by_name(TALLOC_CTX *mem_ctx, } } + status = gp_inifile_getstring_ext(ctx, "Version:Class", &s); + if (NT_STATUS_IS_OK(status)) { + if (strequal(s, "Printer")) { + r->printer_driver_attributes |= PRINTER_DRIVER_CLASS; + } + } + status = gp_inifile_getstring(ctx, "Version:Signature", &s); if (!NT_STATUS_IS_OK(status)) { return status;