From: Günther Deschner Date: Wed, 25 Aug 2004 12:31:00 +0000 (+0000) Subject: r2067: Prevent nameless $LIBDIR/printing/.tdb from beeing created. X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~5870 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=531a23d1d22a9951cce5f657df46bd27840eac3d;p=thirdparty%2Fsamba.git 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 --- 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);