summaryrefslogtreecommitdiff
path: root/source3/smbd/open.c
AgeCommit message (Collapse)AuthorFilesLines
2008-01-12delete on close even prevents stat opensVolker Lendecke1-6/+6
(This used to be commit 85fe7f3f6ed4aae76e5cf31ab689b2dfacfd74de)
2008-01-12There's no point in calling FLOCK on a non-existing fdVolker Lendecke1-7/+9
(This used to be commit 9ff79f231f1206631662b5c521ecddf5df9141c0)
2008-01-10use talloc_tos in a few more placesVolker Lendecke1-4/+4
(This used to be commit 65dd869bea351010c67f02046ae4134bdada1a4c)
2008-01-09Make use of talloc_pool in the main codepaths. Remove the sub-contexts.Jeremy Allison1-7/+1
Jeremy. (This used to be commit bc932b8ad4396f76b71c43efe9a6346f89c3632c)
2008-01-09Replace an uninitialized variableVolker Lendecke1-0/+2
Reported by the IBM checker (This used to be commit 48f61e4b9fce5ea4f4bc3cf55530bb757c0def07)
2008-01-08Remove redundant parameter fd from SMB_VFS_FCHMOD_ACL().Michael Adam1-3/+2
Michael (This used to be commit 7b201c177b3668f54751ba17d6a0b53ed913e7f7)
2008-01-07Remove redundant parameter fd from SMB_VFS_KERNEL_FLOCK().Michael Adam1-1/+1
Michael (This used to be commit 195c519377c2fdc655e25760b52bc0694b8dda81)
2008-01-07Remove redundant parameter fd from SMB_VFS_FTRUNCATE().Michael Adam1-1/+1
Michael (This used to be commit 2ad66050a0452b8e7e08b1e7a01efa00c72fd451)
2008-01-07Remove redundant parameter fd from SMB_VFS_FCHOWN().Michael Adam1-1/+1
Michael (This used to be commit fbb193db3e0dc51cb000ae406a68bc547f31d9ab)
2008-01-07Remove redundant parameter fd from SMB_VFS_FCHMOD().Michael Adam1-1/+1
Michael (This used to be commit a54d5604da556d1250ca9948d4acc4a187a9fede)
2008-01-07Remove redundant parameter fd from SMB_VFS_FSTAT().Michael Adam1-3/+3
Michael (This used to be commit 0b86c420be94d295f6917a220b5d699f65b46711)
2008-01-06Remove superfluous parameter fd from SMB_VFS_FSET_NT_ACL().Michael Adam1-2/+1
Michael (This used to be commit 4f2d139a186048f08180378a877b69d2f80ad51f)
2008-01-04Using a bool with a logical operation. IBM checker caught.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 7f9fe7da1e25bcc730f4c4226bf77f6d39b5ace4)
2008-01-04Refactor the crypto code after a very helpful conversationJeremy Allison1-2/+2
with Volker. Mostly making sure we have data on the incoming packet type, not stored in the smb header. Jeremy. (This used to be commit c4e5a505043965eec77b5bb9bc60957e8f3b97c8)
2008-01-01Use NULL instead of 0Volker Lendecke1-4/+4
"struct security_descriptor" has pointers, not integers inside (This used to be commit 13158014e3b05e44eea897fbcf470957301c5c97)
2007-12-28Fix setting the initial permission bitsVolker Lendecke1-4/+9
This fixes a make test failure on Solaris. When creating a new file, file_set_dosmode() called from open_file_ntcreate calculates a new permission mask, very likely different from what had been calculated in open_file_ntcreate. Further down we overwrote the newly calculated value with SMB_FCHMOD_ACL, ignoring what file_set_dosmode had calculated. Why did Linux not see this? fchmod_acl on a newly created file without acls would not retrieve an acl at all, whereas under Solaris acl(2) returns something even for files with just posix permissions returns something. Jeremy, given that we have very similar code in 3.0.28 this might also explain some of the bug reports that people have concerning ACLs on new files. Volker P.S: This one took a while to find... (This used to be commit 2135dfe91bf1ae114a18c15286b535662200677d)
2007-12-26We need to return the correct atimeVolker Lendecke1-1/+6
On systems with nanosecond atime we need to re-stat after messing with the fd, at least Solaris 10 updates atime after we stat(2)ed the file. (This used to be commit 6e6ec0a563f8b7e3d4618ce60e776bcce53f40c4)
2007-12-22Remove redundant connection_struct from fd_close() parameter list.Michael Adam1-11/+11
Michael (This used to be commit 3611cc8561cf837adea83fc7c16ca7535f188466)
2007-12-22Remove redundant connection_struct from fd_close_posix() parameter list.Michael Adam1-1/+1
Michael (This used to be commit f3365b74ac016eaee1e82eef769dd618af5df201)
2007-12-11separate out create_file_unixpath()Volker Lendecke1-171/+242
(This used to be commit deaacf971e0fbffd0e5fe24f225ebf645a77e133)
2007-12-11Move more stuff out of the wayVolker Lendecke1-7/+7
(This used to be commit ae422fce01cd7520d6dd72e08719a5cd003cb640)
2007-12-11Move INTERNAL_OPEN_ONLY calculation out of the wayVolker Lendecke1-4/+4
(This used to be commit 0e96549b56e288c596ed8772197f97ffa5ade300)
2007-12-10Increase debug levelVolker Lendecke1-1/+1
(This used to be commit 4e6df5547167fc235971498cb296a5f74dec8b8b)
2007-12-07Pass only internal oplock request values to create_fileVolker Lendecke1-42/+5
Other callers (e.g. reply_open_and_X) might have other ideas of the bit shuffling (This used to be commit 6a58d823e51ccc8efd6682005e367c9096abc993)
2007-12-07More parameter shufflingVolker Lendecke1-1/+1
(This used to be commit 8f70f691ffa3e171a73d04a1c867aa6fca4d4583)
2007-12-07Re-arrange create_file() parametersVolker Lendecke1-1/+1
This changes them to be a bit closer to open_file_ntcreate and thus provides less surprises to developers (This used to be commit d000258b96b9bb714efdfe982947370a6dfb5d55)
2007-12-07Make fname arg to create_file a "const char *"Volker Lendecke1-6/+15
(This used to be commit da94b5f9e37f38880e8ca4c2c7f8de6838864321)
2007-12-05There's no point in passing down a 0Volker Lendecke1-15/+25
(This used to be commit 525a6887afcae8d8e740cf194a412c21da899649)
2007-12-05Move create_file to open.cVolker Lendecke1-0/+475
I'm checking in this long sequence of micro-checkins for review, the overall patch from 3b057022a5 to this is not too large. (This used to be commit 51db8d09a4652d626c093f7bacf075c1c168fc33)
2007-11-15Add MAX_DNS_NAME_LENGTH, remove more pstrings.Jeremy Allison1-3/+3
Jeremy. (This used to be commit a1725f4ff7ed375808c78ac661b539557748d0a5)
2007-10-31Fix some cases where file_set_dosmode was being passedJeremy Allison1-2/+4
False instead of NULL. Fix more of the notifications to be correct for Samba4 RAW-NOTIFY torture (we had missed one when calling set_ea_dos_attribute(). Jeremy. (This used to be commit 39d265375cf55eedddef2c4faa65398df73d5ed2)
2007-10-18RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison1-21/+21
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/+4
(This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab)
2007-10-10r25534: Apply some constVolker Lendecke1-1/+1
Why? It moves these structs from the data into the text segment, so they will never been copy-on-write copied. Not much, but as in German you say "Kleinvieh macht auch Mist...." (This used to be commit 0141e64ad4972232de867137064d0dae62da22ee)
2007-10-10r25391: Fix bug #4978 : Store DOS Attributes fails when copying folders.Jeremy Allison1-0/+10
Jeremy. (This used to be commit 713277391ae7f81f8545723c919865ff8c07ed86)
2007-10-10r25117: The mega-patch Jerry was waiting for. Remove all pstrings fromJeremy Allison1-12/+28
the main server code paths. We should now be able to cope with paths up to PATH_MAX length now. Final job will be to add the TALLOC_CTX * parameter to unix_convert to make it explicit (for Volker). Jeremy. (This used to be commit 7f0db75fb0f24873577dcb758a2ecee74fdc4297)
2007-10-10r25055: Add file_id_string_tosVolker Lendecke1-1/+1
This removes file_id_string_static and file_id_string_static2 (This used to be commit 638c848c9afe374feb30e34c494f89b2a6c64f7b)
2007-10-10r24809: Consolidate the use of temporary talloc contexts.Volker Lendecke1-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 (This used to be commit 6585ea2cb7f417e14540495b9c7380fe9c8c717b)
2007-10-10r24702: Remove the old API pointersVolker Lendecke1-17/+15
(This used to be commit 17df313db42199e26d7d2044f6a1d845aacd1a90)
2007-10-10r24120: add a file_id_create() hook into the VFS layerStefan Metzmacher1-5/+5
it's needed for some cluster filesystems to overload this function. metze (This used to be commit cdaa24e8047399002e4b287a31a8340a665e580f)
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-10r23725: Remove get_current_mid()Volker Lendecke1-17/+33
Jeremy, next one to review :-) (This used to be commit a50555dda7db5e848e337185ed91c41c2557f7be)
2007-10-10r23724: Reduce access to the global inbuf a tiny bit. Add a struct smb_requestVolker Lendecke1-20/+46
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. Jeremy, I'm only checking this into 3_0, please review before I merge it to _26. Volker (This used to be commit ca988f4e79e977160d82e86486972afd15d4acf5)
2007-10-10r23375: Fix a 64-bit warningVolker Lendecke1-1/+1
(This used to be commit c592b562fa793c9fb3bd0d84074d4ffaa8f63b64)
2007-10-10r23183: Check in a change made by Tridge:Volker Lendecke1-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 (This used to be commit 9b10dbbd5de8813fc15ebbb6be9b18010ffe8139)
2007-10-10r23151: Re-arrange the logic so it looks identical to theJeremy Allison1-8/+14
"file existed" case above. This has no functional change but is easier to see that it's doing the same thing. Jeremy. (This used to be commit 0a7d8362be8379b77e6afb803ab88d726ae7877d)
2007-10-10r23150: Fix Samba3 in the build farm again. In the case where theJeremy Allison1-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. (This used to be commit 9b9513856e9e9f84d5acd94e3e3d6e73358ee7dc)
2007-10-10r23100: Implement the delete on close semantics I've just tested forJeremy Allison1-18/+22
in Samba4 smbtorture. Fix rename on an open file handle. Needed for 3.0.25a. Jeremy. (This used to be commit a301467d5f645dada27093ddfd74890b88bb4ce8)
2007-10-10r23087: Fix POSIX setfilepathinfo to use lstat, not stat.Jeremy Allison1-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. (This used to be commit f546750176a22cdd7298a73afc81587923baaff9)