summaryrefslogtreecommitdiffstats
path: root/source/smbd/open.c
Commit message (Collapse)AuthorAgeFilesLines
* r25403: grab latest changes form 3.2 tree in preparation for release of ↵Gerald Carter2007-09-281-0/+10
| | | | 3.2.0pre1
* r25387: Sync with 3.2.0 svn treeGerald Carter2007-09-271-12/+28
|
* r25055: Add file_id_string_tosVolker Lendecke2007-09-101-1/+1
| | | | This removes file_id_string_static and file_id_string_static2
* r24809: Consolidate the use of temporary talloc contexts.Volker Lendecke2007-08-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the two functions talloc_stackframe() and talloc_tos(). * When a new talloc stackframe is allocated with talloc_stackframe(), then * the TALLOC_CTX returned with talloc_tos() is reset to that new * frame. Whenever that stack frame is TALLOC_FREE()'ed, then the reverse * happens: The previous talloc_tos() is restored. * * This API is designed to be robust in the sense that if someone forgets to * TALLOC_FREE() a stackframe, then the next outer one correctly cleans up and * resets the talloc_tos(). The original motivation for this patch was to get rid of the sid_string_static & friends buffers. Explicitly passing talloc context everywhere clutters code too much for my taste, so an implicit talloc_tos() is introduced here. Many of these static buffers are replaced by a single static pointer. The intended use would thus be that low-level functions can rather freely push stuff to talloc_tos, the upper layers clean up by freeing the stackframe. The more of these stackframes are used and correctly freed the more exact the memory cleanup happens. This patch removes the main_loop_talloc_ctx, tmp_talloc_ctx and lp_talloc_ctx (did I forget any?) So, never do a tmp_ctx = talloc_init("foo"); anymore, instead, use tmp_ctx = talloc_stackframe() :-) Volker
* r24702: Remove the old API pointersVolker Lendecke2007-08-271-17/+15
|
* r24122: merge from SAMBA_3_2:Stefan Metzmacher2007-08-021-5/+5
| | | | | | | | | add a file_id_create() hook into the VFS layer it's needed for some cluster filesystems to overload this function. metze
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-07-101-2/+1
|
* r23780: Find and fix more GPL2 -> GPL3.Jeremy Allison2007-07-091-1/+1
| | | | Jeremy.
* r23740: Merge r23725 from 3_0:Volker Lendecke2007-07-071-17/+33
| | | | Remove get_current_mid()
* r23739: Merge r23724 from 3_0 without the accidential checkin:Volker Lendecke2007-07-071-20/+46
| | | | | | | | Reduce access to the global inbuf a tiny bit. Add a struct smb_request that contains some of the fields from the SMB header, removing the need to access inbuf directly. This right now is used only in the open file code & friends, and creating that header is only done when needed. This needs more work, but it is a start.
* r23375: Fix a 64-bit warningVolker Lendecke2007-06-071-1/+1
|
* r23183: Check in a change made by Tridge:Volker Lendecke2007-05-291-40/+29
| | | | | | | | | | | | | This replaces the internal explicit dev/ino file id representation by a "struct file_id". This is necessary as cluster file systems and NFS don't necessarily assign the same device number to the shared file system. With this structure in place we can now easily add different schemes to map a file to a unique 64-bit device node. Jeremy, you might note that I did not change the external interface of smb_share_modes.c. Volker
* r23151: Re-arrange the logic so it looks identical to theJeremy Allison2007-05-261-8/+14
| | | | | | | "file existed" case above. This has no functional change but is easier to see that it's doing the same thing. Jeremy.
* r23150: Fix Samba3 in the build farm again. In the case where theJeremy Allison2007-05-261-0/+17
| | | | | | | | | | file was being created and we go into the race condition check, we were testing for compatible open modes, but were not breaking oplocks in the same way as if the file existed. This meant that we weren't going into the code path that sets fsp->oplock = FAKE_LEVEL_II_OPLOCK if the client didn't ask for an oplock on file create. We need to do this as internally it's what Windows does. Jeremy.
* r23100: Implement the delete on close semantics I've just tested forJeremy Allison2007-05-231-18/+22
| | | | | | in Samba4 smbtorture. Fix rename on an open file handle. Needed for 3.0.25a. Jeremy.
* r23087: Fix POSIX setfilepathinfo to use lstat, not stat.Jeremy Allison2007-05-221-1/+6
| | | | | | | Still missing lchown (will add this for 3.0.26). Don't merge for 3.0.25a - possibly 3.0.25b (if it exists). Jeremy.
* r22942: Some message_register -> messaging_register conversionsVolker Lendecke2007-05-161-5/+10
|
* r22868: Replace some message_send_pid calls with messaging_send_pid calls. MoreVolker Lendecke2007-05-141-2/+4
| | | | tomorrow.
* r22736: Start to merge the low-hanging fruit from the now 7000-line cluster ↵Volker Lendecke2007-05-071-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
* r21665: Fix bug #4428 reported by Jason Mader <jason@ncac.gwu.edu>.Jeremy Allison2007-03-021-2/+1
| | | | Jeremy.
* r21480: Make fd_open match fd_close be translatingJeremy Allison2007-02-211-9/+12
| | | | | errno into an NTSTATUS immediately. Jeremy.
* r21322: No feedback means consent :-)Volker Lendecke2007-02-131-20/+30
| | | | | | | | | | | It does not matter if I screw up 3.0.25 or 3.0.26 with this, so do it rather sooner than later. Add the notify support that already exists in 3_0 to 3_0_25. If you want to see this patch dissected into digestable parts, look at 3_0, revisions at about 20800 and following. Volker
* r21209: Add in the POSIX extensions.Jeremy Allison2007-02-071-35/+74
| | | | Jeremy.
* r20883: W00t! I now understand how "delete on close" reallyJeremy Allison2007-01-181-7/+5
| | | | | | | | | | | | | | | | works - even with the strange "initial delete on close" semantics. The "initial delete on close" flag isn't committed to the share mode db until the handle is closed, and is discarded if any real "delete on close" was set. This allows me to remove the "initial_delete_on_close" flag from the share db, and move it into a BOOL in files_struct. Warning ! You must do a make clean after this. Cope with the wrinkle in directory delete on close which is done differently from files. We now pass all Samba4 smbtortute BASE-DELETE tests except for the one checking that files can't be created in a directory which has the delete on close set (possibly expensive to fix). Jeremy.
* r20873: Some correctness fixes w.r.t. Samba4 torture BASE-DELETE.Jeremy Allison2007-01-181-4/+6
| | | | | | | | Allow us to correctly refuse to set delete on close on a non-empty directory. There are still some delete-on-close wrinkles to be fixed, but I understand how to do that better now. I'll fix this tomorrow. Jeremy.
* r20844: Somewhat radical change - this may break the build (I willJeremy Allison2007-01-171-4/+7
| | | | | | | | | | | | watch carefully - so I'm doing it in one transaction so I can roll back). Change check_name(), reduce_name() and dptr_create() to return NTSTATUS. This helps a lot in error path processing and especially in reduce_name() allows us to ditch the flaky and error-prone saving of errno and return errors directly. Jeremy.
* r20413: Merge Volker's open directory changes to 3.0.24.Jeremy Allison2006-12-301-150/+240
| | | | | | I think they're correct, modulo more testing of error codes. Jeremy.
* r20257: Hey, change_owner_to_parent is now static :-)Volker Lendecke2006-12-191-4/+4
|
* r19993: Fix the problem with Linux clients requesting O_WRONLYJeremy Allison2006-12-011-3/+12
| | | | | | | on write-only files. Jim please check. Should not affect Windows clients - I ensured all the relevent Samba4 torture tests still pass. Jeremy.
* r19810: more merge work....does not compile currently. Working on smbd mergeGerald Carter2006-11-211-200/+217
|
* r19769: more compile fixes while merging from SAMBA_3_0 (not done yet)Gerald Carter2006-11-181-1/+1
|
* r19654: merge GPFS vfs support from 3.0, including adding kernel_flock vfs op.Jim McDonough2006-11-101-25/+15
|
* r17249: Ensure we only set the FILE_WRITE_DATA on O_TRUNCJeremy Allison2006-07-261-3/+0
| | | | | in one place. Jeremy.
* r17248: Ensure we definately add the WRITE_DATA on O_TRUNC.Jeremy Allison2006-07-261-3/+4
| | | | Jeremy.
* r17247: When we map generic to specific we need to rememberJeremy Allison2006-07-261-2/+5
| | | | | | | to copy over the copy of the access_mask, open_access_mask. Jerry - this is a definate fix for a 3.0.23b and should also be on the patches page. CIFSFS breaks without this. Jeremy.
* r17153: Bring 3.0.23a up into line with the latest changesJeremy Allison2006-07-191-90/+70
| | | | | | in SAMBA_3_0. Fix kernel oplocks bug (efficiently). Jerry - this needs merging for 3.0.23a. Jeremy
* r17132: Optimisation - when doing a stat open don't open theJeremy Allison2006-07-191-1/+1
| | | | | | file unless we really have to (ie. O_CREAT and file doesn't exist). Jeremy.
* r17127: Missed a logic error in my last patch. Ensure we deal with anyJeremy Allison2006-07-191-5/+45
| | | | | | | oplocks that were granted when we had released the lock. Fix strange case where stat open grants a batch oplock on file create, but grants no oplock on file open. Jeremy.
* r17126: Drastic problems require drastic solutions. There'sJeremy Allison2006-07-191-80/+74
| | | | | | | | | | | | | | | no way to get all the cases where kernel oplocks are on and we can't open the file and get the correct semantics (think about the open with truncate with an attribute only open - we'd need a vfs change to add the truncate(fname, len) call). So always drop the share mode lock before doing any real fd opens and then re-acquire it afterwards. We're already dealing with the race in the create case, and we deal with any other races in the same way. Volker, please examine *carefully* :-). This should fix the problems people reported with kernel oplocks being on. Jeremy.
* r16472: final pass for 3.0.23rc3 I think. Current with SAMBA_3_0 r16471Gerald Carter2006-06-221-2/+2
|
* r16254: pulling klocwork fixes for 3.0.23rc3 (current up to r16251)Gerald Carter2006-06-151-3/+0
|
* r16104: Set version to 3.0.23rc2Gerald Carter2006-06-081-18/+27
| | | | | Bring release tree up to current 3.0 tree (svn merge -r15845:16103 $SVNURL/branches/SAMBA_3_0)
* r15837: starting sync up for 3.0.23rc1 (in sync with SAMBA_3_0 r15822)Gerald Carter2006-05-231-1/+1
|
* r15144: final code changes for 3.0.23pre1 (SAMBA_3_0 r15141)Gerald Carter2006-04-201-40/+60
|
* r14898: This change is an attempt to improve the quality of the information thatJames Peach2006-04-041-2/+2
| | | | | | | | | | | | | | | | | is produced when a process exits abnormally. First, we coalesce the core dumping code so that we greatly improve our odds of being able to produce a core file, even in the case of a memory fault. I've removed duplicates of dump_core() and split it in two to reduce the amount of work needed to actually do the dump. Second, we refactor the exit_server code path to always log an explanation and a stack trace. My goal is to always produce enough log information for us to be able to explain any server exit, though there is a risk that this could produce too much log information on a flaky network. Finally, smbcontrol has gained a smbd fault injection operation to test the changes above. This is only enabled for developer builds.
* r14883: add 'smbd:sharedelay' option, so that we can speed up BASE-DENY2 in ↵Stefan Metzmacher2006-04-031-1/+8
| | | | | | | | make test as done in samba4 metze
* r14602: Fix another logic bug in new oplock handling. JustJeremy Allison2006-03-211-12/+17
| | | | | | | | | | | | | | because lck->num_share_modes != 0 doesn't mean that there *are* other valid share modes. They may be all marked "UNUSED" or be deferred open entries. In that case don't downgrade the granted oplock to level2 needlessly - a client can have an exclusive oplock in this case. The original code handled this correctly in the lck->num_share_modes == 0 case but not in the case where there were no valid share modes but lck->num_share_modes != 0. I'll clean up my Samba4 torture tester for this and commit it tomorrow. Jeremy.
* r14596: Fix a logic bug with multiple oplock contention.Jeremy Allison2006-03-201-18/+33
| | | | | | | | | | | | | The sad thing is the core of this bug fix is just removing a paranoia "exit_server" call, as the rest of the logic was already correct :-). Lots of comments to explain the logic added. I will look at adding tests to exercise this, might be possible. Jeremy.
* r13694: Committing patch from Aleksey Fedoseev <aleksey at fedoseev dot net> ↵Volker Lendecke2006-02-261-1/+1
| | | | | | | | to NULL out a pointer after talloc_destroy(). Volker
* r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()Gerald Carter2006-02-201-12/+12
| | | | macro which sets the freed pointer to NULL.