summaryrefslogtreecommitdiff
path: root/source3/printing
AgeCommit message (Collapse)AuthorFilesLines
2012-06-06s3:printing: let print_spool_open() take a uint64_t vuidStefan Metzmacher1-1/+1
metze
2012-06-06s3:printing: use smbd/smbd.h instead of just smbd/proto.h in queue_process.cStefan Metzmacher1-1/+1
This fixes compiler warnings regarding incomplete types. metze
2012-06-06s3:printing: add print_spool_rap_jobid()Stefan Metzmacher1-0/+9
metze
2012-06-06s3:printing: make struct print_file_data private to printspoolss.cStefan Metzmacher1-0/+9
metze
2012-05-31Forward port of Richard Sharpe's <realrichardsharpe@gmail.com> fix for bug ↵Jeremy Allison1-1/+6
#8970 - Possible memory leaks in the samba master process.
2012-05-24s3:smbd/msdfs: let create_conn_struct() also fake the 'smbd_server_connection'Stefan Metzmacher1-3/+12
metze
2012-04-06build: Remove SMB_OFF_T, replace with off_tAndrew Bartlett2-4/+4
Now that we always require a 64 bit off_t, we no longer need SMB_OFF_T. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri Apr 6 01:47:43 CEST 2012 on sn-devel-104
2012-03-24lib/util: Remove obsolete sys_getpid() and sys_fork().Jelmer Vernooij5-14/+14
The performance of these is minimal (these days) and they can return invalid results when used as part of applications that do not use sys_fork(). Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Mar 24 21:55:41 CET 2012 on sn-devel-104
2012-03-14s3-printing: Make printer a const char *.Andreas Schneider1-2/+6
2012-03-04change low FDs are handled in SambaAndrew Bartlett1-3/+0
We now only close fds 0, 1, 2 when we are a forked daemon, and take care not to close a file descriptor that we might need for foreground stdin monitoring. This should fix stdout logging in the lsa and epmapper deamons (ie in make test). Andrew Bartlett
2012-02-18Fix a bunch of "unused variable" warnings.Jeremy Allison1-5/+0
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Feb 18 06:22:40 CET 2012 on sn-devel-104
2012-02-15s3-printing: fix crash in printer_list_set_printer()David Disseldorp1-1/+1
The printer list database format was recently changed to accommodate for the printcap location field. One of the tdb_pack calls is not provided with a location string argument, this causes a crash on some platforms. https://bugzilla.samba.org/show_bug.cgi?id=8762 Signed-off-by: Günther Deschner <gd@samba.org> Signed-off-by: Jim McDonough <jmcd@samba.org> Signed-off-by: Lars Müller <lars@samba.org> Autobuild-User: David Disseldorp <ddiss@samba.org> Autobuild-Date: Wed Feb 15 19:34:38 CET 2012 on sn-devel-104
2012-02-14s3: files_struct->mode is only written, remove itVolker Lendecke1-1/+0
Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Tue Feb 14 19:14:29 CET 2012 on sn-devel-104
2012-02-09s3-printing: Add new printers to registry.Björn Baumbach1-2/+17
This fixes bug #8554, #8612 and #8748. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Thu Feb 9 16:39:04 CET 2012 on sn-devel-104
2012-01-27Finally remove all malloc()'s from the substitute code. Now totallyJeremy Allison1-3/+1
talloc() based. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Jan 27 03:43:21 CET 2012 on sn-devel-104
2012-01-23WERROR type variable being incorrectly checked with a NT_STATUS_IS_XDavid Disseldorp1-1/+1
type macro.
2012-01-20s3-spoolss: prefix print$ path on driver file deletionDavid Disseldorp1-44/+37
Driver file paths stored in the registry do not include the server path prefix. delete_driver_files() incorrectly assumes such a prefix. https://bugzilla.samba.org/show_bug.cgi?id=8697 Signed-off-by: Andreas Schneider <asn@samba.org>
2012-01-18s3: Add a "lock_order" argument to db_openVolker Lendecke1-1/+1
This will be used to enforce a lock hierarchy between the databases. We have seen deadlocks between locking.tdb, brlock.tdb, serverid.tdb and notify*.tdb. These should be fixed by refusing a dbwrap_fetch_locked that does not follow a defined lock hierarchy.
2012-01-17s3:printing: avoid messaging_event_context() in print_queue_housekeeping()Stefan Metzmacher1-6/+21
metze
2011-12-16s3:printing/spoolssd: avoid using server_messaging_context()Stefan Metzmacher1-1/+1
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Dec 16 16:29:41 CET 2011 on sn-devel-104
2011-12-15s3:printing/spoolssd: pass event and messaging context to check_updater_child()Stefan Metzmacher1-5/+4
metze
2011-12-13s3: Remove a call to procid_self()Volker Lendecke1-1/+1
2011-12-12s3: Remove a bunch of calls to procid_self()Volker Lendecke3-4/+4
All callers to messaging_[re]init only used procid_self()
2011-12-08s3: Fix typosVolker Lendecke1-1/+1
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Thu Dec 8 12:05:55 CET 2011 on sn-devel-104
2011-11-03s3-printing: fix typoBjörn Baumbach1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-27s3: Include uid_wrapper where it is missing.Andreas Schneider1-0/+1
2011-10-11s3:printing: convert printer_list to use dbwrap wrapper functionsMichael Adam1-11/+20
Avoid direct use of the db_record and db_context structs.
2011-10-11s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and ↵Michael Adam1-6/+4
dbwrap_fetch_bystring_upper() to NTSTATUS
2011-09-26s3: Remove the smbd_server_conn ref from create_conn_structVolker Lendecke1-3/+7
2011-09-09s3-spoolss: Fix bug #8351 forms migration.Andreas Schneider1-0/+4
Don't fail if the form already exists (or is builtin now). Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Sep 9 03:21:42 CEST 2011 on sn-devel-104
2011-09-05s3-smbd: Rename reload_printers() and add documentation.Andreas Schneider2-3/+3
Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Mon Sep 5 17:59:47 CEST 2011 on sn-devel-104
2011-09-05s3-spoolssd: Remove stale printers only on a valid pcap update.Andreas Schneider1-2/+2
load_printers() removes stale printers and we should only remove them if we have a CUPS connection and talked to cups. Else we will remove every configured printer if cups is not available. Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Mon Sep 5 11:18:23 CEST 2011 on sn-devel-104
2011-08-21s3-spoolss: Remove useless checkSimo Sorce1-24/+4
If we *really* are a bout to exit (PF_WORKER_EXITING) then the event will not be called as the loop will exit. Otherwise PF_SRV_MSG_EXIT may not be honoured for a long time if we have cients connected, therefore keep handling SIGHUP properly in those cases. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-spoolssd: Listen on parent messagesSimo Sorce1-0/+18
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-spoolssd: Send a message to the parent when we accept a connectionSimo Sorce1-0/+25
Every time we accept a connection wanr the parent, so it can run management routines and reallocate more resources if necessary. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-spoolssd: User new prefork helpers to simplify code.Simo Sorce1-27/+3
Also stop using the listening as now the prefork code properly sets the PF_WORKER_ACCEPTING flag and it can be relied upon without having to keep additional status around. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-prefork: Fix worker flags handling.Simo Sorce1-1/+1
We can't have a clear idea of wether the worker is IDLE or BUSY. The only things we can tell is if it is Alive, whether it is currently Accepting connections or wether it is Exiting soon. Remove PF_WORKER_IDLE, PF_WORKER_BUSY and replace their use with PF_WORKER_ALIVE. Also properly assign PF_WORKER_ACCEPTING so that users of the API can rely on the flag. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-prefork: do not use a lock_fd, just race on accept()Simo Sorce1-17/+3
We used a lock mimicking what apache does for preforked children. But it doesn't work properly in our case because we do not stop once a request has been served. Clients are allowed to perform multiple requests and keep the connection open. This means that if we allow multiple clients per children, then a child could take the lock and then be asked to do a long or even locking operation by a client it already is serving. This woulkd cause the whole server to deadlock, as the child is now busy and also holding on the lock. Using a race on accept() by having a tevent_fd on the listening socket wait for read events we never deadlock. At most we cause a bit of contention among children. But in the generic case connections are much less frequent for us as clients tend to be long lived. So the little contention we may have is not a big deal. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-spoolssd: Use prefrok utils to manage childrenSimo Sorce1-122/+26
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-spoolss: Introduce helper function to manage pool.Simo Sorce1-52/+64
We were not properly managing allowed clients and pool management was duplicated across a few callers. Concentrate all management heuristics in one single function. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-spoolssd: Fix spoolss logging.Simo Sorce1-13/+11
Use the same code as in lsasd. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-rpc_server: Replace RPC_SERVICE_MODE_DAEMON checksSimo Sorce1-3/+2
Use rpc_daemon_type() macros where appropriate instead. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-spoolssd: Check if we were able to create the prefork pool.Andreas Schneider1-0/+3
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-11s3-messaging: Do not register to classes we are not going to use.Simo Sorce2-3/+2
Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Thu Aug 11 17:09:30 CEST 2011 on sn-devel-104
2011-08-11s3-messaging: Remove obsolete class.Simo Sorce1-2/+0
The FLAG_MSG_PRINT_NOTIFY class is actually obsolete and never used, as the only message belonging to it is not used either. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-spoolss: Fix prototypes warnings.Andreas Schneider1-1/+4
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-printing: Do not try to force reload.Simo Sorce1-1/+5
Be more correct in load printers at startup. If async process have already started we do not need to force a reload, but we just need to load the printers. If other process have not finished initializing it makes no sense to try to force them as they are masking SIGHUP unitl init is done anyway. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-spoolss: do not call pcap_cache_reload() directlySimo Sorce1-5/+17
The background queue process is repsonsible for that. Just reload printers if necessary or wait for a message from bq to do that. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-printing: Add child handler to bq processSimo Sorce1-4/+32
The cups backend forks a child to do asynchronous work. We need a sigchld handler in bq to properly wait for the chilod to finish and reap it, otherwise it hangs the forever as a zombie process. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-spoolss: Fix printers related messagingSimo Sorce1-4/+34
Children were not properly receiving messages to reload printers when the background queue process was dispatching them. Signed-off-by: Andreas Schneider <asn@samba.org>