From b3aeabedd0af56fc38ddc391a52a9ff7f331f9ef Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 16 Jul 2002 00:07:02 +0000 Subject: Put printing tdbs in a subdirectory to prevent name collisions. Jeremy. (This used to be commit b013b9437557f2d427e4b646b49ad7d99e94c164) --- source3/printing/printing.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 7bfce43af6..eb6d2f0159 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -186,7 +186,8 @@ static struct tdb_print_db *get_print_db_byname(const char *printername) DLIST_ADD(print_db_head, p); } - pstrcpy(printdb_path, lock_path(printername)); + pstrcpy(printdb_path, lock_path("printing/")); + pstrcat(printdb_path, printername); pstrcat(printdb_path, ".tdb"); p->tdb = tdb_open_log(printdb_path, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); if (!p->tdb) { @@ -217,11 +218,15 @@ BOOL print_backend_init(void) { struct printer_queueid_map *p; char *sversion = "INFO/version"; + pstring printing_path; if (local_pid == sys_getpid()) return True; unlink(lock_path("printing.tdb")); + pstrcpy(printing_path,lock_path("printing")); + mkdir(printing_path,0755); + local_pid = sys_getpid(); /* handle a Samba upgrade */ -- cgit