summaryrefslogtreecommitdiff
path: root/source3/printing/printer_list.c
AgeCommit message (Collapse)AuthorFilesLines
2012-02-15s3-printing: fix crash in printer_list_set_printer()David Disseldorp1-1/+1
The printer list database format was recently changed to accommodate for the printcap location field. One of the tdb_pack calls is not provided with a location string argument, this causes a crash on some platforms. https://bugzilla.samba.org/show_bug.cgi?id=8762 Signed-off-by: Günther Deschner <gd@samba.org> Signed-off-by: Jim McDonough <jmcd@samba.org> Signed-off-by: Lars Müller <lars@samba.org> Autobuild-User: David Disseldorp <ddiss@samba.org> Autobuild-Date: Wed Feb 15 19:34:38 CET 2012 on sn-devel-104
2012-01-18s3: Add a "lock_order" argument to db_openVolker Lendecke1-1/+1
This will be used to enforce a lock hierarchy between the databases. We have seen deadlocks between locking.tdb, brlock.tdb, serverid.tdb and notify*.tdb. These should be fixed by refusing a dbwrap_fetch_locked that does not follow a defined lock hierarchy.
2011-10-11s3:printing: convert printer_list to use dbwrap wrapper functionsMichael Adam1-11/+20
Avoid direct use of the db_record and db_context structs.
2011-10-11s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and ↵Michael Adam1-6/+4
dbwrap_fetch_bystring_upper() to NTSTATUS
2011-07-29s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/Michael Adam1-1/+1
Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
2011-07-29s3:dbwrap: move db_open() to a file dbwrap_open.c of its own.Michael Adam1-0/+1
Also start new folder lib/dbwrap/ where dbwrap_open.c is stored and make the fallbacke implementation functoins non-static and create a dbwrap_private.h header file that contains their prototypes.
2011-05-16s3-printing: Get the location info from cups.Günther Deschner1-8/+34
Signed-off-by: Günther Deschner <gd@samba.org>
2011-05-06s3: only include tdb headers where needed.Günther Deschner1-0/+1
Guenther
2011-03-30s3-includes: only include system/filesys.h when needed.Günther Deschner1-0/+1
Guenther
2011-01-07s3-printing: remove printer_list_need_refreshDavid Disseldorp1-26/+0
printer_list_need_refresh() was used previously to ensure one smbd process did not attempt to update the printer_list tdb during or soon after update by another smbd. It is no longer needed, as pcap updates are now only performed by the parent smbd process following startup, SIGHUP, config update or printcap cache time expiry.
2010-12-20s3-printing: fix printer_list_traverse()David Disseldorp1-1/+1
The tdb traverse function returns the number of elements traversed, or less than zero on error, printer_list_traverse() is incorrectly checking for non-zero return. Autobuild-User: Andreas Schneider <asn@samba.org> Autobuild-Date: Mon Dec 20 18:44:41 CET 2010 on sn-devel-104
2010-10-08s3: Remove talloc_autofree_context() from get_printer_list_db()Volker Lendecke1-1/+1
Another db that does not need explicit closing
2010-09-29s3-printing: skip metadata entry when traversing printerlist.Günther Deschner1-0/+5
We were creating a new printer (with a very broken name) out of the lasttimestamp entry all the time. Simo, please check. Guenther
2010-09-27Change to using TDB_INCOMPATIBLE_HASH (the jenkins hash) on allJeremy Allison1-1/+1
TDB_CLEAR_IF_FIRST tdb's. For tdb's like gencache where we open without CLEAR_IF_FIRST and then with CLEAR_IF_FIRST if corrupt this is still safe to use as if opening an existing tdb the new hash will be ignored - it's only used on creating a new tdb not opening an old one. Jeremy.
2010-09-16s3/printing: avoid a possible race condition in the cache timeoutBjörn Jacke1-2/+1
2010-09-15s3/printing: make clock jump save and use monotonic time for cache timeoutBjörn Jacke1-13/+14
2010-09-15s3-printing: Add method to skip refresh if just happned.Simo Sorce1-0/+26
This way if multiple process try to refresh at the same time we don't do it over and over again. Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-09-15s3-printing: Added a printer list database.Simo Sorce1-0/+389
Signed-off-by: Andreas Schneider <asn@cynapses.org>