From: Björn Jacke Date: Wed, 7 Oct 2020 16:00:25 +0000 (+0200) Subject: printing/spoolss: add ARM64 support X-Git-Tag: talloc-2.3.2~238 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38391ccc5d05c26b0d2d0df9aec20a5dff7fba16;p=thirdparty%2Fsamba.git printing/spoolss: add ARM64 support Signed-off-by: Bjoern Jacke Reviewed-by: Jeremy Allison --- diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl index e73f8cf844f..c82c3901f81 100644 --- a/librpc/idl/spoolss.idl +++ b/librpc/idl/spoolss.idl @@ -1866,6 +1866,7 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor") const string SPL_ARCH_IA64 = "IA64"; const string SPL_ARCH_X64 = "x64"; const string SPL_ARCH_ARM = "ARM"; + const string SPL_ARCH_ARM64 = "ARM64"; const string SPOOLSS_ARCHITECTURE_ALL = "All"; const string SPOOLSS_ARCHITECTURE_ALL_CLUSTER = "AllCluster"; @@ -1877,6 +1878,7 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor") const string SPOOLSS_ARCHITECTURE_W32PPC = "Windows NT PowerPC"; const string SPOOLSS_ARCHITECTURE_W32ALPHA = "Windows NT Alpha AXP"; const string SPOOLSS_ARCHITECTURE_ARM = "Windows ARM"; + const string SPOOLSS_ARCHITECTURE_ARM64 = "Windows ARM64"; const string SPOOLSS_DEFAULT_SERVER_PATH = "C:\\WINDOWS\\system32\\spool"; typedef [public,gensize] struct { diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h index e5391687556..bd94821a29c 100644 --- a/source3/include/nt_printing.h +++ b/source3/include/nt_printing.h @@ -205,6 +205,7 @@ static const struct print_architecture_table_node archi_table[]= { {SPOOLSS_ARCHITECTURE_W32PPC, SPL_ARCH_W32PPC, 2 }, {SPOOLSS_ARCHITECTURE_IA_64, SPL_ARCH_IA64, 3 }, {SPOOLSS_ARCHITECTURE_x64, SPL_ARCH_X64, 3 }, + {SPOOLSS_ARCHITECTURE_ARM64, SPL_ARCH_ARM64, 3 }, {NULL, "", -1 } }; diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 3654a4c9b7f..2e9205ec1b4 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -75,6 +75,7 @@ static bool print_driver_directories_init(void) const char *dir_list[] = { "W32X86/PCC", "x64/PCC", + "ARM64", "color" }; @@ -1001,8 +1002,9 @@ static uint32_t get_correct_cversion(const struct auth_session_info *session_inf } /* If architecture is Windows x64, the version is always 3. */ - if (strcmp(architecture, SPL_ARCH_X64) == 0) { - DEBUG(10,("get_correct_cversion: Driver is x64, cversion = 3\n")); + if (strcmp(architecture, SPL_ARCH_X64) == 0 || + strcmp(architecture, SPL_ARCH_ARM64) == 0) { + DBG_DEBUG("get_correct_cversion: this architecture must be, cversion = 3\n"); *perr = WERR_OK; TALLOC_FREE(frame); return 3; diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c index e42926a97fa..f814ad96bf4 100644 --- a/source3/rpc_server/spoolss/srv_spoolss_nt.c +++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c @@ -3939,6 +3939,9 @@ static WERROR construct_printer_info0(TALLOC_CTX *mem_ctx, if (strequal(architecture, SPOOLSS_ARCHITECTURE_x64)) { processor_architecture = PROCESSOR_ARCHITECTURE_AMD64; processor_type = PROCESSOR_AMD_X8664; + } else if (strequal(architecture, SPOOLSS_ARCHITECTURE_ARM64)) { + processor_architecture = PROCESSOR_ARCHITECTURE_ARM64; + processor_type = PROCESSOR_ARM820; } else { processor_architecture = PROCESSOR_ARCHITECTURE_INTEL; processor_type = PROCESSOR_INTEL_PENTIUM;