summaryrefslogtreecommitdiffstats
path: root/source3/printing
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* s3-printing: fix move_driver_to_download_area() error pathsDavid Disseldorp2011-03-021-68/+51
| | | | | | | | | | WERR_ACCESS_DENIED errors are mapped to WERR_UNKNOWN_PRINTER_DRIVER, resulting in incorrect error messages on Windows clients. move_driver_to_download_area() returns the same error status values to the caller via the *perr argument as well as the return value. The create_directory() call is not checked for error.
* Fix compiler warning on casting -1 to uint32.Jeremy Allison2011-02-281-3/+3
|
* Fix some typesJelmer Vernooij2011-02-281-1/+1
| | | | | Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Mon Feb 28 23:30:06 CET 2011 on sn-devel-104
* s3-printing: move more printing structs to printing.hGünther Deschner2011-02-221-0/+1
| | | | Guenther
* s3-printing: only include printing where really needed.Günther Deschner2011-02-222-1/+5
| | | | Guenther
* s3-printing: fix pcacp prototypes and includes.Günther Deschner2011-02-222-0/+7
| | | | Guenther
* s3-printing: isolate print notification prototypes better.Günther Deschner2011-02-223-0/+89
| | | | Guenther
* s3: Fix a typoVolker Lendecke2011-02-221-1/+1
|
* s3-auth Rename auth_serversupplied_info varaiables: server_info -> session_infoAndrew Bartlett2011-02-224-47/+47
| | | | | | | | | | | | | | | | | | | | | These variables, of type struct auth_serversupplied_info were poorly named when added into 2001, and in good consistant practice, this has extended all over the codebase in the years since. The structure is also not ideal for it's current purpose. Originally intended to convey the results of the authentication modules, it really describes all the essential attributes of a session. This rename will reduce the volume of a future patch to replaced these with a struct auth_session_info, with auth_serversupplied_info confined to the lower levels of the auth subsystem, and then eliminated. (The new structure will be the output of create_local_token(), and the change in struct definition will ensure that this is always run, populating local groups and privileges). Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3-rpc_server: move services into individual directories.Günther Deschner2011-02-102-2/+2
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Thu Feb 10 22:13:17 CET 2011 on sn-devel-104
* s3-auth Rename cryptic 'ptok' to security_tokenAndrew Bartlett2011-02-101-3/+3
| | | | | | | | | This will allow the auth_serversupplied_info struct to be migrated to auth_session_info easier. Adnrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3:printing: use dcerpc_spoolss_X() functionsStefan Metzmacher2011-01-212-47/+84
| | | | | | | | | metze Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User: Andreas Schneider <asn@samba.org> Autobuild-Date: Fri Jan 21 13:14:49 CET 2011 on sn-devel-104
* s3-printing: remove printer_list_need_refreshDavid Disseldorp2011-01-073-41/+0
| | | | | | | | | | printer_list_need_refresh() was used previously to ensure one smbd process did not attempt to update the printer_list tdb during or soon after update by another smbd. It is no longer needed, as pcap updates are now only performed by the parent smbd process following startup, SIGHUP, config update or printcap cache time expiry.
* s3-printing: remove old entries in pcap_cache_replaceDavid Disseldorp2011-01-073-11/+24
| | | | | | Callers of pcap_cache_replace() assume the existing printcap cache is replaced by the new values provided. This is not currently the case, old entries should be removed.
* s3-printing: reload shares after pcap cache fillDavid Disseldorp2011-01-074-15/+52
| | | | | | | | | | | | | | | | Since commit eada8f8a, updates to the cups pcap cache are performed asynchronously - cups_cache_reload() forks a child process to request cups printer information and notify the parent smbd on completion. Currently printer shares are reloaded immediately following the call to cups_cache_reload(), this occurs prior to smbd receiving new cups pcap information from the child process. Such behaviour can result in stale print shares as outlined in bug 7836. This fix ensures print shares are only reloaded after new pcap data has been received. Pair-Programmed-With: Lars Müller <lars@samba.org>
* s3-printing: fix crash bug in print_spool_open().Günther Deschner2010-12-221-1/+3
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed Dec 22 14:21:58 CET 2010 on sn-devel-104
* s3-printing: fix printer_list_traverse()David Disseldorp2010-12-201-1/+1
| | | | | | | | | The tdb traverse function returns the number of elements traversed, or less than zero on error, printer_list_traverse() is incorrectly checking for non-zero return. Autobuild-User: Andreas Schneider <asn@samba.org> Autobuild-Date: Mon Dec 20 18:44:41 CET 2010 on sn-devel-104
* s3-spoolss: Fix Bug #7641: handle win9x adddriver calls w/o config file.Günther Deschner2010-11-291-2/+8
| | | | | | This turned cupsaddsmb to run into an infinite loop. Guenther
* Fix bug 7781 - Samba transforms ShareName to lowercase (sharename) when ↵Jeremy Allison2010-11-101-12/+17
| | | | | | | | | adding new share via MMC Change the find_service() interface to not depend on fstring, and create a useable talloc-based interface. Jeremy.
* Revert "Wrap security_token_has_privilege() with a check for ↵Jeremy Allison2010-10-221-1/+1
| | | | | | | | | | | | lp_enable_privileges(). Needed" Not needed - privileges code prevents "enable privileges = no" from adding privileges anyway. This reverts commit a8b95686a7bde3f96f141b6938e24e101567ef54. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Oct 22 23:41:36 UTC 2010 on sn-devel-104