s3-printing: precreate DriverStore directories.
authorGünther Deschner <gd@samba.org>
Mon, 12 Sep 2016 19:00:18 +0000 (21:00 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 26 Jul 2017 03:34:14 +0000 (05:34 +0200)
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jul 26 05:34:15 CEST 2017 on sn-devel-144

source3/printing/nt_printing.c

index c039764734b181161e4d6ab02aa90ed133e4b00d..0a0d3f75c69fb9c8b16df8cde23cae700dae39b9 100644 (file)
@@ -152,6 +152,28 @@ static bool print_driver_directories_init(void)
                }
        }
 
+       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;
 }