]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r2067: Prevent nameless $LIBDIR/printing/.tdb from beeing created.
authorGünther Deschner <gd@samba.org>
Wed, 25 Aug 2004 12:31:00 +0000 (12:31 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:52:29 +0000 (10:52 -0500)
I've seen these on several sites now without knowing how they could get
created.

Guenther

source/printing/printing_db.c

index 9efb3e8eadfc8c0921630aecb112285eed34ec3e..e13c0ac8880c49d2459339386a535eac555699a2 100644 (file)
@@ -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);