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-4.0.0alpha6~801^2~11295 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4ec659c76933fa9fe127460e6d1a7fa4fc80656;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 (This used to be commit 531a23d1d22a9951cce5f657df46bd27840eac3d) --- diff --git a/source3/printing/printing_db.c b/source3/printing/printing_db.c index 9efb3e8eadf..e13c0ac8880 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);