From b4ec659c76933fa9fe127460e6d1a7fa4fc80656 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 25 Aug 2004 12:31:00 +0000 Subject: r2067: Prevent nameless $LIBDIR/printing/.tdb from beeing created. I've seen these on several sites now without knowing how they could get created. Guenther (This used to be commit 531a23d1d22a9951cce5f657df46bd27840eac3d) --- source3/printing/printing_db.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/printing/printing_db.c') diff --git a/source3/printing/printing_db.c b/source3/printing/printing_db.c index 9efb3e8ead..e13c0ac888 100644 --- a/source3/printing/printing_db.c +++ b/source3/printing/printing_db.c @@ -37,6 +37,9 @@ struct tdb_print_db *get_print_db_byname(const char *printername) pstring printdb_path; BOOL done_become_root = False; + if (printername == NULL) + return NULL; + for (p = print_db_head, last_entry = print_db_head; p; p = p->next) { /* Ensure the list terminates... JRA. */ SMB_ASSERT(p->next != print_db_head); -- cgit