summaryrefslogtreecommitdiffstats
path: root/source/printing/printing.c
Commit message (Collapse)AuthorAgeFilesLines
* r21585: Start syncing the monster that will become 3.0.25pre1Gerald Carter2007-02-281-28/+43
| | | | | | | | Still todo: * release notes * few minor outstanding patches * additional idmap man pages
* r16674: After removing each individual post-3.0.23rc3 change:Gerald Carter2006-06-291-4/+4
| | | | | | | | | | | | | | This pulls is what I considered safe fixes from SAMBA_3_0. This boiled down to either Klocwork fixes or obvious compiler warning fixes. I did not include any changes to fnuction signatures not the version change to the passdb API. Also pulled in the 3 nmbd fixes requested by Jeremy and the wildcard delete fix. This code will sit for a few days in the cooker and then become 3.0.23 if nothing blows up. I don't care how many more compile warning fixes people throw into SAMBA_3_0.
* r16254: pulling klocwork fixes for 3.0.23rc3 (current up to r16251)Gerald Carter2006-06-151-8/+31
|
* r15101: Little step towards getting Samba4 tdb into 3: tdb_lock_bystring ↵Volker Lendecke2006-04-171-5/+5
| | | | | | | | | does not have the timeout argument in Samba4. Add a new routine tdb_lock_bystring_with_timeout. Volker
* r15025: Fix exit_server_cleanly call.Jeremy Allison2006-04-101-1/+1
| | | | Jeremy.
* r14898: This change is an attempt to improve the quality of the information thatJames Peach2006-04-041-1/+1
| | | | | | | | | | | | | | | | | is produced when a process exits abnormally. First, we coalesce the core dumping code so that we greatly improve our odds of being able to produce a core file, even in the case of a memory fault. I've removed duplicates of dump_core() and split it in two to reduce the amount of work needed to actually do the dump. Second, we refactor the exit_server code path to always log an explanation and a stack trace. My goal is to always produce enough log information for us to be able to explain any server exit, though there is a risk that this could produce too much log information on a flaky network. Finally, smbcontrol has gained a smbd fault injection operation to test the changes above. This is only enabled for developer builds.
* r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison2006-03-071-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | realloc can return NULL in one of two cases - (1) the realloc failed, (2) realloc succeeded but the new size requested was zero, in which case this is identical to a free() call. The error paths dealing with these two cases should be different, but mostly weren't. Secondly the standard idiom for dealing with realloc when you know the new size is non-zero is the following : tmp = realloc(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } However, there were *many* *many* places in Samba where we were using the old (broken) idiom of : p = realloc(p, size) if (!p) { return error; } which will leak the memory pointed to by p on realloc fail. This commit (hopefully) fixes all these cases by moving to a standard idiom of : p = SMB_REALLOC(p, size) if (!p) { return error; } Where if the realloc returns null due to the realloc failing or size == 0 we *guarentee* that the storage pointed to by p has been freed. This allows me to remove a lot of code that was dealing with the standard (more verbose) method that required a tmp pointer. This is almost always what you want. When a realloc fails you never usually want the old memory, you want to free it and get into your error processing asap. For the 11 remaining cases where we really do need to keep the old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR, which can be used as follows : tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the pointer p, even on size == 0 or realloc fail. All this is done by a hidden extra argument to Realloc(), BOOL free_old_on_error which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR macros (and their array counterparts). It remains to be seen what this will do to our Coverity bug count :-). Jeremy.
* r13622: Allow to rename machine accounts in a Samba Domain. This still uses theGünther Deschner2006-02-221-2/+4
| | | | | | | "rename user script" to do the rename of the posix machine account (this might be changed later). Fixes #2331. Guenther
* r13293: Rather a big patch I'm afraid, but this should fix bug #3347Jeremy Allison2006-02-021-7/+8
| | | | | | | | by saving the UNIX token used to set a delete on close flag, and using it when doing the delete. libsmbsharemodes.so still needs updating to cope with this change. Samba4 torture tests to follow. Jeremy.
* r10656: BIG merge from trunk. Features not copied overGerald Carter2005-09-301-46/+113
| | | | | | | * \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck)
* r10555: a few compile warnings from jason MaderGerald Carter2005-09-271-3/+3
|
* r10371: Adding iPrint printing backend written by Joel J. Smith @ Novell.Jeremy Allison2005-09-201-0/+6
| | | | Jeremy.
* r9244: Fix bugs found by Coverity.Jeremy Allison2005-08-111-3/+21
| | | | Jeremy.
* r8686: Revert %LOGONSERVER%-substitution. The substition is done on the client,Günther Deschner2005-07-211-1/+1
| | | | | | | | | | | not on the server. We now preserve this windows variable (important for vampired setups) and correctly substitute only the "%L"s in strings like: "%LOGONSERVER% %L %lOgOnSeRvEr% %L". Guenther
* r8506: BUG 2853: don't strip out characters like '$' from printer namesGerald Carter2005-07-151-16/+8
| | | | when substituting for the lpq command.
* r7829: fix unitialized printer status field that was breaking migration of ↵Gerald Carter2005-06-221-0/+2
| | | | print queues
* r6890: Refactor printing interface to take offset into job. Fixes bugJeremy Allison2005-05-181-2/+3
| | | | | | where large print jobs can have out-of-order offsets. Bug found by Arcady Chernyak <Arcady.Chernyak@efi.com> Jeremy.
* r6490: BUG 1998: patch from Olaf Imig <Olaf.Imig@bifab.de>; fix byte ↵Gerald Carter2005-04-261-3/+9
| | | | ordering bug when storing 16-bit RAP print job ids
* r5993: compiler warning fixGerald Carter2005-03-231-1/+1
|
* r5950: more compiler warning's from Jason MaderGerald Carter2005-03-221-2/+2
|
* r5807: fix segfault after compiler warning clean up (and cleanup another ↵Gerald Carter2005-03-151-4/+4
| | | | warning)
* r5770: Get rid of some compiler warningsVolker Lendecke2005-03-121-28/+17
|
* r5691: wrapping the pause/resume/purge printer commands in Gerald Carter2005-03-081-53/+62
| | | | | | | | | | | | | {become,unbecome}_root() blocks. We've already done a print_access_check() to ensure the user is admin. The means that non-root users can pause and manage printers. I really don't see how this worked before without setuid binaries on the server. Also update print_queue_update() interface to allow an smbd to update the print queue cache locally rather than going through the bg lpq daemon. This is needed for things like pjob_delete() to ensure the cache is current for the specific client.
* r4662: Fix from "Jerome Borsboom" <j.borsboom@erasmusmc.nl> to fixJeremy Allison2005-01-111-0/+1
| | | | | missing release reference for printer tdb. Jeremy.
* r4539: patch from Rob -- adding real printcap name cache function to speed ↵Gerald Carter2005-01-051-1/+1
| | | | up printcap reloads
* r4094: BUG 2107: fix memory bloating caused by large numbers of ↵Gerald Carter2004-12-081-35/+136
| | | | print_queue_updates() requests sent via messages.tdb
* r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison2004-12-071-4/+4
| | | | | | | | | allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy.
* r4028: * prevent the background LPQ daemon from updating Gerald Carter2004-12-011-63/+85
| | | | | | | | | the print queue cache just because multiple smbd processes sent a message that it was out of date. * add some extra debug messages while trying to track down down jobs being left in the queue after printing has completed.
* r3867: Fix from david.hu@hp.com - make a copy of an incoming messageJeremy Allison2004-11-181-5/+5
| | | | | | rather than indirecting into it as a struct (may not be on an even byte boundary). Bug #2052. Jeremy.
* r3067: patch based on volker's initial work in trunk that fixes the queu ↵Gerald Carter2004-10-191-211/+301
| | | | update problem when using the background daemon
* r2569: Patch from Rob Foehl <rwf@loonybin.net>:Gerald Carter2004-09-231-4/+0
| | | | | | | | | | | | | | | | | - fix typo in libads/ldap_printer.c:39, ads_find_printer_on_server() (originally libads-typo.patch) - fix leak in printing/nt_printing.c, is_printer_published() (originally is_printer_published-leak.patch) - fix double print_backend_init() calls, now only called from main() - restructuring in printing/nt_printing.c - replaced (un)publish_it() with ads-specific functions - moved common code to nt_printer_publish() - improved error handling in several places - added check_published_printers() in printing/nt_printing.c, to verify that each published printer is actually in the directory at startup - changed calling semantics of mod_a_printer, dump_a_printer, and update_driver_init to be more consistent with the rest of the api and reduce some copying
* r2191: ensure that we assign our pid to print jobs (and not our parent's ↵Gerald Carter2004-09-021-17/+8
| | | | pid); ensures that spooling jobs from dead smbds are removed from the tdb
* r2133: Several fixes:Gerald Carter2004-08-311-14/+15
| | | | | | | | | | | | | | | | | | | * BUG 1627: fix for NIS compiles on HPUX 11.00, AIX 4.3 and 5.1 patch from Olaf Flebbe <o.flebbe@science-computing.de>. Will need to watch this one in the build farm. * Fix bug found by rwf@loonybin.net where the PRINT_ATTRIBUTE_PUBLISHED was getting reset by attempts to sanitize the defined attributes (PRINTER_ATTRIBUTE_SAMBA) * Resolve name conflict on DEC OSF-5.1 (inspired by patch from Adharsh Praveen <rprav@india.hp.com>) * Work around parsing error in the print change notify code (not that the alignment bug is still there but reording the entries in the array works around it). * remove duplicate declaration of getprintprocdir from rpcclient.
* r1885: tighten the cache consistency with the ntprinters.tdb entry an the in ↵Gerald Carter2004-08-181-1/+1
| | | | memory cache associated with open printer handles; also make sure that register_messages_flags() doesn't overwrite the originally registers flags
* r1384: ensure we remove the tdb entry for a job in the spooling stateGerald Carter2004-07-071-3/+0
|
* r1295: To be able to send a message to the background queue updated, we need ↵Volker Lendecke2004-06-291-3/+7
| | | | | | | | to be root. Otherwise the USR1 signal will not be delivered. Volker
* r1230: (merges from HP PSA) fixing a couple of caching bugs in the printing ↵Gerald Carter2004-06-231-0/+1
| | | | code. (a) make sure to clear jobs_changed list when deleting a job and, (b) invalidate the printer handle cache when we get a notification that something has changed on that printer
* r925: add changes frpm trunk (r841 and r842) -- enable background queue ↵Gerald Carter2004-05-271-1/+87
| | | | update process and allow printers to have different sharenames from printernames
* r560: Fix bugzilla 1279: cannot control individual print jobs using cupsJim McDonough2004-05-071-3/+3
| | | | Store the print job using a little-endian key.
* r555: Fix big-endian storage of jobids in jobs_changed list. Found duringJim McDonough2004-05-071-1/+3
| | | | debugging of 1279
* r2: import HEAD into svn+ssh://svn.samba.org/home/svn/samba/trunkCVS Import User2004-04-041-0/+2420
metze