summaryrefslogtreecommitdiffstats
path: root/source3/printing
Commit message (Collapse)AuthorAgeFilesLines
...
* rpc_server: Always use rpc_pipe_open_interface()Simo Sorce2011-05-131-1/+1
| | | | | | | | | | This way we can configure which rpc service we actually want to connect to. By default it uses an "embedded" interface and calls rpc_pipe_open_internal() Signed-off-by: Günther Deschner <gd@samba.org> Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Fri May 13 14:40:26 CEST 2011 on sn-devel-104
* s3-printing: make cups_pull_comment_location() work again.Günther Deschner2011-05-111-13/+2
| | | | | | | | | | we deal with lp_cups_server in cups_connect() already, inside the URI all our other cups functions we use ipp://localhost, do the same here. Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed May 11 11:36:07 CEST 2011 on sn-devel-104
* s3-printing: Fix double free of cups request.Günther Deschner2011-05-101-4/+0
| | | | | | | | | | | | | | | | We never free the request in our cups api usage except for here. The reason is probably htis (from the cupsDoConnect API docs): "This function sends the IPP request to the specified server, retrying and authenticating as necessary. The request is freed with ippDelete() after receiving a valid IPP response." Revert "Fix a memory leak in cups_pull_comment_location" This reverts commit fee2664dad37536b05ce8bdae3e74d45b257f632. Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Tue May 10 17:32:58 CEST 2011 on sn-devel-104
* s3-printing: very obvious fix for cups_pull_comment_location().Günther Deschner2011-05-101-1/+1
| | | | | | This has been in there since 2008... Guenther
* s3: only include tdb headers where needed.Günther Deschner2011-05-067-1/+8
| | | | Guenther
* More simple const fixes.Jeremy Allison2011-05-052-3/+3
|
* s3-printing: run minimal_includes.pl.Günther Deschner2011-05-054-9/+0
| | | | Guenther
* Fix warning messages caused by addition of null check in fstrcpy macro.Jeremy Allison2011-05-041-1/+2
|
* s3: include ntdomain.h before including generated srv_ headers.Günther Deschner2011-05-021-0/+1
| | | | Guenther
* s3-printing: include ../librpc/ndr/libndr.h in ads printing.Günther Deschner2011-05-021-0/+1
| | | | Guenther
* s3-printing: avoid using pipes_struct when only session_info is needed.Günther Deschner2011-05-021-12/+11
| | | | Guenther
* s3-proto: move remaining spoolss protos to own header file.Günther Deschner2011-05-022-0/+2
| | | | Guenther
* s3-proto: move rpc_srv_register protos and structs to town headerfile.Günther Deschner2011-05-021-0/+1
| | | | Guenther
* Fix compiler warning in debug message.Jeremy Allison2011-04-211-2/+2
|
* s3-smbd: fix the AIX 5.3 build.Günther Deschner2011-04-201-0/+1
| | | | | | (AIX defines open to be open64) Guenther
* s3-rpc_client: add and use rpc_client/rpc_client.h.Günther Deschner2011-04-132-0/+2
| | | | Guenther
* s3-printing: Use become_user_by_session() function.Andreas Schneider2011-04-111-3/+3
| | | | | | | | | | We create a fake connection here and don't have an vuid. So work with the session_info directly here. Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Apr 11 22:56:12 CEST 2011 on sn-devel-104
* s3: Fix print_spool_endVolker Lendecke2011-04-051-12/+0
| | | | | We have to use the spoolss pipe instance opened in print_spool_open, otherwise the spoolss server won't be able to find the right printer and job.
* s3-includes: only include ntdomain.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-messages: make ndr_messaging.h part of messages.h.Günther Deschner2011-03-304-4/+0
| | | | Guenther
* s3-messages: only include messages.h where needed.Günther Deschner2011-03-304-0/+4
| | | | Guenther
* s3-auth: printing needs auth.hGünther Deschner2011-03-304-0/+4
| | | | Guenther
* s3-locking: move locking prototypes out of proto.h.Günther Deschner2011-03-301-0/+1
| | | | | | Will later become part of locking.h Guenther
* s3: printing needs parts of smbd.Günther Deschner2011-03-303-0/+3
| | | | Guenther
* s3: include smbd/smbd.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-passdb: use passdb headers where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* registry: create and use shared libcli/registry/util_reg.h header.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-includes: only include system/filesys.h when needed.Günther Deschner2011-03-307-0/+7
| | | | Guenther
* s3-includes: only include system/passwd.h when needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-includes: only include system/syslog.h when needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-spoolssd: Register spoolssd endpoints.Andreas Schneider2011-03-291-0/+8
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* s3-spoolssd: Fixed logfile creation.Andreas Schneider2011-03-291-2/+11
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* s3-spoolssd: Added missing include.Andreas Schneider2011-03-291-0/+2
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* s3-spoolssd: Pass down event and messanging context.Andreas Schneider2011-03-291-20/+42
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* s3-spoolssd: Fixed reopening of logs.Andreas Schneider2011-03-291-8/+10
| | | | | | | Everytime the log was reopened a .spoolssd has been appended which resulted in long file names. Signed-off-by: Günther Deschner <gd@samba.org>
* s3:spoolssd Initialize the spoolss rpc interfacesSimo Sorce2011-03-291-0/+33
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* s3:spoolssd Add spoolss own signal handlersSimo Sorce2011-03-291-2/+53
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* s3:spoolssd handle smb.conf reloads directlySimo Sorce2011-03-291-0/+14
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* s3:spoolssd Create our own log fileSimo Sorce2011-03-291-0/+18
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* s3:spoolssd Add skeleton for spoolss daemonSimo Sorce2011-03-291-0/+83
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* s3:printing Make print_queue_receive publicSimo Sorce2011-03-291-1/+1
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* s3-printing: fix memory leak in print_cups.cDavid Disseldorp2011-03-161-16/+9
| | | | | | | | | | As found by valgrind, tmp_pcap_cache is not freed following printer list tdb update. Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Wed Mar 16 16:37:58 CET 2011 on sn-devel-104
* s3-printing: remove duplicate cups response processing codeDavid Disseldorp2011-03-161-147/+94
| | | | | | | | There is currently a lot of duplicate code included for processing responses to CUPS_GET_PRINTERS and CUPS_GET_CLASSES requests. This change splits this code into a separate function. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-printing: use printcap IDL for IPCDavid Disseldorp2011-03-161-131/+107
| | | | | | | | | Use printcap IDL for marshalling and unmarshalling messages between cups child and parent smbd processes. This simplifies the IPC and ensures the parent is notified of cups errors encountered by the child. https://bugzilla.samba.org/show_bug.cgi?id=7994 Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-printing: fix cups pcap reload with no printersDavid Disseldorp2011-03-041-12/+27
| | | | | | | | | | | | | | | | | cups_async_callback() is called to receive new printcap data from a child process which requests the information from cupsd. Newly received printcap information is stored in a temporary printcap cache (tmp_pcap_cache). Once the child process closes the printcap IPC file descriptor, the system printcap cache is replaced with the newly populated tmp_pcap_cache, however this only occurs if tmp_pcap_cache is non null (has at least one printer). If the printcap cache is empty, which is the case when cups is not exporting any printers, the printcap cache is not replaced resulting in stale data. https://bugzilla.samba.org/show_bug.cgi?id=7915 Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-printing: remove unneeded local_pcap_copy globalDavid Disseldorp2011-03-041-36/+18
| | | | | | | | | | | | | The cups local_pcap_copy global served as a temporary buffer during asynchronous cups printcap cache updates, as well as indicating when the printcap cache had not yet been filled and printcap cache update should block. As smbd printcap reads are now triggered by the parent smbd following printcap cache update, the variable and blocking mechanism are no longer needed. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-printing: follow force user/group for driver IODavid Disseldorp2011-03-041-1/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Configuring force user/group settings for the print$ share currently has unexpected results, this is explained by how the driver upload/add process takes place. Consider the following example: [print$] path = /print-drv write list = $DRIVER_UPLOAD_USER force group = ntadmin - the client connects to the [print$] share and uploads all driver files to the /print-drv/W32X86 directory. - This is permitted, as /print-drv/W32X86 is owned by group ntadmin, and the "force group = ntadmin" takes effect for the [print$] session. - Once all files are uploaded, the client connects to the [ipc$] share and issues an AddPrinterDriverEx spoolss request. - In handling this request move_driver_to_download_area() is called, which attempts to create the directory /print-drv/W32X86/3 - The create directory fails, as it is done as the user connected to the [ipc$] share which does not have permission to write to the driver directory. The [print$] "force group = ntadmin" has no effect. This is a regression from previous behaviour prior to the commit: 783ab04 Convert move_driver_to_download_area to use create_conn_struct. https://bugzilla.samba.org/show_bug.cgi?id=7921 Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-server_id: only include server_id where needed.Günther Deschner2011-03-021-0/+1
| | | | Guenther
* s3-printing: vfs_connect prior to driver/dfs IODavid Disseldorp2011-03-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | samba3.posix_s3.rpc.spoolss.driver fails with the xattr_tdb vfs module loaded as a part of make test. The (now checked) create_directory() call in move_driver_to_download_area() fails, uncovering another bug in the printer driver upload code path. move_driver_to_download_area() creates a new conn_struct for manipulating files in [print$]. The VFS layer is plumbed through with the call to create_conn_struct(), however SMB_VFS_CONNECT() is never called. Many vfs modules expect state stored at connect time with SMB_VFS_HANDLE_SET_DATA() to be available on any IO operation and fail if this is not the case. This fix adds a call to SMB_VFS_CONNECT() in create_conn_struct() prior to IO. https://bugzilla.samba.org/show_bug.cgi?id=7976 Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Mar 2 01:16:30 CET 2011 on sn-devel-104
* s3-printing: clean up get_correct_cversion error pathsDavid Disseldorp2011-03-021-18/+16
| | | | Remove an unneeded variable and simplify error paths.