summaryrefslogtreecommitdiff
path: root/source3/smbd/conn.c
AgeCommit message (Collapse)AuthorFilesLines
2008-10-01Fix use of DLIST_REMOVE as spotted by Constantine Vetoshev <gepardcv@gmail.com>.Jeremy Allison1-1/+1
This API is unusual in that if used to remove a non-list head it nulls out the next and prev pointers. This is what you want for debugging (don't want an entry removed from the list to be still virtually linked into it) but means there is no consistent idiom for use as the next and prev pointers get trashed on removal from the list, meaning you must save them yourself. You can use it one way when deleting everything via the head pointer, as this preserves the next pointer, but you *must* use it another way when not deleting everything via the head pointer. Fix all known uses of this (the main one is in conn_free_internal() and would not free all the private data entries for vfs modules. The other changes in web/statuspage.c and winbindd_util.c are not strictly neccessary, as the head pointer is being used, but I've done them for consistency. Long term we must revisit this as this API is too hard to use correctly. Jeremy.
2008-08-13ensure we exit with non-zero status on EOF on socket, so the parentAndrew Tridgell1-2/+5
can trigger a brlock db cleanup (This used to be commit bbd49f9e1c4b50c4a596fb991f3306e1e90c0177)
2008-06-14Move connection-specific vuid cache clear to uid.cVolker Lendecke1-15/+2
(This used to be commit 1025f687910ce40283c7344ed67ebd5bf31217b7)
2008-05-19Restructuring of code to fix #5460. Remove searchJeremy Allison1-22/+0
by name code from conn, we were already doing the same check in the dfs_redirect() function, so move it into parse_dfs_path() instead. Jeremy. (This used to be commit 8a7c6df122c5e4a1d0f74ab0f1bc9376a0a8bcb1)
2008-05-14Ensure we don't keep searching for sharename if it'sJeremy Allison1-3/+3
not the start of the list. Jeremy. (This used to be commit 15857534b76bc66ad122510100aa224f17250465)
2008-05-13Fix bug #5460. The problem is RHEL5.0 shipped a CIFS clientJeremy Allison1-2/+23
that sets the DFS bit on pathnames but doesn't send DFS paths. This causes lookups to fail as the smbd/msdfs.c code now just eats the first two parts of the pathname and uses the rest as the local path. The previous hostname check used to protect us from that as we knew that when the hostname was invalid it was a local path (and a broken client). I didn't want to put that check back in, but came up with another idea - even though the hostname can be a different one, the sharename must be valid on this machine. So we can check for a valid sharename instead. Jeremy. (This used to be commit e1cda82f6f7de3306a653af920756c1640057f2d)
2008-05-10Remove "user" from connection_structVolker Lendecke1-2/+0
(This used to be commit 368454a27cb53a408ec416cbf37235b304592fb5)
2008-05-10Replace nt_user_token with server_info in connection_structVolker Lendecke1-0/+1
(This used to be commit a3738aef59e97d4533010b048534d937d36c0950)
2008-05-10Next try at making the vuid cache circularVolker Lendecke1-3/+6
Jeremy, please check! (This used to be commit a34f73521712e3820d417f0d9ed811723b7681d6)
2008-05-05Revert "Second half of 50c891d3: Correctly clear the vuid cache"Volker Lendecke1-1/+1
This reverts commit 0aea404b0a83736ba2884cc7cf00cd797aab1f56. (This used to be commit fa39f47f5fc2df0f1a59705e30a799518c353b45)
2008-05-05Second half of 50c891d3: Correctly clear the vuid cacheVolker Lendecke1-1/+1
(This used to be commit 0aea404b0a83736ba2884cc7cf00cd797aab1f56)
2008-05-05Remove connection_struct->mem_ctx, connection_struct is its own parentVolker Lendecke1-13/+4
(This used to be commit 559180f7d30606d1999399d954ceedc798c669a4)
2007-10-18RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison1-2/+2
bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
2007-10-10[GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.Gerald (Jerry) Carter1-0/+1
(This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r22942: Some message_register -> messaging_register conversionsVolker Lendecke1-3/+6
(This used to be commit 65335a420645202fc79c599a1177838ec19a4075)
2007-10-10r22736: Start to merge the low-hanging fruit from the now 7000-line cluster ↵Volker Lendecke1-1/+1
patch. This changes "struct process_id" to "struct server_id", keeping both is just too much hassle. No functional change (I hope ;-)) Volker (This used to be commit 0ad4b1226c9d91b72136310d3bbb640d2c5d67b8)
2007-10-10r22542: Move over to using the _strict varients of the tallocJeremy Allison1-1/+1
calls. No functional changes. Looks bigger than it is :-). Jeremy. (This used to be commit f6fa3080fee1b20df9f1968500840a88cf0ee592)
2007-10-10r21871: Move deadtime processing into an idle event. While there, simplifyVolker Lendecke1-11/+16
conn_idle_all() a bit. Volker (This used to be commit 3fc00977a99932b226bdcbc43bbc0ede1bcec26f)
2007-10-10r21867: Simplify calling convention of timeout_processing. lp_deadtime is onlyVolker Lendecke1-1/+5
referenced in conn_idle_all(). (This used to be commit c0aaee6d36cf1fb873cfb9ab6ee52ff097a202a0)
2007-10-10r21279: Get rid of 'aio write behind', this is broken.Volker Lendecke1-1/+0
It should probably better be integrated with our write cache. Volker (This used to be commit 58bfd168b046a97a895aaa3384fd7af8d077a1d5)
2007-10-10r21064: The core of this patch isVolker Lendecke1-1/+2
void message_register(int msg_type, void (*fn)(int msg_type, struct process_id pid, - void *buf, size_t len)) + void *buf, size_t len, + void *private_data), + void *private_data) { struct dispatch_fns *dfn; So this adds a (so far unused) private pointer that is passed from message_register to the message handler. A prerequisite to implement a tiny samba4-API compatible wrapper around our messaging system. That itself is necessary for the Samba4 notify system. Yes, I know, I could import the whole Samba4 messaging system, but I want to do it step by step and I think getting notify in is more important in this step. Volker (This used to be commit c8ae60ed65dcce9660ee39c75488f2838cf9a28b)
2007-10-10r20178: Ensure we allocate the intermediate trans structsJeremy Allison1-0/+8
off conn->mem_ctx, not the null context so we can safefy free everything on conn close. Should fix possible memleak. Jeremy. (This used to be commit b33bde7b39953e171f05cdb53b6345ee3a9ec6e7)
2007-10-10r20098: Properly fix issues with create_token_from_username()Jeremy Allison1-9/+0
reported by James. Ensure that this function allocates everything on the temporary context except the return memory. Never call this with a null mem context, and now use conn->mem_ctx instead in smbd/service.c. Remove separate free functions for conn->ngroups and conn->nt_user_token as they are now always talloc'ed off the conn->mem_ctx. Future optimization will be to remove conn->mem_ctx and make all objects pointed to in the conn struct talloc'ed off conn itself. Easy to free then :-). Jeremy. (This used to be commit f83b6de44f1058811ff94ac72a8a71bd8e49e4e8)
2007-10-10r20090: Fix a class of bugs found by James Peach. EnsureJeremy Allison1-1/+1
we never mix malloc and talloc'ed contexts in the add_XX_to_array() and add_XX_to_array_unique() calls. Ensure that these calls always return False on out of memory, True otherwise and always check them. Ensure that the relevent parts of the conn struct and the nt_user_tokens are TALLOC_DESTROYED not SAFE_FREE'd. James - this should fix your crash bug in both branches. Jeremy. (This used to be commit 0ffca7559e07500bd09a64b775e230d448ce5c24)
2007-10-10r19709: Fix bug #4224 - deadtime timeout was brokenJeremy Allison1-0/+1
because of this. Probably a show-stopper for 3.0.23d. Thanks to Alain GORLIER <alain.gorlier@altissemiconductor.com> for the fix. Jeremy. (This used to be commit b167785cbd7911940e16fd2a54ec665857feef5e)
2007-10-10r19386: Limit the size of the connection bitmap to <64K entries.James Peach1-1/+11
(This used to be commit 9f0518e0b0d4add7cceac6d4d797edddb0080aaa)
2007-10-10r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison1-3/+5
to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
2007-10-10r16317: Klocwork #300. Check for error return on malloc.Jeremy Allison1-0/+4
Jeremy. (This used to be commit aa0d739834a286aeee88f76048dc347dd2852d09)
2007-10-10r15088: Remove all time() and gettimeofday() calls out of the mainlineJeremy Allison1-4/+12
packet processing code. Only do these when needed (ie. in the idle timeout code). We drop an unneccessary global here too. Jeremy. (This used to be commit 8272a5ab0605fcf95527143c4f909aa1008e5b94)
2007-10-10r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()Gerald Carter1-1/+1
macro which sets the freed pointer to NULL. (This used to be commit b65be8874a2efe5a4b167448960a4fcf6bd995e2)
2007-10-10r13316: Let the carnage begin....Gerald Carter1-1/+1
Sync with trunk as off r13315 (This used to be commit 17e63ac4ed8325c0d44fe62b2442449f3298559f)
2007-10-10r10656: BIG merge from trunk. Features not copied overGerald Carter1-1/+1
* \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
2007-10-10r8963: Clean up the horrid "fake conn struct" part of MSDFS.Jeremy Allison1-7/+15
Jeremy. (This used to be commit 14dd5ab632ff9abb9582e6484187c6ee1573cdd6)
2007-10-10r7963: Add aio support to 3.0.Jeremy Allison1-0/+1
Jeremy. (This used to be commit 1de27da47051af08790317f5b48b02719d6b9934)
2007-10-10r7882: Looks like a large patch - but what it actually does is make SambaJeremy Allison1-1/+1
safe for using our headers and linking with C++ modules. Stops us from using C++ reserved keywords in our code. Jeremy (This used to be commit 9506b8e145982b1160a2f0aee5c9b7a54980940a)
2007-10-10r4736: small set of merges from rtunk to minimize the diffsGerald Carter1-0/+4
(This used to be commit 4b351f2fcc365a7b7f8c22b5139c299aa54c9458)
2007-10-10r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison1-1/+1
allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
2007-10-10r1154: Change default setting for case sensitivity to "auto". If set to autoJeremy Allison1-1/+1
then is the client supports it (current clients supported are Samba and CIFSVFS - detected by the negprot strings "Samba", "POSIX 2" and a bare "NT LM 0.12" string) then the setting of the per packet flag smb_flag FLAG_CASELESS_PATHNAMES is taken into account per packet. This allows the linux CIFS client to use Samba in a case sensitive manner. Additional command in smbclient "case_sensitive", toggles the flag in subsequent packets. Docs to follow. Jeremy. (This used to be commit cf84c0fe1a061acc0313f7db124b8f947cdf623d)
2007-10-10r656: Make widelinks use realpath(). Tidy up cases where we need to become a ↵Jeremy Allison1-0/+1
service. Jeremy. (This used to be commit a03b6a05e02ec8415efc0e8ceade102e06f8fffe)
2004-02-13Fixup the 'multiple-vuids' bugs.Jeremy Allison1-3/+7
Jeremy. (This used to be commit f0f7a48327ba1808088bc8c4e5d48b5cbeaeb4e3)
2003-12-11Patch from James Peach <jpeach@sgi.com>. Remove the MAX_CONNECTIONS limitJeremy Allison1-9/+32
by increasing bitmap size. Limited by "max connections" parameter. Bug #716. Jeremy. (This used to be commit fbbeb55b230ffc477f5563af66ab65eb6598e025)
2003-05-11Fix VFS layer:Alexander Bokovoy1-21/+18
1. Finally work with cascaded modules with private data storage per module 2. Convert VFS API to macro calls to simplify cascading 3. Add quota support to VFS layer (prepare to NT quota support) Patch by Stefan (metze) Metzemacher, with review of Jelmer and me Tested in past few weeks. Documentation to new VFS API for third-party developers to follow (This used to be commit 91984ef5caa2d13c5d52e1f535bd3bbbae1ec978)
2003-04-16More merges from HEAD:Jelmer Vernooij1-9/+12
- Stephan Kulow's changes (fixing warnings in libsmbclient) - VFS modules - Seperating libs (This used to be commit 6e9b7802335428c88ecf4e44a0e2395ac58e96b5)
2003-02-01Merge of signed/unsigned fixes from HEAD.Andrew Bartlett1-2/+2
(This used to be commit e9f56a157bd472914eebf64fde586104d8274717)
2003-01-17Fix reference count bug where smbd's would not terminate with noJeremy Allison1-1/+12
open resources. Jeremy. (This used to be commit b7e5a2c5474e9edd8fa783462af8986b6bd426a5)
2002-09-25sync'ing up for 3.0alpha20 releaseGerald Carter1-2/+22
(This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139)
2002-08-17Sync 3.0 branch with headJelmer Vernooij1-4/+19
(This used to be commit 42615b945e2e48e53a21ea47f2e45407913a6a1e)
2002-07-15updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell1-1/+1
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)