summaryrefslogtreecommitdiff
path: root/source3/modules
AgeCommit message (Collapse)AuthorFilesLines
2009-12-03Remove smb_fname duplicates that just keep the same information as in ↵Jeremy Allison2-11/+0
fsp->fsp_name. Moving towards making VFS_OPEN/VFS_MKDIR/VFS_RMDIR handle based... Jeremy.
2009-12-02Remove unneeded argument from can_set_delete_on_close(). EnsureJeremy Allison1-2/+2
can_set_delete_on_close() is correctly called before any setting of the disposition bit (clean up the do_unlink() call). Jeremy.
2009-12-03ѕ3: remove superfluous option checkBjörn Jacke1-13/+10
this function is only called when strict alloc is set, no reason to check that twice.
2009-12-02Restructure the ACL code some more, get the internal semanticsJeremy Allison1-169/+130
right. The previous bugs were due to the fact that get_nt_acl_internal() could return an NTSTATUS error if there was no stored ACL blob, but otherwise would return the underlying ACL from the filysystem. Fix this so it always returns a valid acl if it can, and if it does not its an error to be reported back to the client. This then changes the inherit acl code. Previously we were trying to match Windows by setting a minimal ACL on a new file that didn't inherit anything from a parent directory. This is silly - the returned ACL wouldn't match the underlying UNIX permissions. The current code will correctly inherit from a parent if a parent has any inheritable ACE entries that apply to the new object, but will return a mapping from the underlying UNIX permissions if the parent has no inheritable entries. This makes much more sense for new files/directories. Jeremy.
2009-12-02Ensure check_parent_acl_common() only looks at storedJeremy Allison1-2/+16
blobs - returns NT_STATUS_OK if there aren't any. Jeremy.
2009-12-02s3: prefer posix_fallocate for doing "strict allocate"Björn Jacke1-4/+21
posix_fallocate is more efficient than manual zero'ing the file. When preallocation in kernel space is supported it's extremely fast. Support for preallocation at fs layer via posix_fallocate and fallocate at kernel site can be found in Linux kernel 2.6.23/glibc 2.10 with ext4, XFS and OCFS2. Other systems that I know of which support fast preallocation in kernel space are AIX 6.1 with JFS2 and recent Solaris versions with ZFS maybe UFS2, too. People who have a system with preallocation in kernel space might want to set "strict allocate = yes". This reduces file fragentation and it's also safer for setups with quota being turned on. As of today most systems still don't have preallocation in kernel space, and that's why "strict allocate = no" will stay the default for now.
2009-12-02Ensure get_nt_acl_internal() only looks at the ACL blobs, notJeremy Allison2-19/+23
reads off the underlying filesystem. Ensure that vfs_acl_tdb.c returns NT_STATUS_NOT_FOUND, not NT_STATUS_OBJECT_NAME_NOT_FOUND when it can't find a blob matching the file. Jeremy.
2009-11-30Fix DEBUG 0 -> DEBUG 10 (left over code).Jeremy Allison1-2/+4
Fix opendir status return if access denied. Jeremy.
2009-11-30Fix bug 6938 : No hook exists to check creation rights when using acl_xattr ↵Jeremy Allison3-7/+104
module Fix ACL modules to test for permissions on open/mkdir/opendir. Ensure that underlying ACLs are returned for directories/files with no Windows xattr or tdb acls stored. Jeremy.
2009-11-30Restructure the connect function code to always callJeremy Allison16-37/+117
down to NEXT-> before initializing. This allows us to do cleanup (by calling DISCONNECT) if initialization fails. Also fix vfs_acl_xattr which was failing to call the NEXT connect function. Jeremy.
2009-11-29s3: Restore "fake directory create times" as a share parameterVolker Lendecke1-3/+3
2009-11-29s3: "copy_reg" only looks at mode, uid, gid, atime and mtime (no birthtime)Volker Lendecke1-2/+1
2009-11-29s3: Pass up fake_dir_create_times from atalk_build_pathsVolker Lendecke1-15/+24
The callers only look at the mode
2009-11-29s3: Pass the "fake dir create times" parameter to sys_*statVolker Lendecke2-6/+10
Step 0 to restore it as a per-share paramter
2009-11-25Fix bug 6892 - When a chown operation is issued via Windows Explorer, all ↵Jeremy Allison1-15/+36
ACLS are wiped out. Merges existing DACLs when a ACL set operation comes in with only owner or group values set. Jeremy.
2009-11-23Revert "s3: Make the implicit reference to Protocol in is_in_path() explicit"Volker Lendecke2-4/+2
This reverts commit f7b4151a64d8c6851e62255a7139fd00a5fc63a3.
2009-11-23Revert "s3: Move the global variable Protocol to struct smbd_server_connection"Volker Lendecke1-1/+1
This reverts commit c85a4c9ba4a7de65a7850f6f9708df66bd24deea.
2009-11-21s3: Move the global variable Protocol to struct smbd_server_connectionVolker Lendecke1-1/+1
2009-11-21s3: Make the implicit reference to Protocol in is_in_path() explicitVolker Lendecke2-2/+4
2009-11-18s3: Replace some create_synthetic_smb_fname() callsVolker Lendecke1-11/+7
In very hot codepaths like the statcache copy_smb_filename and the subsequent recursive talloc_free is noticable in the CPU load.
2009-11-18s3: Do not talloc in readdirVolker Lendecke4-25/+37
This is a hot codepath (called from the stat cache)
2009-11-17Remove "store create time" code, cause create time to be storedJeremy Allison2-4/+2
in the "user.DOSATTRIB" EA. From the docs: In Samba 3.5.0 and above the "user.DOSATTRIB" extended attribute has been extended to store the create time for a file as well as the DOS attributes. This is done in a backwards compatible way so files created by Samba 3.5.0 and above can still have the DOS attribute read from this extended attribute by earlier versions of Samba, but they will not be able to read the create time stored there. Storing the create time separately from the normal filesystem meta-data allows Samba to faithfully reproduce NTFS semantics on top of a POSIX filesystem. Passes make test but will need more testing. Jeremy.
2009-11-11Second part of bugfix for 6865 - acl_xattr module: Has dependency that ↵Jeremy Allison2-4/+10
inherit acls = yes or xattrs are removed. We also need dos filemode = true set as well. Jeremy.
2009-11-11s3:vfs_fs_capabilities: fix a debug messageMichael Adam1-1/+1
Michael
2009-11-06Fix bug 6865 - acl_xattr module: Has dependency that inherit acls = yes or ↵Jeremy Allison2-0/+18
xattrs are removed. Jeremy.
2009-11-04s3: add support for full windows timestamps resolution on filesBjörn Jacke1-6/+13
setting nanosecond timestamps using utimensat() was first supported by Linux kernel 2.6.22 and glibc 2.6. It's specified in POSIX.1-2008. This effectively makes us use Windows' full 100ns timestamp resolution - actually just an improvement from 10^-6 to 10^-7. For now Linux CIFS vfs will also just be able to make use of 100ns resolution, not 1ns.
2009-10-29Start fixing the RAW-STREAMS test - ensure that the xattrJeremy Allison1-2/+0
used to store the stream info in streams_depot.so is not seen in when enumerating EAs. Jeremy.
2009-10-23Fix bug 6802 - A created folder does not properly inherit permissions from ↵Barry Sabsevitz1-4/+38
parent.
2009-10-16Add comment explaining about symlink following & posix.Jeremy Allison1-1/+6
Jeremy.
2009-10-16Last 2 VFS_STAT -> LSTAT fixes I can see in the modules code.Jeremy Allison2-2/+14
Jeremy.
2009-10-16Fix one missing STAT -> LSTAT with POSIX pathnames in vfs_xattr_tdb.c. ↵Jeremy Allison1-1/+7
Caught by the torture tester. I love unit tests :-). Jeremy.
2009-10-13s3: Fix vfs_shadow_copy2 to allow in-path @GMT-xxxAndrew Tridgell1-21/+126
2009-10-06s3: Add access_mask to the flock VFS callAbhidnya P Chirmule4-8/+8
2009-10-02Remove lots of duplicate code and move it into oneJeremy Allison2-49/+31
function vfs_stat_fsp(). Stops code looking at fsp->posix_open except for exceptional circumstances. Jeremy.
2009-10-02Fix more use of VFS_STAT when posix pathnames selected.Jeremy Allison1-1/+1
Jeremy.
2009-10-01Fix bug #6769 - symlink unlink does nothing.Jeremy Allison1-1/+5
Always use LSTAT for POSIX pathnames. Jeremy.
2009-09-28changed debuglevel for two messages in the GPFS module from 0 to 10 they ↵Christian Ambach1-2/+2
spammed the logs on a test machine and they are just debug messages, so let's move them to the level of the other debug messages in the file Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
2009-09-24s3:vfs_default - correct function parametersMatthias Dieter Wallnöfer1-1/+2
2009-09-24s3 onefs: Fix 1 second share mode delay handlingSteven Danneman1-3/+33
When racing to the open and loosing we may get a share_mode violation. In this case handle the 1-second delay via a defferred open properly. This requires us to retrieve the share_mode_lock before deferring open so we don't dereference a NULL pointer assuming we already had the lck because we were the first opener.
2009-09-24s3 onefs: Fix a race condition exists in onefs_open.c between multiple opens ↵Steven Danneman1-5/+19
to the same file. Two openers can stat a file at the same time, see that it doesn't exist, and then both race to open it first. The loser will enter onefs_open_file_ntcreate believing that the file doesnt exist, and thus skip any current state lookups for that file. This includes setting the file_id, and having a valid stat buffer. Normally on first create the file_id will be set during the open, but the second opener in this scenario may fail the open (oplock/share mode) and file_id will not be set, nor will the stat buffer be valid. In the error paths of this patch, we now double check that the file_id and the stat buffer are valid before doing other operations.
2009-09-24s3 onefs: Add some debugging/asserts to give more info when there is bad ↵Zack Kirsch1-9/+24
deferred open state. Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-09-24s3: Add more helpful debugging to some of the streams codeTim Prouty2-1/+24
2009-09-24vfs catia: Fix a NULL dereference when CATIA is loaded with no mappings ↵Aravind Srinivasan1-1/+8
specified. When we use the CATIA vfs module and don't have any mapping specified, we return NULL for the mapped_name, thereby resulting in segfaults. When we don't have catia mapping, we should just use the old name instead of returning NULL for the mapped_name. Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-09-24vfs catia: Fix the double translation that was happening with createfile and ↵Aravind Srinivasan3-92/+60
open. Since the catia translation is implemented for open, it should not also be done in createfile. By removing createfile from catia, translation is now done correctly for the primary open path. In order to support systems that have custom createfile implementations that don't eventually call SMB_VFS_OPEN, SMB_VFS_TRANSLATE_NAME has been expanded to take an additional argument that specifies direction. Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-09-24vfs catia: Fix a possible NULL dereferenceAravind Srinivasan1-2/+9
Also free some unfreed memory. Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-09-24s3: Forgot to check in one build failure for vfs_gpfs.cVolker Lendecke1-1/+1
2009-09-24s3: Remove an unused variableVolker Lendecke1-1/+0
2009-09-24s3: Make the vfs_gpfs compile at leastVolker Lendecke1-19/+23
Not sure whether it works in this state :-)
2009-09-18s3:smbd: Attempt to fix the build on HP/UXVolker Lendecke1-0/+1
2009-09-17To set file create/birth time in GPFS. Signed-off-by: Abhidnya Chirmule ↵Abhidnya Chirmule1-0/+42
<achirmul@in.ibm.com>