summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2016-09-08 21:23:54 +0200
committerAndreas Schneider <asn@cryptomilk.org>2017-07-26 01:34:12 +0200
commit2621a2dae945591773e04aa78e97397ec4acaf95 (patch)
treef6efd38befb34dfcdf30e14774cb7cff62239f38
parenta17cb9ee09419f3ae8e0541aee83df55c4777bd0 (diff)
downloadsamba-2621a2dae945591773e04aa78e97397ec4acaf95.tar.gz
s3-printing: add spoolss_get_short_filesys_environment function.
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>
-rw-r--r--source3/rpc_client/init_spoolss.c11
-rw-r--r--source3/rpc_client/init_spoolss.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/source3/rpc_client/init_spoolss.c b/source3/rpc_client/init_spoolss.c
index e5f70c0b045..9a4dab6d417 100644
--- a/source3/rpc_client/init_spoolss.c
+++ b/source3/rpc_client/init_spoolss.c
@@ -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;
+ }
+}
diff --git a/source3/rpc_client/init_spoolss.h b/source3/rpc_client/init_spoolss.h
index 28dbb1b7b8b..376eaefe914 100644
--- a/source3/rpc_client/init_spoolss.h
+++ b/source3/rpc_client/init_spoolss.h
@@ -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_ */