summaryrefslogtreecommitdiff
path: root/source3/include/local.h
Commit message (Collapse)AuthorAgeFilesLines
* s3:includes: change OPLOCK_BREAK_TIMEOUT from 30 to 35 secondsStefan Metzmacher2020-07-081-1/+1
| | | | | | | | | | | | This is what windows is using for normal oplock and lease breaks. Note that windows uses higher values for persistent handles, they use 60 seconds for oplocks and 180 seconds for leases. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11897 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* s3: smbd: Add a note explaining MAX_DIRECTORY_HANDLES only applies to SMB1.Jeremy Allison2019-07-091-1/+1
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: smbd: Remove now unused MAX_OPEN_DIRECTORIES define.Jeremy Allison2019-07-091-5/+0
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: smbd: Remove unused DPTR_IDLE_TIMEOUT.Jeremy Allison2019-07-091-1/+0
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* param: change default of "allocation roundup size" to 0Björn Jacke2019-07-071-3/+0
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* smbd: Move deadtime default to parameter definition and man pageChristof Schmitt2019-05-011-1/+0
| | | | | | | | | | The code has a default of one week (10080 minutes) if the parameter is set to 0. Make this the public default of the parameter, instead of hiding it in the code. This change also has the code match the documentation that setting this parameter to 0 disables the check. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/util: Move log_stack_trace() to common codeAndrew Bartlett2018-04-111-3/+0
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* winbindd: set file descriptor limit according to configurationUri Simchoni2015-07-151-0/+4
| | | | | | | | | | | | | Set the winbindd process file descriptor limit according to the values that affect it in the configuration: - Maximum number of clients - Number of outgoing connections per domain BUG: https://bugzilla.samba.org/show_bug.cgi?id=11397 Signed-off-by: Uri Simchoni <urisimchoni@gmail.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3:include: remove used unused {CLIENT,SERVER}_NDR_PADDING_SIZEStefan Metzmacher2015-06-231-3/+0
| | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=11061 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* param: move SMB2 defaults to lib/param and use in loadparm_initGarming Sam2014-02-121-5/+0
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3: increase default fudge factor for max open files from 20 to 40Garming Sam2014-02-101-1/+1
| | | | | | | | | Tests show that Samba's smbd uses 38 open files at startup. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
* lib/param: Move GUEST_ACCOUNT define to a common headerAndrew Bartlett2014-01-281-5/+0
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s3:smbd: use session_global_id as session number for pam and utmpGregor Beck2012-10-191-20/+0
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smb2_server: remove unused and confusing ↵Stefan Metzmacher2012-06-291-1/+0
| | | | | | DEFAULT_SMB2_MAX_CREDIT_BITMAP_FACTOR metze
* s3:smbd: change user_struct->vuid to uint64_tStefan Metzmacher2012-06-061-1/+1
| | | | | | | | | | Only sconn->smb1.sessions.next_vuid remains as uint16_t, so that we do not generate larger values yet. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Jun 6 12:07:33 CEST 2012 on sn-devel-104
* s3:smb2_server increase defaults for read/write/trans sizes to 1MBChristian Ambach2012-03-091-3/+3
| | | | Signed-off-by: Jeremy Allison <jra@samba.org>
* s3-winbind: Increase the negative cache entry timout.Andreas Schneider2011-11-151-1/+1
| | | | | The timout for the cache entry of a negative connection should be the double of a connect timeout (which is 30 seconds).
* Another part of the fix for Bug 8473 - smb2_find uses a hard coded max reply ↵Jeremy Allison2011-10-131-3/+3
| | | | | | | | | | | size of 0x10000 instead of smb2_max_trans. Change the defaults and the documentation to reflect the 64k limit. Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Oct 13 12:22:23 CEST 2011 on sn-devel-104
* First part of bugfix for bug #8335 - file copy aborts with ↵Jeremy Allison2011-07-291-1/+1
| | | | | | | smb2_validate_message_id: bad message_id Set default max credits to 8192 now this has been documented in the SMB2 spec.
* param: Merge param headers into lib/param/loadparm.hAndrew Bartlett2011-06-291-29/+0
| | | | | | | This defines a common table format, so we can in future define a common table. Andrew Bartlett
* lib/util: new merged debug systemAndrew Bartlett2011-03-011-5/+0
| | | | | | | | | | | | This is the s3 debug system, with a number of changes to tidy it up for common use. The debug class system is simplified by the removal of the ISSET table, the system no longer attempts to cope with assignment of DEBUGLEVEL, and the full class table is always available (rather than just DEBUGLEVEL_CLASS[DBCG_ALL]) from startup. It is also no longer confusingly described as a hack, but as the initial table. Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Mar 1 04:32:12 CET 2011 on sn-devel-104
* s3-printing: Initiate pcap reload from parent smbdDavid Disseldorp2011-01-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 7022554, smbds share a printcap cache (printer_list.tdb), therefore ordering of events between smbd processes is important when updating printcap cache information. Consider the following two process example: 1) smbd1 receives HUP or printcap cache time expiry 2) smbd1 checks whether pcap needs refresh, it does 3) smbd1 marks pcap as refreshed 4) smbd1 forks child1 to obtain cups printer info 5) smbd2 receives HUP or printcap cache time expiry 6) smbd2 checks whether pcap needs refresh, it does not (due to step 3) 7) smbd2 reloads printer shares prior to child1 completion (stale pcap) 8) child1 completion, pcap cache (printer_list.tdb) is updated by smbd1 9) smbd1 reloads printer shares based on new pcap information In this case both smbd1 and smbd2 are reliant on the pcap update performed on child1 completion. The prior commit "reload shares after pcap cache fill" ensures that smbd1 only reloads printer shares following pcap update, however smbd2 continues to present shares based on stale pcap data. This commit addresses the above problem by driving pcap cache and printer share updates from the parent smbd process. 1) smbd0 (parent) receives a HUP or printcap cache time expiry 2) smbd0 forks child0 to obtain cups printer info 3) child0 completion, pcap cache (printer_list.tdb) is updated by smbd0 4) smbd0 reloads printer shares 5) smbd0 notifies child smbds of pcap update via message_send_all() 6) child smbds read fresh pcap data and reload printer shares This architecture has the additional advantage that only a single process (the parent smbd) requests printer information from the printcap backend. Use time_mono in housekeeping functions As suggested by Björn Jacke.
* My algorithm for determining whan an incoming sequence number can be allowed ↵Jeremy Allison2010-12-211-0/+1
| | | | | | | | | | is incorrect. (I based it on the text in MS-SMB2, silly me :-). Fix it so incoming sequence numbers can range over the entire allowable bitmap range. This fixes a repeatable disconnect against Win7. Jeremy.
* Add a SMB2 crediting algorithm, by default the same as Windows. Defaults to ↵Jeremy Allison2010-12-101-0/+5
| | | | | | 128 credits. Jeremy.
* s3:include: move MAX_DEBUG_LEVEL from local.h to debug.hStefan Metzmacher2010-10-241-9/+0
| | | | metze
* Allows changing the maximum number of simultaneous clients in winbindd ↵Pierre Carrier2010-09-141-3/+0
| | | | | | through an smb.conf option. Signed-off-by: Jeremy Allison <jra@samba.org>
* Fix bug #7146 - Samba miss-parses authenticated RPC packets.Jeremy Allison2010-02-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parts of the Samba RPC client and server code misinterpret authenticated packets. DCE authenticated packets actually look like this : +--------------------------+ |header | | ... frag_len (packet len)| | ... auth_len | +--------------------------+ | | | Data payload | ... .... | | +--------------------------+ | | | auth_pad_len bytes | +--------------------------+ | | | Auth footer | | auth_pad_len value | +--------------------------+ | | | Auth payload | | (auth_len bytes long) | +--------------------------+ That's right. The pad bytes come *before* the footer specifying how many pad bytes there are. In order to read this you must seek to the end of the packet and subtract the auth_len (in the packet header) and the auth footer length (a known value). The client and server code gets this right (mostly) in 3.0.x -> 3.4.x so long as the pad alignment is on an 8 byte boundary (there are some special cases in the code for this). Tridge discovered there are some (DRS replication) cases where on 64-bit machines where the pad alignment is on a 16-byte boundary. This breaks the existing S3 hand-optimized rpc code. This patch removes all the special cases in client and server code, and allows the pad alignment for generated packets to be specified by changing a constant in include/local.h (this doesn't affect received packets, the new code always handles them correctly whatever pad alignment is used). This patch also works correctly with rpcclient using sign+seal from the 3.4.x and 3.3.x builds (testing with 3.0.x and 3.2.x to follow) so even as a server it should still work with older libsmbclient and winbindd code. Jeremy
* Final part of the fix for 6837 - "Too many open files" when trying to access ↵Jeremy Allison2009-12-161-12/+12
| | | | | | | | | large number of files Win7 needs a min of 16k file handles to work against a server. Jeremy.
* Fix bug #6837 - "Too many open files" when trying to access large number of ↵Jeremy Allison2009-12-021-1/+19
| | | | | | | | files from Windows 7. Original patch by me fixed up with the correct open files number by jmaggard10@hotmail.com. Jeremy.
* Parameterize in local.h the MAX_RPC_DATA_SIZE, and ensureJeremy Allison2009-02-131-0/+3
| | | | | | that "offered" read from the rpc packet in spoolss is under that size. Tidyup from analysis from Veracode. Jeremy.
* smbd: make it possible to change the write time delay for testingStefan Metzmacher2008-04-071-0/+3
| | | | | metze (This used to be commit df8c100c2b53575a0d425a2daf52e2d59904746a)
* r17107: Make the 200 ms timeout value tunable in local.h...Jeremy Allison2007-10-101-0/+3
| | | | | | Might need to be a parameter ? Jeremy. (This used to be commit 98d8d9399bb287319578daaf2a2fb42f3c48f858)
* r14763: Add a new tuning parameter, open files database hash size,Jeremy Allison2007-10-101-1/+1
| | | | | | | | | | this allows us to experiment with ensuring the tdb hash size for our open files and locking db are appropriately sized. Make the hash size larger by default (10007 instead of 1049) and make the locking db hash size the same as the open file db hash size. Jeremy. (This used to be commit e7225f7e813423c3e2a94af6a9d7ce8a1b50a166)
* r13316: Let the carnage begin....Gerald Carter2007-10-101-0/+9
| | | | | Sync with trunk as off r13315 (This used to be commit 17e63ac4ed8325c0d44fe62b2442449f3298559f)
* r11435: Allow the hash size of the tdb open (locking) databaseJeremy Allison2007-10-101-0/+3
| | | | | | | | | to be set in local.h. Change from the default (131) to another prime (1049). Should this be an smb.conf tunable parameter based on the number of open file descriptors available ? If so what scaling factor ? More tests to follow. Jeremy. (This used to be commit 6a902ec49ffea5d0ca0308d5ff51584cece41043)
* r5636: Re-add the allocation size - parameterized by share asJeremy Allison2007-10-101-0/+3
| | | | | | | | "allocation roundup size", by default set as 1Mb. From advice by BlueArc about Windows client behaviour. VC++ people can set this to zero to turn it off. Jeremy. (This used to be commit 833ca101772bfab65dbd79eb64f63464177f144e)
* r5548: Stop lying about allocation sizes to Windows clients. It was a niceJeremy Allison2007-10-101-3/+0
| | | | | | | idea, and aparently improved performance in some circumstances, but it breaks the VC++ compiler :-(. Not cool. Fix bug #2146. Jeremy. (This used to be commit b9f147634df0126320ffe3b9a23068e76f6c1681)
* r1325: Always use GetTimeOfDay() (wrapper). Ensure ldap replicationJeremy Allison2007-10-101-0/+2
| | | | | | | sleep time is not more than 5 seconds. Should fix issue reported by Chris Garrigues <cwg@deepeddy.com>. Jeremy. (This used to be commit fbc06831d3a7e8645409158ee1ae1f9f192913a7)
* r1085: Now it's had some proper user testing, merge in the deferred open ↵Jeremy Allison2007-10-101-0/+3
| | | | | | | | | fix. I'm still doing more testing, but it fixes a behaviour that we've been wrong on ever since the start of Samba. Jeremy. (This used to be commit 894cc6d16296b934c112786eec896846156aee5d)
* parameterise the listen backlog in smbd and make it larger by default. A ↵Andrew Tridgell2003-10-291-0/+3
| | | | | | backlog of 5 is way too small these days. (This used to be commit bbb92d2b0ea6bc10c71bed62924bfc95c11172a5)
* Backport my backtrace patch from HEADJelmer Vernooij2003-04-141-0/+4
| | | | (This used to be commit 66fcf6b4938a87e5ded7c7e5830a6a54e4439544)
* *Excellent* patch from Michael Steffens <michael_steffens@hp.com> to limitJeremy Allison2003-02-281-0/+2
| | | | | | | | | | the unix domain sockets used by winbindd (also solves FD_SETSIZE problem in winbindd to boot !). Adds a "last_access" field to winbindd connections, and will close the oldest idle connection once the number of open connections goes over WINBINDD_MAX_SIMULTANEOUS_CLIENTS (defined in local.h as 200 currently). Jeremy. (This used to be commit 7a586552a3aeb4a26495f0965af4bd027456a011)
* Remove obsolete file lib/netatalk.c - We now have a vfs moduleJelmer Vernooij2003-02-151-3/+0
| | | | (This used to be commit fcc7a197b1ec85f9492e335a824317a904b0c919)
* Fixed up mutex protection around winbindd logon code. Sync with APP-HEAD.Jeremy Allison2003-01-161-0/+8
| | | | | Jeremy. (This used to be commit daf179bcd6297b525bfc644efb154734723f4d58)
* Fix for systems that allow more than 65536 open files per process.Jeremy Allison2002-10-221-0/+3
| | | | | Jeremy. (This used to be commit 947a56ce00e552e8b8d2ed64435eabde6225f044)
* Add a timeout to tdb_lock_bystring(). Ensure we never have more thanJeremy Allison2002-10-041-0/+3
| | | | | | MAX_PRINT_JOBS in a queue. Jeremy. (This used to be commit 9fe3c0b90d4bff2217e3cb5a34b4683ca314c06e)
* sync'ing up for 3.0alpha20 releaseGerald Carter2002-09-251-6/+1
| | | | (This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139)
* sync 3.0 branch with headJelmer Vernooij2002-08-171-1/+13
| | | | (This used to be commit 3928578b52cfc949be5e0ef444fce1558d75f290)
* updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell2002-07-151-1/+1
| | | | (This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
* This split the mangling code up to allow for the possibility of multipleAndrew Tridgell2002-04-111-0/+6
| | | | | | | mangling implementation, selectable using "mangling method = " in smb.conf It also tidies the interface a little, although it is still nasty. (This used to be commit be23d87a178e7d0691e7d942adf89bb3d2d533c2)