summaryrefslogtreecommitdiffstats
path: root/source/printing
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2004-08-25 12:31:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:29 -0500
commit531a23d1d22a9951cce5f657df46bd27840eac3d (patch)
tree5650020d640ee94215f44554057780be3916c8d1 /source/printing
parentcca660e109cc94b49ac6bf1f2802235d1d4d4383 (diff)
downloadsamba-531a23d1d22a9951cce5f657df46bd27840eac3d.tar.gz
samba-531a23d1d22a9951cce5f657df46bd27840eac3d.tar.xz
samba-531a23d1d22a9951cce5f657df46bd27840eac3d.zip
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
Diffstat (limited to 'source/printing')
-rw-r--r--source/printing/printing_db.c3
1 files changed, 3 insertions, 0 deletions
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);