diff options
author | Jeremy Allison <jra@samba.org> | 2002-07-16 00:07:02 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-07-16 00:07:02 +0000 |
commit | b3aeabedd0af56fc38ddc391a52a9ff7f331f9ef (patch) | |
tree | 8d354e6866c7f54b55bdd1f2ecabe2b250f1b971 /source3/printing | |
parent | 78750803d09fdef3e878e73da98d3e7bc338fcb5 (diff) | |
download | samba-b3aeabedd0af56fc38ddc391a52a9ff7f331f9ef.tar.gz samba-b3aeabedd0af56fc38ddc391a52a9ff7f331f9ef.tar.bz2 samba-b3aeabedd0af56fc38ddc391a52a9ff7f331f9ef.zip |
Put printing tdbs in a subdirectory to prevent name collisions.
Jeremy.
(This used to be commit b013b9437557f2d427e4b646b49ad7d99e94c164)
Diffstat (limited to 'source3/printing')
-rw-r--r-- | source3/printing/printing.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 */ |