summaryrefslogtreecommitdiffstats
path: root/source/printing/printing.c
Commit message (Collapse)AuthorAgeFilesLines
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* Removed MAXSTATUS which was set incorrectly - thus causing tdb traversalJeremy Allison2002-01-141-5/+3
| | | | | | of the connections db on smbd startup. This should fix the Solaris large load bug.... (fingers crossed). Jeremy.
* Fixed all uses of tdb_fetch/store/_int to use explicit int32 little endianJeremy Allison2002-01-091-12/+13
| | | | | in tdb's. All except winbindd_idmap.... Hmmmmmm. Jeremy.
* Fixed nasty cast of tdb_delete in traversals.Jeremy Allison2002-01-031-1/+1
| | | | Jeremy.
* Factor out a broadcast_printer_notify() routine.Martin Pool2001-12-211-7/+17
|
* Fixed uninitialised variable warning.Tim Potter2001-12-181-1/+1
|
* Use print_queue_length() by preference if we don't need a queueJeremy Allison2001-12-051-0/+1
| | | | | as it doesn't do a traversal. Jeremy.
* Improved efficiency of enumerating print queue's under a particularJeremy Allison2001-12-051-9/+18
| | | | | extreme condition... Jeremy.
* Optimisation to send only to correct processid.Jeremy Allison2001-10-161-6/+16
| | | | Jeremy
* very simple asynchronous "lpq" thread patchJean-François Micouleau2001-10-161-2/+50
| | | | | | | | | | | | To speed up operations with the lpq command, it's now run in a separate asynchronous process. Opening the Printers folder on NT is now fast ;-) I think even faster than with a ** server Jeremy, you should look at that patch to include it in 2.2.3 J.F.
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-2/+0
|
* got rid of USE_TDB_MMAP_FLAG as its not needed any moreAndrew Tridgell2001-09-061-1/+1
|
* the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but ↵Andrew Tridgell2001-09-041-4/+4
| | | | the client code still needs some work
* more NTSTATUS/WERROR conversionAndrew Tridgell2001-09-031-11/+11
|
* Fixed detection of CUPS. We need to check for the presence of the cupsTim Potter2001-08-231-2/+2
| | | | header files as well as libcups.
* Merge in the NT drivers changes from 2.2.Jeremy Allison2001-08-101-1/+1
| | | | Jeremy.
* Replaced the duplicate DOS constants with appropriate ones from doserr.h toTim Potter2001-08-101-9/+9
| | | | | emphasise the fact that the spoolss pipe returns DOS error codes instead of 32-bit nt status codes.
* Fix for incorrect creation of print job names, based on a patch byJeremy Allison2001-07-161-2/+2
| | | | | José M.Rodríguez <josemi@iies.es> Jeremy.
* The big character set handling changeover!Andrew Tridgell2001-07-041-13/+4
| | | | | | | This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation.
* Properly instrument print_job_start()/print_job_end() so every fail caseJeremy Allison2001-06-281-4/+20
| | | | | logs a debug. We need this to track fail cases. Jeremy
* use LDSHFLAGS not -shared in several placesAndrew Tridgell2001-06-041-1/+1
|
* Removed mktemp from HEAD - same as done in 2.2.Jeremy Allison2001-04-181-16/+7
| | | | Jeremy.
* Got "medieval on our ass" about adding the -1 to slprintf.Jeremy Allison2001-04-081-10/+10
| | | | Jeremy.
* Fix from Dave Collier Brown to log a debug at level zero on common misconfigure.Jeremy Allison2001-03-261-1/+13
| | | | Jeremy.
* Added Michael Sweet's CUPS patch to call directly into the CUPS backend.Jeremy Allison2001-03-161-157/+29
| | | | | | Parameterises the printing functions so other backends can be plugged directly in (this is a good thing :-). Jeremy.
* Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison2001-03-111-4/+0
| | | | | | RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy.
* include/rpc_spoolss.h: Added JOB_STATUS_XXX defines.Jeremy Allison2001-02-231-50/+50
| | | | | | | | | | | | | include/smb.h: Added LPQ_xx enums to correspond with the NT JOB_STATUS_XXX. We need these to be different as we're storing LPQ_xx enums in the tdb already. rpc_server/srv_spoolss_nt.c: Don't need to return status strings as we're now returning status codes. smbd/lanman.c: Change the RAP status codes to have "RAP" in the name. printing/printing.c: Keep track of the status of a job. Allow a job to be deleted from one smbd when being submitted by another. Made logic in mutex clearer. Jeremy.
* lib/select.c: Fix for Linux 2.0.x kernel that causes select to return true ↵Jeremy Allison2001-02-221-17/+115
| | | | | | | | | | | on a pipe and then a blocking read to fail. Make the pipe read/write non blocking. printing/printing.c: Added a mutex around the code that enumerates all the jobs in a print queue. Allows only one smbd to be doing this at any one time. This fixes a capacity problem discovered at HP with <10,000 jobs in a print queue. Jeremy.
* Fixed file descriptor leak in error processing of print jobs.Jeremy Allison2001-02-221-52/+39
| | | | | | NT sends "delete on close" to cancel a print job copied from the command line. Deal with this. Merged JohnR's fixes for print job errors. Jeremy.
* DEBUG merge from 2.2 about tdb init failure.Herb Lewis2001-02-151-2/+20
| | | | | Patch from David Collier-Brown to print permission error on spool file creation.
* Changes from APPLIANCE_HEAD:David O'Neill2001-01-291-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | source/include/proto.h - make proto source/printing/nt_printing.c source/rpc_server/srv_spoolss_nt.c - Fix for the overwriting of printerdata entries when WinNT and Win2k are modifying printer parameters on PCL printers. Turns out that Win2k creates a printer with a NULL devmode entry and then expects to set it on *OPEN* (yes this is insane). So we cannot return a "default" devmode for a printer - and we must allow an open to set it. source/tdb/tdb.c - Show freelist in an easier format. Show total free. - When storing a new record, allocate memory for the key + data before the tdb_allocate() as if the malloc fails a (sparse) hole is left in the tdb. source/tdb/tdbtool.c - Show freelist in an easier format. Show total free. source/tdb/Makefile - cleaned up Makefile dependancies source/smbd/lanman.c - Fix for Win9x corrupting it's own parameter string. source/printing/printfsp.c source/printing/printing.c source/rpc_server/srv_spoolss_nt.c source/smbd/close.c - Added normal close parameter into print_fsp_end() which treats an abnormal close as error condition and deletes the spool file.
* Changes from APPLIANCE_HEAD:David O'Neill2001-01-241-8/+17
| | | | | | | | | source/printing/printing.c - When deleting a job, remove the entry from the back-end database if the delete succeeded. This stops a spurious permission denied message appearing if the forced database update is within the lpq cache timeout and doesn't actually delete the job from the database.
* Changes from APPLIANCE_HEAD:David O'Neill2001-01-231-10/+42
| | | | | | | | | | | | | | | | | | | | source/rpc_server/srv_spoolss_nt.c - add an access check to _spoolss_deleteprinter() to stop random users and passers by from deleting printers. source/lib/messages.c - converted global msg_all struct to a local in message_send_all() function. source/include/smb.h - added a success error code to the spoolss return codes. source/include/proto.h source/param/loadparm.c source/printing/printing.c - Added new parameter "total print jobs" to limit the total number of print jobs across all queues. Currently individual queues are limited by "max print jobs".
* Changes from APPLIANCE_HEAD:David O'Neill2001-01-231-1/+3
| | | | | | | | | | | | source/rpc_server/srv_spoolss_nt.c - remove redundant srv_spoolss_sendnotify() calls from _spoolss_startdocprinter() and _spoolss_enddocprinter(), as its functionality is already covered in print_job_start() and print_job_end() source/printing/printing.c - force a print_queue_update() prior to print queue purge so that all jobs are purged.
* Changes from APPLIANCE_HEAD:David O'Neill2001-01-221-1/+1
| | | | | source/printing/printing.c - remove unused variable
* Changes from APPLIANCE_HEAD:David O'Neill2001-01-221-17/+33
| | | | | | | | | | source/smbd/lanman.c - cleanup and bug fix for win9x print queue purge. source/printing/printing.c - cleanup and bug fix for win9x print queue purge. - print_job_end() changed to cleanup spool file in the event of a failure returned from the print_run_command()
* Changes from APPLIANCE_HEAD:David O'Neill2001-01-191-14/+19
| | | | | | | | | | | | | | | | | | source/printing/nt_printing.c - use se_create_child_secdesc() to create appropriate security descriptor when performing print job admin security checks. source/printing/printing.c - Use JOB_ACCESS_ADMINISTER instead of PRINTER_ACCESS_ADMINISTER in print_job_{delete,pause,resume}() - If stat'ing the job file fails, delete the job from printing.tdb - In print_job_end() check lpq cache time and do a print_queue_update() This prevents printing.tdb from growing when using NT/2K clients, and there isn't someone pressing F5 in a port monitor window. - In print_queue_resume() check lpq cache time and do a print_queue_update() Probably should do it for print_job_resume() too.
* Changes from APPLIANCE_HEAD:David O'Neill2001-01-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | source/rpc_server/srv_spoolss_nt.c - Unrolled construct_notify_jobs_info() loop to only fetch printer info_2 structure once rather than num_print_jobs times. - convert command to unix codepage. - remove lp_remove_service() call as it prevents lp_killservice() from working. - Modified some DEBUG and DEBUGADD statements. source/param/loadparm.c source/param/params.c - change printer, preload, auto services to FLAG_DOS_STRING, reverted earlier changes to szPrintername et al, add comments. source/printing/load.c - fix bug with lp_auto_services() and strtok() source/printing/nt_printing.c source/printing/printing.c - remove redundant test that used SERVICE(snum) source/printing/pcap.c - add unix_to_dos() calls, add notes wrt FIXMEs for xxx_printer_fn() functions. source/web/swat.c - added FIXME comment. source/smbd/service.c - added comment re: dos codepage
* Changes from APPLIANCE_HEAD:David O'Neill2001-01-111-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | testsuite/printing/psec.c - Use lock directory from smb.conf parameter when peeking at the ntdrivers.tdb file. source/rpc_parse/parse_sec.c - fix typo in debug message source/script/installbin.sh - create private directory as part of 'make install'. source/nsswitch/winbindd_cache.c source/nsswitch/winbindd_idmap.c source/passdb/secrets.c source/smbd/connection.c - always convert tdb key to unix code-page when generating. source/printing/nt_printing.c - always convert tdb key to unix code-page when generating. - don't prepend path to a filename that is NULL in add_a_printer_driver_3(). source/rpc_server/srv_spoolss_nt.c - always convert tdb key to unix code-page when generating. - don't prepend server name to a path/filename that is NULL in the fill_printer_driver_info functions. source/printing/printing.c - always convert tdb key to unix code-page when generating. - move access check for print_queue_purge() outside of job delete loop. source/smbd/unix_acls.c - fix for setting ACLs (this got missed earlier) source/lib/messages.c - trivial sync with appliance_head
* Changes merged from APPLIANCE_HEAD:David O'Neill2001-01-081-3/+4
| | | | | | source/printing/printing.c source/rpc_server/srv_spoolss_nt.c - convert args for print command to unix codepage.
* Changes from APPLIANCE_HEAD:David O'Neill2001-01-041-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | source/Makefile.in - changes to ctags and etags rules that somehow got lost along the way. source/include/proto.h - make proto source/smbd/sec_ctx.c source/smbd/password.c - merge debugs for debugging user groups and NT token stuff. source/lib/util_str.c - capitalise domain name returned from parse_domain_user() source/nsswitch/wb_client.c - fix broken conditional in debug statement. source/include/rpc_secdes.h source/include/rpc_spoolss.h source/printing/nt_printing.c source/lib/util_seaccess.c - fix printer permission bugs related to ACE masks for printers. This adds mapping of generic access rights to object specific rights for NT printers. Still need to work out whether or not to ignore ACEs with certain flags set, though. See comments in util_seaccess.c:check_ace() for details. source/printing/nt_printing.c source/printing/printing.c - use PRINTER_ACCESS_ADMINISTER instead of JOB_ACCESS_ADMINISTER until we sort out printer/printjob permission stuff.
* Fixed memory leaks in lsa_XX calls. Fixed memory leaks in smbcacls. MergedJeremy Allison2000-12-151-8/+8
| | | | | | in fixes from appliance-head and 2.2. Fixed multiple connection.tdb open problem. Jeremy.
* Changes from APPLIANCE_HEAD:David O'Neill2000-12-131-14/+19
| | | | | | | | | - trivial typo in definition of enum_printing[] (source/param/loadparm.c) - fixed printer status display bug. When no jobs existed in queue, the clients were not properly notified of printer status. This caused native tools for pausing/unpausing a print queue to not work. (source/printing/printing.c)
* file_lines_load/file_lines_pload can now optionally convert unix_to_dos()Jeremy Allison2000-12-071-1/+1
| | | | | on read. Jeremy.
* Sync-up with appliance-head printing code.Jeremy Allison2000-12-061-2/+0
| | | | Jeremy.
* Fix for updating of print queues changed from a local box. Essentially,Jeremy Allison2000-11-211-15/+43
| | | | | | this makes sure that the change messages sent to ourselves are handled synchronously w.r.t. other smb packets incoming. Jeremy.
* Fix for a problem with the new messaging system. If a sender is using theJeremy Allison2000-11-161-14/+7
| | | | | | | | | | | | | | messaging system as a notification mechanism, and the speed of notification greatly exceeds the speed of message recovery, then you get a massively (>75Mb) growing tdb. If the message is a simple notification, then the message is static, and you only need one of them in transit to a target process at any one time. This patch adds a BOOL "allow_duplicates" to the message_send_XX primitives. If set to False, then before sending a message the sender checks the existing message queue for a target pid for a duplicate of this message, and doesn't add to it if one already exists. Also added code into msgtest.c to test this. Jeremy.
* Tuyrn debug timestamps on by default.Jeremy Allison2000-11-151-4/+16
| | | | | Add Tim's lpq race fix. Jeremy.
* Merge from appliance head of JR's changes for driver versioning.Jeremy Allison2000-11-141-8/+11
| | | | Jeremy.
* Added Tim's changes to lock DB during update.Jeremy Allison2000-11-101-3/+18
| | | | Jeremy.