summaryrefslogtreecommitdiff
path: root/source3/smbd/trans2.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r18605: sync dlinklist.h with samba4, that means DLIST_ADD_END()Stefan Metzmacher1-6/+4
and DLIST_DEMOTE() now take the type of the tmp pointer not the tmp pointer itself anymore. metze (This used to be commit 2f58645b7094e81dff3734f11aa183ea2ab53d2d)
2007-10-10r18547: Add in fixes to mangling dir code - ensure don'tJeremy Allison1-5/+5
look in the paths for wcard - always read directly from incoming packet. Jeremy. (This used to be commit 3745a1af4ea9262fcda28931539fa6ab4c9060d1)
2007-10-10r17835: Fix Coverity bugs 306, 309, 310.Volker Lendecke1-1/+1
Jeremy, you might want to look at the trans2 one. Volker (This used to be commit d727fc681c073a1b09accd31a07341b58e10eebb)
2007-10-10r17800: Start using struct timespec internally for file timesJeremy Allison1-75/+89
on the wire. This allows us to go to nsec resolution for systems that support it. It should also now be easy to add a correct "create time" (birth time) for systems that support it (*BSD). I'll be watching the build farm closely after this one for breakage :-). Jeremy. (This used to be commit 425280a1d23f97ef0b0be77462386d619f47b21d)
2007-10-10r17604: Fix a bug caught by g++.Volker Lendecke1-1/+1
Jeremy, please check this! Volker (This used to be commit 8117a7b3bf3f273dd018c42864b3136dec47ec79)
2007-10-10r17541: When returning a trans2 request, if the "max dataJeremy Allison1-24/+37
bytes returned" is less than the amount we want to send, return what we can and set STATUS_BUFFER_OVERFLOW (doserror ERRDOS,ERRbufferoverflow). Required by OS/2 to handle EA's that are too large. It's hard to test this in Samba4 smbtorture as the max data bytes returned is hard coded at 0xffff (as it is in the Samba3 client libraries also). I used a custom version of Samba4 smbtorture to test this out. Might add a "max data bytes" param to make this testable in the build farm. Confirmed by "Guenter Kukkukk (sambaos2)" <sambaos2@kukkukk.com> and Andreas Taegener <atsamba11@eideltown.de> that this fixes the issue. Jeremy. (This used to be commit ff2f1202b76991a404dae8df17c36f8135c8dc51)
2007-10-10r17347: Some C++ warnings -- 271 leftVolker Lendecke1-16/+20
(This used to be commit 641dac4f85c0e00484d90726bea1a4cb58c8235c)
2007-10-10r17316: More C++ warnings -- 456 leftVolker Lendecke1-3/+3
(This used to be commit 1e4ee728df7eeafc1b4d533240acb032f73b4f5c)
2007-10-10r17105: Fix the race Volker found - we had a non-lockedJeremy Allison1-14/+18
region between detecting a pending lock was needed and when we added the blocking lock record. Make sure that we hold the lock over all this period. Removed the old code for doing blocking locks on SMB requests that never block (the old SMBlock and friends). Discovered something interesting about the strange NT_STATUS_FILE_LOCK_CONFLICT return. If we asked for a lock with zero timeout, and we got an error of NT_STATUS_FILE_LOCK_CONFLICT, treat it as though it was a blocking lock with a timeout of 150 - 300ms. This only happens when timeout is sent as zero and can be seen quite clearly in ethereal. This is the real replacement for old do_lock_spin() code. Re-worked the blocking lock select timeout to correctly use milliseconds instead of the old second level resolution (far too coarse for this work). Jeremy. (This used to be commit b81d6d1ae95a3d3e449dde629884b565eac289d9)
2007-10-10r17100: Ooops. Fix the build...Jeremy Allison1-2/+7
Jeremy. (This used to be commit b21ca265a25b3d1e4f154ce0ee4b8757b41cf910)
2007-10-10r17098: Samba3 now cleanly passes Samba4 RAW-LOCK tortureJeremy Allison1-3/+1
test. Phew - that was painful :-). But what it means is that we now implement lock cancels and I can add lock cancels into POSIX lock handling which will fix the fast/slow system call issue with cifsfs ! Jeremy. (This used to be commit f1a9cf075b87c76c032d19da0168424c90f6cb3c)
2007-10-10r16990: Fix bug #3921 spotted by jason@ncac.gwu.edu. CorrectlyJeremy Allison1-1/+1
obey blocking/non-blocking request for POSIX locks. Jeremy. (This used to be commit f62c01316ef3ce0351f8b34229307a75d8f9f156)
2007-10-10r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison1-47/+36
to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
2007-10-10r16789: Fix bug #3909, when using ea's getting a directory tries toJeremy Allison1-3/+8
read ea's from an msdfs link. Stop it from doing that. Jerry please merge to 3.0.23. Jeremy. (This used to be commit 95e5ace6b4f348a3244b6a3ea0fd8badf55271f5)
2007-10-10r16309: Fix Klocwork #1596. Check for NULL on talloc.Jeremy Allison1-0/+5
Jeremy. (This used to be commit 34b6b6723b1c87e19b0a51ef785a614d86bd5cef)
2007-10-10r16280: Start fixing up gcc4 -O6 warnings on an x86_64 box. size_t != unsignedJeremy Allison1-2/+2
int in a format string. Jeremy. (This used to be commit 45d5cad8c2438c032d9f11c62a50a04d0637bf6c)
2007-10-10r16219: BUG 3836, 3837, 3004: compile warning fixes from Jason Mader.Gerald Carter1-1/+3
(This used to be commit 6c1f1c091f5e87bf9464fe8ad7eb2cb683819a62)
2007-10-10r16112: Added Volker's fix for extra odd byte at the endJeremy Allison1-1/+1
of UNIX_BASIC infolevel. Checked client implementations (cifsfs and libsmb) and they ignore it. Thanks Volker. Jeremy. (This used to be commit 6cd1cb5c9deba2aa0d7a3251c8142834cbaba6d1)
2007-10-10r15958: Make us pass RAW-OPLOCK with kernel oplocks off.Jeremy Allison1-2/+2
This allows a requestor to set FORCE_OPLOCK_BREAK_TO_NONE to ensure we don't break to level 2. Fixed a couple of resource leaks in error paths in open_file_ntcreatex. Jeremy. (This used to be commit c7c9adcce7f13d01445f31b07fb28a76f0a1d6df)
2007-10-10r15949: Patch for bug #3308 to stop us returning duplicateJeremy Allison1-7/+14
mid replies on path based set-eof trans2 calls. Needs modification for HEAD (as in head open_file_ntcreateX properly returns NTSTATUS - I'll fix this tomorrow my time). Secondly it still fails the Samba4 RAW-OPLOCK smbtorture because of an interesting case. Our oplock code always returns "break to level 2" if it can. In this case (path-based set-eof or set-allocation size on an exclusive oplocked file) W2K3 always sends a break-to-none. We send the break to none (from level2) after we've done the write for eof or allocation size. I need to work out some way of telling our break code to always break to none (might need to extend the message field). Jeremy. (This used to be commit ad9895c654f400e242adcd4099f7cd004521ee92)
2007-10-10r15936: Fix memory leak on error exit path. Trying toJeremy Allison1-1/+26
track down #3308. Jeremy. (This used to be commit e39c11c91153c1ed547bc635d02769a1cdf3ecc0)
2007-10-10r15450: Change profiling data macros to use stack variables rather thanJames Peach1-4/+33
globals. This catches mismatched start/end calls and removes the need for special nested profiling calls. (This used to be commit ee750498812190edd3ec52ca3c750258f3b8a97a)
2007-10-10r15266: Fix bug 3720. I wonder why -O1 compiles did not catch this...Volker Lendecke1-2/+2
Thanks to Jason Mader for reporting this. Volker (This used to be commit 3e616c3272ba76a2d135f7c51ceb44461ad165ad)
2007-10-10r15035: It seems that many preprocessors do not like comments in macro args..Volker Lendecke1-1/+4
(This used to be commit efc833dcba052e52c46eeba71a1ebe248be9cb05)
2007-10-10r15030: On a performace hunt... Remove as many extraneousJeremy Allison1-3/+3
memset's as possible. Jeremy. (This used to be commit 1217ed392b75aa8bfefa9c3f1ec5fa3bba841ee0)
2007-10-10r15018: Merge Volker's ipc/trans2/nttrans changes overJeremy Allison1-320/+643
into 3.0. Also merge the new POSIX lock code - this is not enabled unless -DDEVELOPER is defined. This doesn't yet map onto underlying system POSIX locks. Updates vfs to allow lock queries. Jeremy. (This used to be commit 08e52ead03304ff04229e1bfe544ff40e2564fc7)
2007-10-10r14986: Fix OS/2 directory delete bug found by kukks.Jeremy Allison1-0/+2
(Thanks a lot for all your hard work on this). We were caching the results of *all* directory scans, not just the results that match the client wildcard. This actually made no sense, as only matches on the client wildcard can be returned to the client and so might need to be searched for in the cache. This fixes the directory cache to only cache entries that we return to the client. Jeremy. (This used to be commit c88af597d042390ff11b26fe802b0b10d0faa6ce)
2007-10-10r14387: Try and fix the coverity issues (#53, #54) with negativeJeremy Allison1-2/+2
sink by ensuring all uses of rpcstr_push are consistent with a size_t dest size arg. Jeremy. (This used to be commit f65d7afe1977d9d85046732842f9643716c15088)
2007-10-10r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison1-40/+39
realloc can return NULL in one of two cases - (1) the realloc failed, (2) realloc succeeded but the new size requested was zero, in which case this is identical to a free() call. The error paths dealing with these two cases should be different, but mostly weren't. Secondly the standard idiom for dealing with realloc when you know the new size is non-zero is the following : tmp = realloc(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } However, there were *many* *many* places in Samba where we were using the old (broken) idiom of : p = realloc(p, size) if (!p) { return error; } which will leak the memory pointed to by p on realloc fail. This commit (hopefully) fixes all these cases by moving to a standard idiom of : p = SMB_REALLOC(p, size) if (!p) { return error; } Where if the realloc returns null due to the realloc failing or size == 0 we *guarentee* that the storage pointed to by p has been freed. This allows me to remove a lot of code that was dealing with the standard (more verbose) method that required a tmp pointer. This is almost always what you want. When a realloc fails you never usually want the old memory, you want to free it and get into your error processing asap. For the 11 remaining cases where we really do need to keep the old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR, which can be used as follows : tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the pointer p, even on size == 0 or realloc fail. All this is done by a hidden extra argument to Realloc(), BOOL free_old_on_error which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR macros (and their array counterparts). It remains to be seen what this will do to our Coverity bug count :-). Jeremy. (This used to be commit 1d710d06a214f3f1740e80e0bffd6aab44aac2b0)
2007-10-10r13675: * patch from Bjoern JACKE <samba@j3e.de> to remove theGerald Carter1-15/+4
artificial RO bit on directories in user profiles when profile acls = yes. (This used to be commit b698e83a82f96db4a4a6ffa4b61af50c943deff0)
2007-10-10r13563: Fix bug #3526 found and diagnosed by corinna@vinschen.de.Jeremy Allison1-0/+2
trans2findfirst recognises two info levels *not* recognised by trans2findnext. Add them. Needed for 3.0.21c. Jeremy. (This used to be commit bcb87271d60acd4efe666dd061ea2c09b72fd497)
2007-10-10r13293: Rather a big patch I'm afraid, but this should fix bug #3347Jeremy Allison1-7/+7
by saving the UNIX token used to set a delete on close flag, and using it when doing the delete. libsmbsharemodes.so still needs updating to cope with this change. Samba4 torture tests to follow. Jeremy. (This used to be commit 23f16cbc2e8cde97c486831e26bcafd4ab4a9654)
2007-10-10r12877: Stop passing structs around in smb messages, insteadJeremy Allison1-2/+2
always linearize into little-endian. Should fix all Solaris issues with this, plus provide a cleaner base moving forward for cluster-aware Samba where smbd's can communicate across different compilers/architectures (eventually these message will have to go cross-machine). Jeremy. (This used to be commit d01824b78576a034428e1cef73868d1169057991)
2007-10-10r12376: Second patch from Martin Koeppe <mkoeppe@gmx.de>Jeremy Allison1-2/+2
for #3287. Jeremy. (This used to be commit 8680eebbba220eea257c9ea093d5a463afe7bd94)
2007-10-10r12250: Patch from Martin Koeppe <mkoeppe@gmx.de> for #3287Jeremy Allison1-6/+6
to make the dev/inode numbers match what SFU expects. If we're using 8 byte inodes we'll lose the top 4 bytes and replace them with a dev_t instead, but this seem reasonable to ensure uniqueness. Jeremy. (This used to be commit e53574d0b43e5525029c89e56331701399013d91)
2007-10-10r12203: Add the share path into the sharemode db. This involvesJeremy Allison1-11/+3
revving the minor version number for libsmbsharemodes (we now have a new _ex interface that takes the share path as well as the filename). Needed for #3303. Some code written by SATOH Fumiyasu <fumiya@samba.gr.jp> included in the changes to locking/locking.c. The smbstatus output is a bit of a mess and needs overhauling... Jeremy. (This used to be commit 9d93af713f8520ca506730dd32aa2b994937eaba)
2007-10-10r11511: A classic "friday night check-in" :-). This moves muchJeremy Allison1-18/+18
of the Samba4 timezone handling code back into Samba3. Gets rid of "kludge-gmt" and removes the effectiveness of the parameter "time offset" (I can add this back in very easily if needed) - it's no longer being looked at. I'm hoping this will fix the problems people have been having with DST transitions. I'll start comprehensive testing tomorrow, but for now all modifications are done. Splits time get/set functions into srv_XXX and cli_XXX as they need to look at different timezone offsets. Get rid of much of the "efficiency" cruft that was added to Samba back in the day when the C library timezone handling functions were slow. Jeremy. (This used to be commit 414303bc0272f207046b471a0364fa296b67c1f8)
2007-10-10r11428: Fix bug #3192 by actually hooking up the dfree cachingJeremy Allison1-3/+3
function. Oops. Jeremy. (This used to be commit 7edb26e7657fc01710abe563b941779749409ef2)
2007-10-10r11420: Fix issue pointed out by Dina Fine <dina@exanet.com>. We canJeremy Allison1-12/+16
only tell at parse time from the wire if an incoming name has wildcards or not. If it's a mangled name and we demangle the demangled name may contain wildcard characters. Ensure these are ignored. Jeremy. (This used to be commit 4cd8e2a96b98ff711905e8c6f416b22440c16062)
2007-10-10r11389: Attempt to fix bug #3212 - ignore bogus OS/2 EA set values onJeremy Allison1-4/+25
trans2_mkdir/trans2_open/trans2_setfilepathingo. Jeremy. (This used to be commit 71c037dfbb0b51e750f2e14533b03d9932778cb0)
2007-10-10r11232: Added ab's POSIX statvfs vfs call. Sorry for the delay ab.Jeremy Allison1-0/+33
Jeremy. (This used to be commit af8545806770a7530eecc184bdd230ca14999884)
2007-10-10r10921: BUG 3070: fix crash bug in qfsinfo when retrieving quota infoGerald Carter1-1/+0
(This used to be commit 1599fc38ab2f2beb5d1a240941b879603ce27ae6)
2007-10-10r10656: BIG merge from trunk. Features not copied overGerald Carter1-124/+8
* \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-10r10182: Starting to stamp out warnings on a 64-bit box.Jeremy Allison1-5/+5
More to follow. Jeremy. (This used to be commit aa882646854325aa201b66d0ba27026946ce8dcb)
2007-10-10r9246: Patch from Marcel samba.10.maazl@spamgourmet.com for OS/2 trans2 openJeremy Allison1-2/+3
reply bugs. Jeremy. (This used to be commit 3ec6fc8d1e34c344f59b8c1a22f3bab556e7fa07)
2007-10-10r8959: Make msdfs code talloc based. Fix leaks.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 076023df8ea7c0f03baf8102e55d347e05542c7b)
2007-10-10r8552: Warning fix from jason@ncac.gwu.edu.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 8558001b38786b7ff16d90d80d183b0277d74e16)
2007-10-10r8219: Merge the new open code from HEAD to 3.0. Haven't yet run the tortureJeremy Allison1-111/+146
tests on this as it's very late NY time (just wanted to get this work into the tree). I'll test this over the weekend.... Jerry - in looking at the difference between the two trees there seem to be some printing/ntprinting.c and registry changes we might want to examine to try keep in sync. Jeremy. (This used to be commit c7fe18761e2c753afbffd3a78abff46472a9b8eb)
2007-10-10r7963: Add aio support to 3.0.Jeremy Allison1-0/+3
Jeremy. (This used to be commit 1de27da47051af08790317f5b48b02719d6b9934)
2007-10-10r7893: Add in the extra parameters to opendir() to fix the large ↵Jeremy Allison1-15/+9
directory/insane app problem. Rev vfs version. Doesn't change the normal codepath. Jeremy. (This used to be commit 0f03a6bdcdbdf60da81e0aeffa84ac6e48fc6a04)