s3-printing: add spoolss_get_short_filesys_environment function.
authorGünther Deschner <gd@samba.org>
Thu, 8 Sep 2016 19:23:54 +0000 (21:23 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 25 Jul 2017 23:34:12 +0000 (01:34 +0200)
Note this is different from "get_short_archi" and reflects what windows uses
internally.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/rpc_client/init_spoolss.c
source3/rpc_client/init_spoolss.h

index e5f70c0..9a4dab6 100644 (file)
@@ -435,3 +435,14 @@ WERROR spoolss_create_default_secdesc(TALLOC_CTX *mem_ctx,
 
        return WERR_OK;
 }
+
+const char *spoolss_get_short_filesys_environment(const char *environment)
+{
+       if (strequal(environment, SPOOLSS_ARCHITECTURE_x64)) {
+               return "amd64";
+       } else if (strequal(environment, SPOOLSS_ARCHITECTURE_NT_X86)) {
+               return "x86";
+       } else {
+               return NULL;
+       }
+}
index 28dbb1b..376eaef 100644 (file)
@@ -47,5 +47,6 @@ WERROR spoolss_create_default_devmode(TALLOC_CTX *mem_ctx,
 
 WERROR spoolss_create_default_secdesc(TALLOC_CTX *mem_ctx,
                                      struct spoolss_security_descriptor **secdesc);
+const char *spoolss_get_short_filesys_environment(const char *environment);
 
 #endif /* _RPC_CLIENT_INIT_SPOOLSS_H_ */