summaryrefslogtreecommitdiff
path: root/source3/smbd/nttrans.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r17316: More C++ warnings -- 456 leftVolker Lendecke1-4/+4
(This used to be commit 1e4ee728df7eeafc1b4d533240acb032f73b4f5c)
2007-10-10r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison1-48/+50
to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
2007-10-10r16397: Fix Klocwork #11767 and drasticly simplify theJeremy Allison1-0/+1
logic in smbd/process.c. All interested (Volker, Jerry, James etc). PLEASE REVIEW THIS CHANGE. The logic should be identical but *much* easier to follow and change (and shouldn't confuse Klockwork :-). Jeremy. (This used to be commit d357f8b33594472ffa78d0a112accccc2a8b1fe7)
2007-10-10r16311: Check for NULL return. Klocwork #998.Jeremy Allison1-0/+4
Jeremy. (This used to be commit c430730f5a0dc00626b9b924e88adfb84cd48869)
2007-10-10r16295: Fix gcc4 "warning: dereferencing type-punned pointer will breakJeremy Allison1-20/+20
strict-aliasing rules" warning. Jeremy. (This used to be commit 7ac5aee88cae3400fb6400b3628544da2e474560)
2007-10-10r16277: Start fixing up gcc4 -O6 warnings on an x86_64 box. size_t != ↵Jeremy Allison1-2/+2
unsigned int in a format string. Jeremy. (This used to be commit 3a15fff21988b426a514ad28060eaf0ddc17ef6b)
2007-10-10r15949: Patch for bug #3308 to stop us returning duplicateJeremy Allison1-5/+5
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-10r15943: Update misleading DEBUG statements and comments that refer toJames Peach1-2/+3
open_file_shared. (This used to be commit 784126edff942d1c2f79f7c9feb59980426f331e)
2007-10-10r15450: Change profiling data macros to use stack variables rather thanJames Peach1-2/+25
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-10r15030: On a performace hunt... Remove as many extraneousJeremy Allison1-2/+2
memset's as possible. Jeremy. (This used to be commit 1217ed392b75aa8bfefa9c3f1ec5fa3bba841ee0)
2007-10-10r15018: Merge Volker's ipc/trans2/nttrans changes overJeremy Allison1-288/+316
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-10r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison1-9/+4
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-10r13316: Let the carnage begin....Gerald Carter1-1/+1
Sync with trunk as off r13315 (This used to be commit 17e63ac4ed8325c0d44fe62b2442449f3298559f)
2007-10-10r13293: Rather a big patch I'm afraid, but this should fix bug #3347Jeremy Allison1-13/+13
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-10r12491: End profile fixes from SATOH Fumiyasu <fumiya@samba.gr.jp>.Jeremy Allison1-1/+0
Jeremy. (This used to be commit 2187502732e41690bf266f229312bb9c7177cf22)
2007-10-10r11420: Fix issue pointed out by Dina Fine <dina@exanet.com>. We canJeremy Allison1-13/+20
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-10r10656: BIG merge from trunk. Features not copied overGerald Carter1-22/+7
* \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-10r8219: Merge the new open code from HEAD to 3.0. Haven't yet run the tortureJeremy Allison1-415/+339
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-10r7842: With the patch I sent Steve yesterday this gives us complete POSIX ↵Jeremy Allison1-0/+3
pathnames. ie. files containing : and \ can be accessed from Linux. Jeremy. (This used to be commit e9b8d23d6138d909a65ea70b2e801881e8333b38)
2007-10-10r6895: Add "acl check permissions" to turn on/off the new behaviour ofJeremy Allison1-2/+2
checking for write access in a directory before delete. Also controls checking for write access before labeling a file read-only if DOS attributes are not being stored in EA's. Docuementation to follow. Jeremy. (This used to be commit dd1a5e6e499dd721c5bb8d56a61810a7454a3449)
2007-10-10r6633: Added "check_path_syntax_posix()" in preparation for handlingJeremy Allison1-6/+16
POSIX pathnames. Not yet used. Jeremy. (This used to be commit 381da9b55d6a3fda2ba4a3f12bee50853b7fd3b3)
2007-10-10r6307: Ensure info requested bitmask is printed in log when querying ↵Jeremy Allison1-1/+2
security descriptors. Jeremy. (This used to be commit 4db288e3143c1ce691ae586a7353da00fec85879)
2007-10-10r6269: With help from Marcel Müller <mueller@maazl.de> in tracking down the ↵Jeremy Allison1-2/+5
bug, fix trans2 and nttrans secondary packet processing. We were being too strict checking the incoming packet (by 1 byte). Jeremy. (This used to be commit 3eea1ff4b7428325c7f304bcac61d6297209a4b8)
2007-10-10r6263: Get rid of generate_wellknown_sids, they are const static and ↵Volker Lendecke1-1/+0
initializable statically. Volker (This used to be commit 3493d9f383567d286e69c0e60c0708ed400a04d9)
2007-10-10r6225: get rid of warnings from my compiler about nested externsHerb Lewis1-2/+2
(This used to be commit efea76ac71412f8622cd233912309e91b9ea52da)
2007-10-10r6204: Fix double-free of talloc context.Jeremy Allison1-1/+0
Jeremy. (This used to be commit d5c56d25741e148ccae7c91f9b0157498d7ff148)
2007-10-10r6203: Fix attribute return on creating a directory with nttrans_create.Jeremy Allison1-31/+31
Fix strange allocation semantics of openX. Jeremy. (This used to be commit da5a8b539d39d2765de22c3e55e9f284992ff966)
2007-10-10r6172: Tidy up error processing significantly. Remove unix_ERR_XXX global ↵Jeremy Allison1-20/+12
nastyness. Jeremy. (This used to be commit d3379fe61bb934082b51a37adac232a96bafcf46)
2007-10-10r6160: Ensure allocation size is correctly returned for OpenX. Only set ↵Jeremy Allison1-33/+35
allocation on create/truncate for nttrans. Jeremy. (This used to be commit fb05ac4c03eec21f3f18668610022ebfa6d6bf4a)
2007-10-10r6146: Added OS/2 EA support in trans2_open and trans2_mkdir. Fixed in ↵Jeremy Allison1-24/+36
nttrans_create. Jeremy. (This used to be commit 989fcb4c084c63f1e3b114af68ef5bc0a2fbc09e)
2007-10-10r6141: Fix OS/2 EA's for NTcreate. OpenX and mkdir to follow.Jeremy Allison1-4/+90
Jeremy. (This used to be commit 106f91ff65acd23a7dda4d0ec89ae41ecb28153e)
2007-10-10r6124: Fix for bug #2242 from Tom Lackemann <cessnatomny@yahoo.com> - don'tJeremy Allison1-7/+20
set SD on an NTtransact create unless we created the file. Jeremy. (This used to be commit b42eaf424e34544fae3f0fc473694e61dda2a11c)
2007-10-10r6014: rather large change set....Gerald Carter1-0/+2
pulling back all recent rpc changes from trunk into 3.0. I've tested a compile and so don't think I've missed any files. But if so, just mail me and I'll clean backup in a couple of hours. Changes include \winreg, \eventlog, \svcctl, and general parse_misc.c updates. I am planning on bracketing the event code with an #ifdef ENABLE_EVENTLOG until I finish merging Marcin's changes (very soon). (This used to be commit 4e0ac63c36527cd8c52ef720cae17e84f67e7221)
2007-10-10r5893: Get us to pass some of the Samba4 EA tests. EA_LIST seems to beJeremy Allison1-0/+5
working - need to valgrind it to be sure. Jeremy. (This used to be commit 8b2b652c0a47298cd188c67d256dfdffe01a951d)
2007-10-10r5720: Attempt to fix bug #2382 (Excel shared workbook stops working). AlsoJeremy Allison1-1/+1
incorporates part of the fix created by ke_miyata@itg.hitachi.co.jp for bug #2045 (MS-Office behavior of timestamp). Jeremy. (This used to be commit 4f3b12ac73487f4ccb37c17506af1abf5acc80cd)
2007-10-10r5637: Actually test and fix the crash bugs (sorry:-).Jeremy Allison1-2/+2
Jeremy. (This used to be commit 4348ca48549ded8c056877befa216f0e768cb2c1)
2007-10-10r5636: Re-add the allocation size - parameterized by share asJeremy Allison1-4/+4
"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)
2007-10-10r5548: Stop lying about allocation sizes to Windows clients. It was a niceJeremy Allison1-4/+4
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)
2007-10-10r5530: Keep the TRANS call up to date with the NTCreateX call.Jeremy Allison1-1/+11
Jeremy. (This used to be commit 98a07e1520d6fb1f6f5320bc70ac33d4c5052ea6)
2007-10-10r5524: Don't do share mode checks on can_delete if open, the rest of the openJeremy Allison1-1/+2
code will do this correctly. More for bug #2201. Jeremy. (This used to be commit faecf639efdecf949e91184d041489aa54e8664f)
2007-10-10r5510: Optimisation to only do can_delete check if client asks for ↵Jeremy Allison1-0/+9
FILE_SHARE_DELETE. Not completely correct but will catch the XP SP2 problem. Jeremy. (This used to be commit 1e2d0fcdbb72735f8b53d9faaec07d711ae236d0)
2007-10-10r5497: Fix for DIR1 failures in build farm. It struck me that weJeremy Allison1-2/+6
only care about failing with ACCESS_DENIED if we can't delete with DELETE access requested. All other errors will be processed as normal. Jeremy. (This used to be commit 360800592c55c9dd8fd787944b3d482f2b9eb951)
2007-10-10r5324: In order to process DELETE_ACCESS correctly and return access deniedJeremy Allison1-0/+18
to a WXPSP2 client we must do permission checking in userspace first (this is a race condition but what can you do...). Needed for bugid #2227. Jeremy. (This used to be commit da23577f162b6bdca7d631fca256a9b3b04043e4)
2007-10-10r5225: fix mem leak and debug messageStefan Metzmacher1-1/+2
metze (This used to be commit c0ee5922cdd4e57007e3a8f16cae71550fb38f2e)
2007-10-10r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison1-6/+17
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-10r4007: Fix bug #2088 - ensure inherit permissions is only applied on a new file,Jeremy Allison1-1/+1
not an existing one. Jeremy. (This used to be commit fbbdb72cf1adfe567112556626f26b031747f440)
2007-10-10r3946: Fix for bugid #2085 reported by Jason Mader <jason@ncac.gwu.edu>. Use ↵Jeremy Allison1-1/+1
consistent enum type for Protocol extern. Jeremy. (This used to be commit 65dfae7ea45d4c9452b2a08efa09b01d870142f3)
2007-10-10r3674: Stefan Esser <s.esser@e-matters.de> pointed out that the max dataJeremy Allison1-20/+17
value is only valid on the initial trans/trans2/nttrans request, so if there are secondary requests we can't read it from them. Read it from the initial request and pass as a parameter for those functions that need it. Jeremy. (This used to be commit e007845e67e0604321fb36b216a98e4fca1c98e1)
2007-10-10r3666: Generalise fix for trans and nttrans multi-fragment requests.Jeremy Allison1-2/+2
Jeremy (This used to be commit 10b2489e3b2345a8532098523ebcebb73665a76f)