summaryrefslogtreecommitdiffstats
path: root/source3/printing
Commit message (Collapse)AuthorAgeFilesLines
* s3: Allow child processes to exit gracefully if we are out of fdsMarc VanHeyningen2009-05-292-4/+5
| | | | | | | | | | | When we run out of file descriptors for some reason, every new connection forks a child that immediately panics causing smbd to coredump. This seems unnecessarily harsh; with this code change we now catch that error and merely log a message about it and exit without the core dump. Signed-off-by: Tim Prouty <tprouty@samba.org> (cherry picked from commit 1c8f9892010ce8cc754089b25313c6bc8e622165)
* s3-printing: no need to define struct table_node 4 times.Günther Deschner2009-05-261-7/+1
| | | | | | Guenther (cherry picked from commit 652251701df7dec1401eab9b1dbc7e3ac5c7e7ad) (cherry picked from commit e6b6027218b96bf3357837d051ca5d2df0d88561)
* s3-spoolss: move SPL_ARCH_X defines to IDL.Günther Deschner2009-05-261-8/+0
| | | | | | Guenther (cherry picked from commit 7403dd39d608e07f107530819277738ebd20a320) (cherry picked from commit 37d0afc095e43d707ff3b86c9ebda22e8a10f77f)
* s3-printing: Fix vlp testprinter application.Günther Deschner2009-05-261-24/+23
| | | | | | | | | | | | Jeremy, we cannot just access cache_path() here without calling lp_load and friends as well as parsing configfile from the commandline in order to make "make test/selftest" find the correct conffile with path, etc. I just changed it to pass the target tdbfilename as an argument, ok ? Guenther (cherry picked from commit 94665adb484c25534b756012e9b55f01737b7713) (cherry picked from commit 502d9ec5d1f37cd5d992324025b88756b6a475ec)
* Hopefully fix the buildfarm. Add some debug level 10 messagesJeremy Allison2009-05-262-5/+20
| | | | | | | | | I used to track down the vlp problem, change the vlp test printer not to use a static path of /tmp/vlp.tdb for the virtual print database (as this will eventually fill up). Cause it to use a virtual print database inside the cachepath. Jeremy. (cherry picked from commit dcf314874e90ec9debf1582fc3f6b07f2d4d30ca)
* s3-printing: simplify print_queue helper functions and return WERROR.Günther Deschner2009-05-261-17/+10
| | | | | | Guenther (cherry picked from commit 9966541f89b45834cdf63060202621f885bf9f5c) (cherry picked from commit 4d67491ef558c96fd57a959bb58df9efa5e83ceb)
* s3-printing: rework move_driver_file_to_download_area() a bit for clarity.Günther Deschner2009-05-261-32/+40
| | | | | | Guenther (cherry picked from commit baf78506895b8bd50433058ba0f18e1aaf8aeee5) (cherry picked from commit 492b5cfea364c60376245962a8777e04e31e8392)
* s3-printing: use move_driver_file_to_download_area() to avoid code duplication.Günther Deschner2009-05-261-144/+54
| | | | | | Guenther (cherry picked from commit 233bfb25c9443688f74c506348b0a7b34489e1d1) (cherry picked from commit bbeefe338e654cb0f43281d9dabe77b59fa931d6)
* s3-printing: add move_driver_file_to_download_area().Günther Deschner2009-05-261-0/+40
| | | | | | Guenther (cherry picked from commit a2a155bee59c7e849a492933d1ea5769e409bac5) (cherry picked from commit be680b2aae289cc7e173c4a76802fe09ff7882f6)
* s3-printing: use ARRAY_SIZE() macro in forms functions.Günther Deschner2009-04-281-6/+5
| | | | | | Guenther (cherry picked from commit 62480385c1e551448e40b01fff8e9dee318c29c1) (cherry picked from commit fea535368e4d62606b522031afc773d4963dbb91)
* s3-printing: use sec_initial_uid() instead "0" in print_access_check().Günther Deschner2009-04-281-1/+1
| | | | | | | | Another babystep in order to make us pass RPC-SPOOLSS. Guenther (cherry picked from commit d9aaf3759ac7fd6ce07a347a0138bdfb27a6f929) (cherry picked from commit 63d4f5a5893dfcf8ff346bad100e8bd7052089ee)
* s3-spoolss: remove unused dup_nt_devicemode().Günther Deschner2009-04-151-28/+0
| | | | | | Guenther (cherry picked from commit e3ceb0c65333cb870463971021e3af24d82abf26) (cherry picked from commit 0f48d27d6fb45bc61899916037a5133e3022ec59)
* s3-libads: avoid NULL talloc context with ads_get_dn().Günther Deschner2009-04-151-1/+1
| | | | | | Guenther (cherry picked from commit d71dec9259366e99beca69fcd9397bd38ed82c71) (cherry picked from commit 4e32c424a00bc29e63176af9773f9ffa7aa09bc2)
* s3:libads Make ads_get_dn() take a talloc contextAndrew Bartlett2009-04-151-2/+2
| | | | | | | | | | | | | | Also remove ads_memfree(), which was only ever a wrapper around SAFE_FREE, used only to free the DN from ads_get_ds(). This actually makes libgpo more consistant, as it mixed a talloc and a malloc based string on the same element. Andrew Bartlett Signed-off-by: Günther Deschner <gd@samba.org> (cherry picked from commit 20501876735fc4656083747ba8aa0de9da8fb820) (cherry picked from commit 6673ad24d48ad44fa76497f0327b13e82721d0a1)
* s3:printing Convert nt_printer_publish_ads() to use talloc betterAndrew Bartlett2009-04-151-26/+18
| | | | | | | | | | In particular, this removes one more user of pull_utf8_allocate() Andrew Bartlett Signed-off-by: Günther Deschner <gd@samba.org> (cherry picked from commit 89278b18195484d3ea5d25e8b19871d64d218a05) (cherry picked from commit 0fe131b32f4d372ea70060b0ba3874fc632e2a33)
* s3-spoolss: apply some const in spoolss server.Günther Deschner2009-04-151-4/+7
| | | | | | Guenther (cherry picked from commit 5a388115a944a425a774d7ec98260b7595998ee1) (cherry picked from commit e0cdb435d38c643d5a75aa16e793c6f09a349978)
* s3-spoolss: use printer and job notify enums provided by idl.Günther Deschner2009-04-151-15/+15
| | | | | | Guenther (cherry picked from commit 31106cdace883de16d5810386d69fc3da7d37c61) (cherry picked from commit 5b1035546673343f922679a1280b5203c1c1abc4)
* s3:printing: use tevent_loop_wait() instead of manual loopingStefan Metzmacher2009-04-151-50/+6
| | | | | | metze (cherry picked from commit b659daf81f31678f7447545d015bd9d1db8811b9) (cherry picked from commit c43ef1f1eeb9176cda0d69b5f17c2b4885a0772b)
* s3:printing: use a fd event to monitor the pipe to the parentStefan Metzmacher2009-04-151-3/+23
| | | | | | metze (cherry picked from commit 339ea0503d5ce3bf85cf61528956345c73c668c6) (cherry picked from commit c9eac30fbbd4af6d73b803b19f0dec8ce72baf59)
* s3-printing: use marshall/unmarshall_sec_desc_buf in sec_desc_upg_fn().Günther Deschner2009-04-151-26/+5
| | | | | | Guenther (cherry picked from commit b0747651b94d6d1176dad00277b6135300ed57d7) (cherry picked from commit 74ce96d6b3762df63dafb69444ae8159495006b5)
* s3-spoolss: rename temporary convert_devicemode_new function.Günther Deschner2009-04-151-12/+13
| | | | | | Guenther (cherry picked from commit 47c024fd7516aa940b6b04f903cedff677e5543e) (cherry picked from commit 05d441f7ff79b20e23f549d7d6c6567c8ec554e0)
* s3-spoolss: remove obsolete get_a_builtin_ntform.Günther Deschner2009-04-151-7/+0
| | | | | | Guenther (cherry picked from commit 04fd767c0b244082f616b445558c80619ef0363f) (cherry picked from commit b0948127557fab056fc81144cbcb3fe077821c03)
* s3-spoolss: make jobname a const char * in print_job_start().Günther Deschner2009-03-121-1/+1
| | | | Guenther
* Only copy sharename up from rap_to_pjobidVolker Lendecke2009-03-012-3/+4
| | | | | | | | | | | | | | Why?? :-) Another one of the little micro-optimizations that I just came across: If you allocate a variable in a sub-block like the "fstring sharename" in write_file(), gcc even with -O3 will allocate this variable unconditionally on the stack at the beginning of the routine. So with eliminating this fstring we cut 256 bytes of stack in a very hot code path writing to a file. It might make us a bit more cache-friendly. This would probably not be worth a second look if it involved larger code changes, but this one was just too simple to let it pass :-)
* s3-spoolss: use DSPRINT flags instead of SPOOLS_DS flags.Günther Deschner2009-02-271-6/+6
| | | | Guenther
* s3: fix the build JOB_STATUS_BLOCKED -> JOB_STATUS_BLOCKED_DEVQMichael Adam2009-02-261-1/+1
| | | | | | Günther, please check... Michael
* Fix some NetBSD warnings.Jeremy Allison2009-02-251-2/+4
| | | | Jeremy.
* s3-spoolss: use marshall/unmarshall_sec_desc_buf in nt_printing_setsec/getsec.Günther Deschner2009-02-241-45/+35
| | | | Guenther
* s3-spoolss: fix notify_printer_status_byname.Günther Deschner2009-02-241-1/+3
| | | | | | | | | | | | | | | | | | | This took me almost a week to find, so here a little longer explanation: When a windows client registers printer *status* change notifies using spoolss_RemoteFindFirstChangeNotify, it registers them to a print server handle, not a printer handle. We were then correctly monitoring the printer status changes but were sending out the spoolss_RouterReplyPrinterEx via the back-channel connection with job_id set to 0 (which we only may do for monitored printer change status notifies on printer handlers, not print server handles). Windows was then showing a new empty dummy printer icon in the explorer as it cannot route the notify event to the approriate local handle. It also discarded the content of the notify event message of course. With this, printer change notify for pausing, resuming and purging printers nicely works again here. Jerry, Tim and all other printing gurus, please check. Guenther
* Fix printf warnings found on systems where time_t <> long int.Jeremy Allison2009-02-191-1/+1
| | | | Jeremy.
* S3: Stop creating SMBD cores when failing to create a pipe.todd stecher2009-02-181-3/+7
| | | | | | This was uncovered when the MAX FD limit was hit, causing an instant core and invoking error reporting. This fix causes SMBD to exit, but without building a core.
* Fix Coverity ID 740 (RESOURCE_LEAK)Volker Lendecke2009-02-131-0/+2
|
* s3-spoolss: remove more whitespace.Günther Deschner2009-02-101-135/+135
| | | | Guenther
* s3-spoolss: remove whitespace in printing code.Günther Deschner2009-02-091-322/+322
| | | | Guenther
* s3-spoolss: restore delete_a_form().Günther Deschner2009-02-091-10/+1
| | | | Guenther
* s3-spoolss: use pidl for _spoolss_SetForm.Günther Deschner2009-02-091-12/+10
| | | | Guenther
* s3-spoolss: use pidl for spoolss_AddForm.Günther Deschner2009-02-091-15/+13
| | | | Guenther
* s3-spoolss: rework some form functions and add form_by_string functions.Günther Deschner2009-02-071-10/+21
| | | | Guenther
* s3:smbd: use signal events for SIGTERM, SIGHUP and SIGCHLDStefan Metzmacher2009-01-271-15/+3
| | | | metze
* s3:printing: make some functions static and use tevent functionsStefan Metzmacher2009-01-221-8/+12
| | | | metze
* s3:printing: handle tevent_context events in the sys_select() callStefan Metzmacher2009-01-221-16/+42
| | | | metze
* s3: put printing/ under cache_dir, not lock_dirMichael Adam2009-01-163-4/+4
| | | | Michael
* Attempt to fix crash seen with new CUPS async printcap loading code.Jeremy Allison2009-01-051-0/+3
| | | | Jeremy.
* Merge branch 'master' of ssh://git.samba.org/data/git/sambaJelmer Vernooij2009-01-053-4/+5
|\
| * s3:events: change event_add_timed() prototype to match samba4Stefan Metzmacher2009-01-051-2/+1
| | | | | | | | metze
| * clean event context after child is forked.Bo Yang2009-01-052-2/+4
| | | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* | Add iconv_convenience argument to size functions.Jelmer Vernooij2009-01-011-3/+4
|/
* Fix an ancient uninitialized variable readVolker Lendecke2008-12-311-5/+5
| | | | The callers of open_file_ntcreate expect *psbuf to be filled correctly
* Fix a memory leak in cups_pull_comment_locationVolker Lendecke2008-12-301-0/+4
| | | | We allocated "request" with ippNew, so we also should ippDelete it.
* Fix a spinning smbd when printingVolker Lendecke2008-12-301-1/+1
| | | | | | Without this, we end up adding more than one timed event. In the event handler print_notify_event_send_messages() only one event will be deleted, all others will fire indefinitely.