From 531a23d1d22a9951cce5f657df46bd27840eac3d 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 --- source/printing/printing_db.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/printing/printing_db.c b/source/printing/printing_db.c index 9efb3e8eadf..e13c0ac8880 100644 --- a/source/printing/printing_db.c +++ b/source/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