summaryrefslogtreecommitdiff
path: root/source3/printing
Commit message (Collapse)AuthorAgeFilesLines
* s3-printing: explicitly include "printing/pcap.h" as there is ↵Günther Deschner2010-05-147-7/+7
| | | | | | | | /usr/include/pcap.h. Thanks metze for pointing this out. Simo, please check. Guenther
* Make pcap headers privateSimo Sorce2010-05-149-1/+60
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* Move standard printcap parsing to print_standard.cSimo Sorce2010-05-142-92/+130
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* s3: only include gen_ndr headers where needed.Günther Deschner2010-05-063-0/+3
| | | | | | | | | | | | | | | | | This shrinks include/includes.h.gch by the size of 7 MB and reduces build time as follows: ccache build w/o patch real 4m21.529s ccache build with patch real 3m6.402s pch build w/o patch real 4m26.318s pch build with patch real 3m6.932s Guenther
* s3-spoolss: Added a generic spoolss_create_default_secdesc function.Andreas Schneider2010-05-051-0/+84
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* s3-spoolss: Added a function to create a default spoolss_DeviceMode.Andreas Schneider2010-05-051-0/+77
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* s3-lib: Create a sec_desc_merge and sec_desc_merge_buf function.Andreas Schneider2010-05-041-1/+1
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* smbd: move printfile_offset() within write_file()Simo Sorce2010-04-301-1/+6
|
* s3-spoolss: add support for SetJobInfo level 1 (for jobfile rename).Günther Deschner2010-04-281-1/+23
| | | | Guenther
* s3-lanman: remove unsupported print_job_set_place().Günther Deschner2010-04-281-10/+0
| | | | Guenther
* s3-smbd: group print relate data in own structureSimo Sorce2010-04-231-9/+15
|
* s3-spoolss: Move info_ctr conversion to a public helper.Simo Sorce2010-04-231-6/+23
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* s3-spoolss: Use const values for notify functions.Andreas Schneider2010-04-231-6/+6
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* s3-spoolss: fix some crash bugs and missing error codes in AddDriver paths.Günther Deschner2010-04-231-2/+8
| | | | | | Found by torture test. Guenther
* s3: add iconv_convenience handle to pull/push sz helpers.Günther Deschner2010-04-091-1/+1
| | | | Guenther
* s3-spoolss: Fix an issue in _spoolss_DeleteForm.Günther Deschner2010-04-071-1/+1
| | | | | | Found by torture test. Guenther
* Fix for bug #7233 - print fails with jobs >4GB from Win7 clients.Jeremy Allison2010-03-301-0/+20
| | | | | | | Contains for by Sebastian Kloska <oncaphillis@snafu.de>. Submitter confirms this fixes the problem. Jeremy.
* s3-printing: avoid mixing cups backend code with nt_printing code in ↵Günther Deschner2010-03-262-25/+36
| | | | | | cups_pull_comment_location. Guenther
* Second part of bug #7288 - SMB job IDs in CUPS job names wrong.Jeremy Allison2010-03-251-2/+0
| | | | | | Forgot to delete the overload of the smbjob bool. Jeremy.
* Fix bug #7288 - SMB job IDs in CUPS job names wrong.Jeremy Allison2010-03-253-20/+31
| | | | | | | | | | | | | | | | | | | | | | | Based on a patch from Michael Karcher <samba@mkarcher.dialup.fu-berlin.de>. I think this is the correct fix. It causes cups_job_submit to use print_parse_jobid(), which I've moved into printing/lpq_parse.c (to allow the link to work). It turns out the old print_parse_jobid() was *broken*, in that the pjob filename was set as an absolute path - not relative to the sharename (due to it not going through the VFS calls). This meant that the original code doing a strncmp on the first part of the filename would always fail - it starts with a "/", not the relative pathname of PRINT_SPOOL_PREFIX ("smbprn."). This fix could fix some other mysterious printing bugs - probably the ones Guenther noticed where job control fails on non-cups backends. Guenther PLEASE CHECK ! Jeremy.
* Fix bug #7269 - Job management commands don't work for CUPS queues.Michael Karcher2010-03-241-1/+9
| | | | | Samba needs to retrieve pjob->sysjob from the CUPS response (as is done in the iprint backend).
* s3-printing: Fix "printer admin" functionality.Jeremy Allison2010-03-181-1/+1
| | | | Fix bug #7255 ("printer admin" parameter does not work as expected).
* Try and fix bug #7233 - print fails with jobs >4GB from Win7 clients.Jeremy Allison2010-03-101-1/+1
| | | | | Remove an arbitrarty 4G B limit that *doesn't need to be there* ! Jeremy.
* s3: Fix a long-standing problem with recycled PIDsVolker Lendecke2010-03-102-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a samba server process dies hard, it has no chance to clean up its entries in locking.tdb, brlock.tdb, connections.tdb and sessionid.tdb. For locking.tdb and brlock.tdb Samba is robust by checking every time we read an entry from the database if the corresponding process still exists. If it does not exist anymore, the entry is deleted. This is not 100% failsafe though: On systems with a limited PID space there is a non-zero chance that between the smbd's death and the fresh access, the PID is recycled by another long-running process. This renders all files that had been locked by the killed smbd potentially unusable until the new process also dies. This patch is supposed to fix the problem the following way: Every process ID in every database is augmented by a random 64-bit number that is stored in a serverid.tdb. Whenever we need to check if a process still exists we know its PID and the 64-bit number. We look up the PID in serverid.tdb and compare the 64-bit number. If it's the same, the process still is a valid smbd holding the lock. If it is different, a new smbd has taken over. I believe this is safe against an smbd that has died hard and the PID has been taken over by a non-samba process. This process would not have registered itself with a fresh 64-bit number in serverid.tdb, so the old one still exists in serverid.tdb. We protect against this case by the parent smbd taking care of deregistering PIDs from serverid.tdb and the fact that serverid.tdb is CLEAR_IF_FIRST. CLEAR_IF_FIRST does not work in a cluster, so the automatic cleanup does not work when all smbds are restarted. For this, "net serverid wipe" has to be run before smbd starts up. As a convenience, "net serverid wipedbs" also cleans up sessionid.tdb and connections.tdb. While there, this also cleans up overloading connections.tdb with all the process entries just for messaging_send_all(). Volker
* Fix for bug #7189 - Open txt files with notepad on samba shares creates problem.Jeremy Allison2010-03-052-1/+4
| | | | | | | | | | Ensure we don't use any of the create_options for Samba private use. Add a new parameter to the VFS_CREATE call (private_flags) which is only used internally. Renumber NTCREATEX_OPTIONS_PRIVATE_DENY_DOS and NTCREATEX_OPTIONS_PRIVATE_DENY_FCB to match the S4 code). Rev. the VFS interface to version 28. Jeremy.
* s3-print: Remove obsolete signal type cast.Andreas Schneider2010-02-231-3/+3
|
* s3: convert registry and printing code to TYPESAFE_QSORT()Andrew Tridgell2010-02-141-3/+2
|
* Use sec_initial_uid() in the places where being root doesn't matter,Jeremy Allison2010-02-121-1/+1
| | | | | | and 0 in the places where it does. Jeremy
* s3: Replace most calls to sid_append_rid() by sid_compose()Volker Lendecke2010-01-101-2/+2
|
* s3-spoolss: use driver level info8 everywhere in spoolss server internally.Günther Deschner2009-12-081-99/+196
| | | | Guenther
* s3-spoolss: a default printer should have at least a "PrintDriverData" key.Günther Deschner2009-12-071-0/+7
| | | | Guenther
* s3: "print_job_end" only looks at the sizeVolker Lendecke2009-11-291-2/+1
|
* s3: Pass the "fake dir create times" parameter to sys_*statVolker Lendecke2009-11-291-1/+2
| | | | Step 0 to restore it as a per-share paramter
* Fix warnings with talloc_asprintf.Jeremy Allison2009-11-251-3/+3
| | | | Jeremy.
* s3-printing: remove duplicate code while cleaning up driver structs.Günther Deschner2009-11-231-68/+39
| | | | Guenther
* s3-printing: use spoolss types and structs while getting and deleting drivers.Günther Deschner2009-11-231-166/+157
| | | | Guenther
* s3-printing: use spoolss types and structs while adding drivers.Günther Deschner2009-11-231-275/+167
| | | | Guenther
* Remove "store create time" code, cause create time to be storedJeremy Allison2009-11-171-5/+4
| | | | | | | | | | | | in the "user.DOSATTRIB" EA. From the docs: In Samba 3.5.0 and above the "user.DOSATTRIB" extended attribute has been extended to store the create time for a file as well as the DOS attributes. This is done in a backwards compatible way so files created by Samba 3.5.0 and above can still have the DOS attribute read from this extended attribute by earlier versions of Samba, but they will not be able to read the create time stored there. Storing the create time separately from the normal filesystem meta-data allows Samba to faithfully reproduce NTFS semantics on top of a POSIX filesystem. Passes make test but will need more testing. Jeremy.
* s3-registry: use pull_reg_sz() where appropriate.Günther Deschner2009-10-011-3/+6
| | | | | | (and move away from rpcstr_pull and rpcstr_pull_talloc). Guenther
* s3-printing: use regval_ctr_addvalue_multi_sz.Günther Deschner2009-09-301-17/+4
| | | | Guenther
* s3-registry: use regval_ctr_addvalue_sz().Günther Deschner2009-09-301-22/+6
| | | | | | Greatly simplifies and cleanes up the code. Guenther
* s3-registry: use push_reg_sz().Günther Deschner2009-09-301-15/+9
| | | | Guenther
* s3-spoolss: remove device mode defines from nt_printing.h.Günther Deschner2009-08-101-12/+17
| | | | Guenther
* s3:smbd: conn_free_internal() can be static nowStefan Metzmacher2009-08-071-3/+3
| | | | metze
* s3: Convert a few callers of unix_convert() over to filename_convert()Tim Prouty2009-07-241-5/+23
| | | | | | This patch also changes the unix convert flags to make sure the correct semantics are preservered for allowing/disallowing wildcards in the last component of the path.
* s3: Finish plumbing the fsp->fsp_name smb_fname conversion through the modules.Tim Prouty2009-07-201-2/+8
|
* s3-vlp: drastically shrink size and dependencies of the virtual line printer.Günther Deschner2009-06-261-11/+8
| | | | | | This gets vlp from 13M down to 214K on my box. Guenther
* s3-printing: eliminate another non sec_initial_uid using security check.Günther Deschner2009-06-241-1/+1
| | | | Guenther
* s3: forward MSG_DEBUG from smbd parent to all childrenAravind Srinivasan2009-06-221-0/+19
| | | | | | | | | | | | | | | | | | | Before 3.3, an smbcontrol debug message sent to the target "smbd" would actually be sent to all running processes including nmbd and winbindd. This behavior was changed in 3.3 so that the "smbd" target would only send a message to the process found in smbd.pid, while the "all" target would send a message to all processes. The ability to set the debug level of all processes within a single daemon, without specifying each pid is quite useful. This was implemented in winbindd in 065760ed. This patch does the same thing for smbd. Upon receiving a MSG_DEBUG the parent smbd will rebroadcast it to all of its children. The printing process has been added to the list of smbd child processes, and we now always track the number of smbd children regardless of the "max smbd processes" setting.
* Fix coverity #740. Resource leak in error paths. We shouldJeremy Allison2009-06-191-3/+2
| | | | | always return queue here as the caller will free. Jeremy.