summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r3241: don't skip the read completely for a zero-length read, as it could ↵Andrew Tridgell1-8/+7
give a lock conflict (This used to be commit 7ce6139f984c72a6347c7a64d95d5278bcf3e868)
2007-10-10r3240: - update the rules for what error codes should be given on theAndrew Tridgell7-66/+327
different type of unlink an seach mismatches - wildcard directory listings that have attribute FILE_ATTRIBUTE_DIRECTORY and match "." or ".." should be failed. - don't set the write_time on SMBclose unless it is non-zero - added much better support for setfileinfo and setpathinfo in pvfs - better (and more efficient) handling of .. and . components in filenames (This used to be commit 9305b07af395a158cb9f0c1c9486f7122c79d357)
2007-10-10r3227: added a per-share option "case insensitive filesystem", that tells theAndrew Tridgell4-10/+27
backend that the underlying filesystem is case insensitive, so it can bypass the directory search if the name is not found. (This used to be commit d84ade90ce7e03ec749d6ae8dcdcb41de85d836e)
2007-10-10r3207: - reformat error msgs in BASE-DIR* testsAndrew Tridgell4-4/+11
- added support for mandatory attributes in old style directory search - we now pass BASE-DIR1 and BASE-DIR2 (This used to be commit efaa0eaec49e952aa515c3448246d9048a484c26)
2007-10-10r3200: - improved the accuracy of openx emulation. We now nearly pass the ↵Andrew Tridgell2-11/+7
openx portion of RAW-OPEN - fixed directory size reporting to make it consistent. we now pass the ntcreatex portion of RAW-OPEN (This used to be commit 6282e5811b8d4f1c17152d86875ac60d1323779d)
2007-10-10r3198: check for too many .. components in filenamesAndrew Tridgell1-1/+16
pvfs now passes RAW-MKDIR (This used to be commit 41adb385f123b8d4cd3fe2eb03d891b6bdcf2361)
2007-10-10r3195: fill in more of the fsinfo fields, and avoid calling the potentiallyAndrew Tridgell1-25/+102
expensive sys_fsusage() call unless we really need to (This used to be commit 57eb14773b1811fbab2c37d1ff815c1ab07b3685)
2007-10-10r3194: fixed an uninitialised variableAndrew Tridgell1-0/+1
(This used to be commit 8123cfc59edb7b455c7f6511480f0faeb4c9aba8)
2007-10-10r3193: improved the initial permissions choice for file create, based upon ↵Andrew Tridgell2-61/+61
dos attribute (This used to be commit f6fb1e3493a2a0734747f769cd1013215d967cde)
2007-10-10r3192: make sure we don't call pvfs_can_delete() until after we have ↵Andrew Tridgell1-10/+5
confirmed that name->exists it true (This used to be commit d368d2f4fe23bdc13f6b9bbdc044dd158ab61169)
2007-10-10r3189: improved the share_conflict() logic (both in terms of readability andAndrew Tridgell3-11/+24
correctness). pvfs now passes the BASE-RENAME test. (This used to be commit 4cf3f65a5c19fdad62a0bdef225b2d9002cf8c8b)
2007-10-10r3180: - basic support for SEC_RIGHT_MAXIMUM_ALLOWED in pvfsAndrew Tridgell1-2/+14
- RAW-CONTEXT test now passes (This used to be commit 0dae9fef09ec8bce19c39a0caf36e0882e507bc4)
2007-10-10r3179: - fixed error return on utime failureAndrew Tridgell2-2/+3
- formatting fix (This used to be commit 8ca4d7c51e5c76aa28f600d49437a45a8a0d31a9)
2007-10-10r3178: honor the write_time on pvfs_close()Andrew Tridgell1-0/+5
(This used to be commit 4e28c45bafa453eaa94716a5b77d830b81efe6cf)
2007-10-10r3177: check for open files on renameAndrew Tridgell1-0/+5
(This used to be commit c334182095c53b09fcb65a40053b518acb6ec38b)
2007-10-10r3174: added pvfs_is_open() to allow us to check for open files on unlink. WeAndrew Tridgell2-0/+21
now pass BASE-UNLINK. (This used to be commit f23a2f8538bda8f6790e86c93ee22436388b2975)
2007-10-10r3172: much better qfileinfo implementation in pvfs. We now pass RAW-QFILEINFOAndrew Tridgell1-52/+179
(This used to be commit 65c2c81b8cf6aeeccdc53d8145c2595f230bd531)
2007-10-10r3161: pvfs now passes the RAW-SEEK testAndrew Tridgell9-21/+149
(This used to be commit a953d4a42c8fa3fe930c319d5157fc406a1035da)
2007-10-10r3160: recognise RAW_SFILEINFO_DISPOSITION_INFORMATION (fixes temporary ↵Andrew Tridgell1-0/+3
files from excel) (This used to be commit 1c05147f7103127c11b06bb0a812970577ace5f6)
2007-10-10r3159: use easy to recognise file handle numbers for new file, old file and ↵Andrew Tridgell1-9/+17
directory in pvfs_open, to make analysing sniffs easy (This used to be commit 5c16ed02542f7e143d66f4ba8d166bb6882bf53a)
2007-10-10r3154: pvfs now passes all of BASE-DELETEAndrew Tridgell1-2/+24
(This used to be commit abbfca1401818edd896493ab9c875224e3b7e0e7)
2007-10-10r3153: pvfs now passes the first 9 of the BASE-DELETE testsAndrew Tridgell2-27/+88
(This used to be commit f8041feaebc9170763ce04d2dd90cfc1c7889c21)
2007-10-10r3147: added basic share modes support for pvfs (or more precisely, ntcreatexAndrew Tridgell4-40/+103
share_access support). This is enough for us to pass the BASE-DENY2 test, but is a long way from fully correct share modes. (This used to be commit b5a6dd3cbf28a3a3b3a3656042ac8f50fca29e1c)
2007-10-10r3142: fill in all the ntcreatex response fields explicitly, rather thanAndrew Tridgell1-35/+41
zeroing. This makes it clearer what bits are not yet implemented (and is more valgrind friendly) (This used to be commit 18b471327b596f3ea8f6a7b39ba0a83b2584ed0b)
2007-10-10r3135: split the "create new" logic out from the "open existing" logic inAndrew Tridgell2-29/+188
pvfs_open, and handle the various race conditions that are inherent in cifs on unix, so we do the best we can when the race happens. the ntcreatex code is really starting to take shape now (This used to be commit 395c3815b468ae55de9a1135e478711f0e7d8cfc)
2007-10-10r3133: - more consistent error checking in rename and setfileinfoAndrew Tridgell3-2/+21
- add paranoid checking of device/inode change during open to detect race conditions (This used to be commit 043361fed487ed494fa497ffde1007b3f3bc0c29)
2007-10-10r3127: added the initial code for the open files database. Doesn't doAndrew Tridgell3-0/+10
anything yet, but will soon be the core of the shares modes code. (This used to be commit ad1edabf95c6c331aac4f0caa7d31193e26bc176)
2007-10-10r3126: in the brlock code I had used a void* for the brl context as I didn'tAndrew Tridgell1-1/+1
want to expose the brl context structure outside the brlock.c code. Instead, I now use "struct brl_context *" and rely on C being happy to pass around pointers to unknown structures as long as they are not dereferenced. I will be interested to see how the build farm likes this. (This used to be commit cb155c8ad837285c5a7f5b104968239df0b65fd2)
2007-10-10r3081: several updates to ntvfs and server side async request handling inAndrew Tridgell4-136/+199
preparation for the full share modes and ntcreatex code that I am working on. highlights include: - changed the way a backend determines if it is allowed to process a request asynchronously. The previous method of looking at the send_fn caused problems when an intermediate ntvfs module disabled it, and the caller then wanted to finished processing using this function. The new method is a REQ_CONTROL_MAY_ASYNC flag in req->control_flags, which is also a bit easier to read - fixed 2 bugs in the readbraw server code. One related to trying to answer a readbraw with smb signing (which can't work, and crashed our signing code), the second related to error handling, which attempted to send a normal SMB error packet, when readbraw must send a 0 read reply (as it has no header) - added several more ntvfs_generic.c generic mapping functions. This means that backends no longer need to implement such esoteric functions as SMBwriteunlock() if they don't want to. The backend can just request the mapping layer turn it into a write followed by an unlock. This makes the backends considerably simpler as they only need to implement one style of each function for lock, read, write, open etc, rather than the full host of functions that SMB provides. A backend can still choose to implement them individually, of course, and the CIFS backend does that. - simplified the generic structures to make them identical to the principal call for several common SMB calls (such as RAW_WRITE_GENERIC now being an alias for RAW_WRITE_WRITEX). - started rewriting the pvfs_open() code in preparation for the full ntcreatex semantics. - in pvfs_open and ipc_open, initially allocate the open file structure as a child of the request, so on error we don't need to clean up. Then when we are going to succeed the open steal the pointer into the long term backend context. This makes for much simpler error handling (and fixes some bugs) - use a destructor in the ipc backend to make sure that everthing is cleaned up on receive error conditions. - switched the ipc backend to using idtree for fnum allocation - in the ntvfs_generic mapping routines, use a allocated secondary structure not a stack structure to ensure the request pointer remains valid even if the backend replies async. (This used to be commit 3457c1836c09c82956697eb21627dfa2ed37682e)
2007-10-10r3064: - use UINT8_MAX and UINT16_MAX instead of hex values for ↵Andrew Tridgell2-3/+3
idr_get_new() limits - change idr_get_new() to use > instead of >= in the limit check (This used to be commit 834b09929bcb8aabdd151b7c2306001497cabdb4)
2007-10-10r3057: - moved the idtree.c code into lib/Andrew Tridgell1-1/+0
- converted the tid handling to use a idtree instead of bitmaps (This used to be commit 4220914179d10132057216650b65ed7f7679717e)
2007-10-10r3056: added a id -> pointer data structure (a type of radix tree). This isAndrew Tridgell6-130/+134
an extremely efficient way of mapping from an integer handle (such as an open file handle) to a pointer (such as the structure containing the open file information). The code is taken from lib/idr.c in the 2.6 Linux kernel, and is very fast and space efficient. By using talloc it even has auto cleanup. This commit converts the handling of open file handles and open directory search handles to use the idtree routines. In combination with talloc destructors, this simplifies the structure handling in the pvfs backend a lot. For example, we no longer need to keep a linked list of open directory searches at all, and we no longer need to do linear scans of the list of open files on most operations. The end result is that the pvfs code is now extremely scalable. You can have 10s of thousands of open files and open searches and the code still runs very fast. I have also added a small optimisation into the file close path, to avoid looking in the byte range locking database if we know that there are no locks outstanding. (This used to be commit 16835a0ef91a16fa01145b773aad8d43da215dbf)
2007-10-10r3039: This solves the problem of async handlers in ntvfs backends not beingAndrew Tridgell2-3/+34
in the right state when called. For example, when we use the unixuid handler in the chain of handlers, and a backend decides to continue a call asynchronously then we need to ensure that the continuation happens with the right security context. The solution is to add a new ntvfs operation ntvfs_async_setup(), which calls all the way down through the layers, setting up anything that is required, and takes a private pointer. The backend wanting to make a async calls can use ntvfs_async_setup() to ensure that the modules above it are called when doing async processing. (This used to be commit a256e71029727fa1659ade6257085df537308c7d)
2007-10-10r3035: if the ntvfs layers prior to us have said that we can't perform anAndrew Tridgell1-1/+2
operation asynchronously (such as the nbench module), then ignore lock timeouts, as they would make no sense (This used to be commit 2894dd0ac0ddd0ae5b4d536d5cff0690bbfab1a0)
2007-10-10r3034: - fixed a bug in message dispatch, when the dispatch function called ↵Andrew Tridgell3-14/+38
messaging_deregister() - added a pvfs_lock_close_pending() hook to remove pending locks on file close - fixed the private ptr argument to messaging_deregister() in pvfs_wait - fixed a bug in continuing lock requests after a lock that is blocking a pending lock is removed - removed bogus brl_unlock() call in lock continue - corrected error code for LOCKING_ANDX_CHANGE_LOCKTYPE - expanded the lock cancel test suite to test lock cancel by unlock and by close - added a testsuite for LOCKING_ANDX_CHANGE_LOCKTYPE (This used to be commit 5ef80f034d4aa4dd6810532c63ad041bfc019cb8)
2007-10-10r3031: added support for lock cancelation, which effectively just triggers ↵Andrew Tridgell3-6/+58
an early lock timeout added support for more of the bizarre special lock offset semantics of w2k3 (This used to be commit d5bfc910b1200fb283e26572dc57fcf93652fd32)
2007-10-10r3029: implemented byte range lock timeouts.Andrew Tridgell5-7/+317
This adds a pvfs_wait_message() routine which uses the new messaging system, event timers and talloc destructors to give a nice generic async event handling system with a easy to use interface. The extensions to pvfs_lock.c are based on calls to pvfs_wait_message() routines. We now pass all of our smbtorture locking tests, although while writing this code I have thought of some additonal tests that should be added, particularly for lock cancel operations. I'll work on that soon. This commit also extends the smbtorture lock tests to test the rather weird 0xEEFFFFFF locking semantics that I have discovered in win2003. Win2003 treats the 0xEEFFFFFF boundary as special, and will give different error codes on either side of it. Locks on both sides are allowed, the only difference is which error code is given when a lock is denied. Anyone like to hazard a guess as to why? It has me stumped. (This used to be commit 4395c0557ab175d6a8dd99df03c266325949ffa5)
2007-10-10r3012: added initial support for byte range locking in the posix vfs. This isAndrew Tridgell7-22/+227
enough for us to pass locktest, but does not yet support lock timeouts and some of the other esoteric features. (This used to be commit 58a92abd88f190bc60894a68e0528e95ae33fe39)
2007-10-10r2984: fixed the error code for a non-terminal component of a path name not ↵Andrew Tridgell1-2/+1
existing (This used to be commit c6a922dbd844c69bbba83c259169655d17e9f87f)
2007-10-10r2941: added pvfs_flush() implementation to the posix backendAndrew Tridgell4-10/+67
(This used to be commit dac00ef3b0d0f8467367d7b6ff77db7b63a042cc)
2007-10-10r2931: use next_codepoint() to ensure we properly handle multi-byte ↵Andrew Tridgell1-2/+6
characters in pvfs_unix_path() (This used to be commit 0acf95d84c51d564f7215d34364c37ca74a2a150)
2007-10-10r2928: - fixed the handling of reserved names (rejecting them with ↵Andrew Tridgell3-38/+23
ACCESS_DENIED) - don't check for '.' specially in checking for legal names. Longhorn doesn't do this any more, and its a real pain. Longhorn allows for filenames ending in '.', and with as many '.' elements as you like. (This used to be commit 0a475175c53016bfa5b8246819676ddcd8b66feb)
2007-10-10r2927: imported the hash2 name mangling code from Samba3 into Samba4, butAndrew Tridgell5-39/+693
heavily modified to suit the Samba4 architecture. Samba4 with posix backend now passes the BASE-MANGLE test (This used to be commit ed52d69e8a065b6a8df2fb73c89be67acfdbca65)
2007-10-10r2926: name->dos.attrib is not valid unless name->exists is trueAndrew Tridgell1-2/+4
(This used to be commit f85a0b725d3bf67531e6874d4e8558fb050bb66f)
2007-10-10r2916: longhorn client doesn't bother setting the directory bit in ntcreatexAndrew Tridgell1-1/+6
when opening directories. This change allows samba4 server to work with longhorn client. (This used to be commit 4a8b0302eff37ccfcb66b91259ee5da20879c652)
2007-10-10r2904: - fixed the old style SMBsearch to return the pvfs shortname, not a ↵Andrew Tridgell2-3/+6
truncated long name. - short name can be up to 12 bytes, not 11 (This used to be commit 657103ec6264bf4c2986fedd3fc6577746395d49)
2007-10-10r2893: added very primitive name mangling support to pvfsAndrew Tridgell2-4/+58
(This used to be commit 749fa73544201f521d9cd3fa972b89cae99bc2c0)
2007-10-10r2800: removed the warning about using the posix ntvfs handler, as it is nowAndrew Tridgell1-2/+0
considerably more complete than the simple handler (This used to be commit e6ecd31be8e91f552d891c41b2f8737519a490a1)
2007-10-10r2794: a very simple version of the unixuid NTVFS pass-thru module. InAndrew Tridgell1-55/+0
conjunction with the posix backend this gives us a way to correctly setup the unix security context in Samba4. I chose the following method to determine the unix uid's and gid's to use given the list of SIDs from the login process - look for a "UnixID" field in the sam record. If present, then use it (check if the record is of the right type as well) - if UnixID is not present, then look for the "UnixName" sam field. If it is present then use getpwnam() or getgrnam() to find the unix id. - if UnixID and UnixName are not present, then look for a unix account of the right type called by the same name as the sAMAccountName field. - if none of the above work then fail the operation with NT_STATUS_ACCESS_DENIED obviously these steps only work well with a local SAM. It will need to be more sophisticated in future. I did not put any cache in place at all. That will need to be added for decent performance. (This used to be commit 78b67d19b9766131f0270e451089ee5bb1aa8bd9)
2007-10-10r2789: fix compileSimo Sorce1-1/+1
(This used to be commit a34ba8dafebb65e59616a0e68cc3d6fe3a349801)