[SCM] Samba Shared Repository - branch master updated
Andreas Schneider
asn at samba.org
Wed Jul 26 03:35:03 UTC 2017
The branch, master has been updated
via 8865ded s3-printing: precreate DriverStore directories.
via 2621a2d s3-printing: add spoolss_get_short_filesys_environment function.
via a17cb9e s3-printing: pre-create color and PCC directories under print$.
from 5005a3a libsmb: Enable "cli_notify" for SMB2+
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 8865dede5703a93c71fc2cb9417688f751ea2c69
Author: Günther Deschner <gd at samba.org>
Date: Mon Sep 12 21:00:18 2016 +0200
s3-printing: precreate DriverStore directories.
Guenther
Signed-off-by: Guenther Deschner <gd at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
Autobuild-Date(master): Wed Jul 26 05:34:15 CEST 2017 on sn-devel-144
commit 2621a2dae945591773e04aa78e97397ec4acaf95
Author: Günther Deschner <gd at samba.org>
Date: Thu Sep 8 21:23:54 2016 +0200
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 at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit a17cb9ee09419f3ae8e0541aee83df55c4777bd0
Author: Günther Deschner <gd at samba.org>
Date: Fri Sep 2 10:00:01 2016 +0200
s3-printing: pre-create color and PCC directories under print$.
Guenther
Signed-off-by: Guenther Deschner <gd at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/printing/nt_printing.c | 49 +++++++++++++++++++++++++++++++++++++++
source3/rpc_client/init_spoolss.c | 11 +++++++++
source3/rpc_client/init_spoolss.h | 1 +
3 files changed, 61 insertions(+)
Changeset truncated at 500 lines:
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 47590f6..0a0d3f7 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -80,6 +80,11 @@ static bool print_driver_directories_init(void)
char *driver_path;
bool ok;
TALLOC_CTX *mem_ctx = talloc_stackframe();
+ const char *dir_list[] = {
+ "W32X86/PCC",
+ "x64/PCC",
+ "color"
+ };
service = lp_servicenumber("print$");
if (service < 0) {
@@ -125,6 +130,50 @@ static bool print_driver_directories_init(void)
}
}
+ for (i = 0; i < ARRAY_SIZE(dir_list); i++) {
+ const char *path;
+
+ path = talloc_asprintf(mem_ctx,
+ "%s/%s",
+ driver_path,
+ dir_list[i]);
+ if (path == NULL) {
+ talloc_free(mem_ctx);
+ return false;
+ }
+
+ ok = directory_create_or_exist(path, 0755);
+ if (!ok) {
+ DEBUG(1, ("Failed to create printer driver "
+ "architecture directory %s\n",
+ path));
+ talloc_free(mem_ctx);
+ return false;
+ }
+ }
+
+ driver_path = state_path("DriverStore");
+ ok = directory_create_or_exist(driver_path, 0755);
+ if (!ok) {
+ DEBUG(1,("failed to create path %s\n", driver_path));
+ talloc_free(mem_ctx);
+ return false;
+ }
+ driver_path = state_path("DriverStore/FileRepository");
+ ok = directory_create_or_exist(driver_path, 0755);
+ if (!ok) {
+ DEBUG(1,("failed to create path %s\n", driver_path));
+ talloc_free(mem_ctx);
+ return false;
+ }
+ driver_path = state_path("DriverStore/Temp");
+ ok = directory_create_or_exist(driver_path, 0755);
+ if (!ok) {
+ DEBUG(1,("failed to create path %s\n", driver_path));
+ talloc_free(mem_ctx);
+ return false;
+ }
+
talloc_free(mem_ctx);
return true;
}
diff --git a/source3/rpc_client/init_spoolss.c b/source3/rpc_client/init_spoolss.c
index e5f70c0..9a4dab6 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 28dbb1b..376eaef 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_ */
--
Samba Shared Repository
More information about the samba-cvs
mailing list