summaryrefslogtreecommitdiff
path: root/source3/modules
AgeCommit message (Collapse)AuthorFilesLines
2009-07-24Some more VFS type errorsVolker Lendecke1-2/+2
2009-07-24Fix some C++ warningsVolker Lendecke1-4/+7
2009-07-21s3: Remove unnecessary callers of get_full_smb_filenameTim Prouty1-40/+18
This often times means explicitly denying certain operations on a stream as they are not supported or don't make sense at a particular level. At some point in the future these can be enabled, but for now it's better to remove ambiguity
2009-07-20s3: Finish plumbing the fsp->fsp_name smb_fname conversion through the modules.Tim Prouty21-252/+300
2009-07-19Fix a few type errors in VFS modulesVolker Lendecke6-10/+18
2009-07-14reject ACLs with DESC_DACL_PROTECTED on GPFSChristian Ambach1-0/+5
as GPFS does not support the ACE4_FLAG_NO_PROPAGATE NFSv4 flag (which would be the mapping for the DESC_DACL_PROTECTED flag), the status of this flag is currently silently ignored by Samba. That means that if you deselect the "Allow inheritable permissions..." checkbox in Windows' ACL dialog and then apply the ACL, the flag will be back immediately. To make sure that automatic migration with e.g. robocopy does not lead to ACLs silently (and unintentionally) changed, this patch adds an explicit check for this flag and if set, it will return NT_STATUS_NOT_SUPPORTED so errors are shown up on the Windows side and the Administrator is aware of the ACLs not being settable like intended Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
2009-07-10Add hash values to the xattr ACLS to determine whenJeremy Allison1-55/+158
an underlying POSIX ACL is changed out from under us. Passes RAW-ACL test up to "invalid owner" problem when trying to create a file owned by Everyone. Now needs porting to modules/vfs_acl_tdb.c Jeremy.
2009-07-08s3: Prepare open.c to switch fsp_name to an smb_filename structTim Prouty1-12/+15
2009-07-08s3: Change the share_mode_lock struct to store a base_name and stream_nameTim Prouty1-15/+7
2009-07-08s3: Remove is_ntfs_stream_name() and split_ntfs_stream_name()Tim Prouty2-57/+12
Actually I moved split_ntfs_stream_name into torture.c which is the one consumer of it. This could probably be changed at some point.
2009-07-08s3: Plumb smb_filename through dos_mode() and related funtionsTim Prouty2-3/+12
2009-07-08s3: convert unix_mode to take an smb_filenameTim Prouty2-5/+16
2009-07-07s3 onefs: Fix a few bugs from the smb_filename migrationTim Prouty3-49/+35
2009-07-07Attempt to fix the build of vfs_catia.c -- Tim, please check!Volker Lendecke1-2/+2
2009-07-06s3: Update streaminfo implementations now that only base names are passed ↵Tim Prouty4-21/+20
through the vfs
2009-07-06s3 audit: Fix a memory leakTim Prouty1-4/+4
2009-07-06s3: Plumb smb_filename through SMB_VFS_NTIMESTim Prouty8-39/+91
2009-07-06s3 catia: Remove pointless VOPs from catiaTim Prouty1-84/+0
2009-07-06s3: Plumb smb_filename around SMB_VFS_CHFLAGSTim Prouty3-25/+0
SMB_VFS_CHFLAGS isn't actually getting the smb_filename struct for now since it only operates on the basefile. This is the strategy for all path-based operations that will never actually operate on a stream. By clarifying the meaning of path based operations that don't take an smb_filename struct, modules that implement streams such as vfs_onefs no longer need to implement SMB_VFS_CHFLAGS to ensure it's only called on the base_name.
2009-07-06s3: Plumb smb_filename through SMB_VFS_UNLINKTim Prouty16-213/+370
2009-07-06s3 audit: Remove some recently introduced memory leaks in the audit modulesTim Prouty2-12/+45
2009-07-06s3 audit: Remove the usesless static function declarations from the audit ↵Tim Prouty3-641/+308
modules
2009-07-06s3 onefs: Fix failure in POSIX smbtorture testTim Prouty1-2/+2
The return value of readlink was a bool instead of an int, which caused the length of the returned value to never be >1.
2009-07-06s3: Plumb smb_filename through SMB_VFS_RENAMETim Prouty15-202/+355
2009-07-06do not merge ACEs with different SMB_ACE4_INHERIT_ONLY_ACE flag, this leads ↵Christian Ambach1-0/+7
to wrong inheritance flags in the ACL e.g. (on GPFS) user:10000036:rwxc:allow (X)READ/LIST (X)WRITE/CREATE (X)MKDIR (X)SYNCHRONIZE (X)READ_ACL (X)READ_ATTR (X)READ_NAMED (X)DELETE (X)DELETE_CHILD (X)CHOWN (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED user:10000036:rwxc:allow:FileInherit:DirInherit:InheritOnly (X)READ/LIST (X)WRITE/CREATE (X)MKDIR (X)SYNCHRONIZE (X)READ_ACL (X)READ_ATTR (X)READ_NAMED (X)DELETE (X)DELETE_CHILD (X)CHOWN (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED group:10000005:rwxc:allow (X)READ/LIST (X)WRITE/CREATE (X)MKDIR (X)SYNCHRONIZE (X)READ_ACL (X)READ_ATTR (X)READ_NAMED (X)DELETE (X)DELETE_CHILD (X)CHOWN (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED group:10000005:rwxc:allow:FileInherit:DirInherit:InheritOnly (X)READ/LIST (X)WRITE/CREATE (X)MKDIR (X)SYNCHRONIZE (X)READ_ACL (X)READ_ATTR (X)READ_NAMED (X)DELETE (X)DELETE_CHILD (X)CHOWN (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED would be merged to user:10000036:rwxc:allow:FileInherit:DirInherit:InheritOnly (X)READ/LIST (X)WRITE/CREATE (X)MKDIR (X)SYNCHRONIZE (X)READ_ACL (X)READ_ATTR (X)READ_NAMED (X)DELETE (X)DELETE_CHILD (X)CHOWN (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED group:10000005:rwxc:allow:FileInherit:DirInherit:InheritOnly (X)READ/LIST (X)WRITE/CREATE (X)MKDIR (X)SYNCHRONIZE (X)READ_ACL (X)READ_ATTR (X)READ_NAMED (X)DELETE (X)DELETE_CHILD (X)CHOWN (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED so the explicit right for the user on the parent directory will be gone (the InheritOnly flag only accounts to subdirectories) thus leaving the user without access to the directory itself Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
2009-07-01s3:onefs_open: remove unused variable passed to parent_dirname()Stefan Metzmacher1-2/+1
metze
2009-06-25s3 onefs: Plumb smb_filename through onefs createfile pathTim Prouty4-221/+322
2009-06-25Add a \n to a debug message in smbacl4_nfs42winVolker Lendecke1-1/+1
2009-06-24s3: Plumb smb_filename through SMB_VFS_STAT and SMB_VFS_LSTATTim Prouty17-255/+524
This patch introduces two new temporary helper functions vfs_stat_smb_fname and vfs_lstat_smb_fname. They basically allowed me to call the new smb_filename version of stat, while avoiding plumbing it through callers that are still too inconvenient. As the conversion moves along, I will be able to remove callers of this, with the goal being to remove all callers. There was also a bug in create_synthetic_smb_fname_split (also a temporary utility function) that caused it to incorrectly handle filenames with ':'s in them when in posix mode. This is now fixed.
2009-06-17s3 onefs: Remove dfs resolution from create_file() now that it's being done ↵Tim Prouty1-22/+1
at a higher level
2009-06-17s3: Change SMB_VFS_OPEN to take an smb_filename structTim Prouty17-117/+352
This was a little messy because of all of the vfs modules I had to touch. Most of them were pretty straight forward, but the streams modules required a little attention to handle smb_filename. Since the use of smb_filename enables the vfs modules to access the raw, over-the-wire stream, a little bit of the handling that was being done by split_ntfs_stream_name has now been shifted into the individual stream modules. It may be a little more code, but overall it gives more flexibility to the streams modules, while also allowing correct stream handling.
2009-06-17s3: Plumb smb_filename from create_file all of the way down to fd_openTim Prouty1-7/+2
I used the smb_filename struct everywhere that was feasible for the first pass. There are still some places in this path that need to be changed to use smb_filename, but this is a good start. I also: - Removed fname/path arguments from a few functions that weren't really using them. - Added a utility function for detecting whether an smb_filename is a stream.
2009-06-15s3 onefs: Fix reading over the end of the array, because the incorrect array ↵Tim Prouty1-2/+3
was being read.
2009-06-15s3 onefs: Change onefs modules to use the new createfile apiTim Prouty3-43/+46
2009-06-12s3: Plumb smb_filename through SMB_VFS_CREATE_FILETim Prouty2-21/+13
2009-06-10s3: Remove unix_convert handling from createfile implementationsTim Prouty1-30/+4
2009-06-02Support getting gpfs birthtimeVolker Lendecke3-0/+82
2009-06-02Store winattrs in GPFSMathias Dietz3-0/+142
1. Store win attributes in gpfs instead of posix bits. 2. use of path based winattr calls of gpfs. Signed-off-by: Mathias Dietz <mdietz@de.ibm.com>
2009-06-02Add a "connectpath" operation to the shadow_copy2 moduleVolker Lendecke1-0/+54
2009-06-02Add SMB_VFS_CONNECTPATH operationVolker Lendecke2-0/+26
This is required for the shadow_copy2 module and "wide links = no". The file system snapshots by nature are typically outside of share directory. So the REALPATH result fails the wide links = no test.
2009-05-28s3 onefs: update the onefs module to be compliant with stat_exTim Prouty8-77/+192
2009-05-27Fix the build of nfs4_acls.cVolker Lendecke1-1/+2
2009-05-27Fix a size_t/int warningVolker Lendecke1-1/+1
2009-05-26Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STATVolker Lendecke16-99/+103
This patch introduces struct stat_ex { dev_t st_ex_dev; ino_t st_ex_ino; mode_t st_ex_mode; nlink_t st_ex_nlink; uid_t st_ex_uid; gid_t st_ex_gid; dev_t st_ex_rdev; off_t st_ex_size; struct timespec st_ex_atime; struct timespec st_ex_mtime; struct timespec st_ex_ctime; struct timespec st_ex_btime; /* birthtime */ blksize_t st_ex_blksize; blkcnt_t st_ex_blocks; }; typedef struct stat_ex SMB_STRUCT_STAT; It is really large because due to the friendly libc headers playing macro tricks with fields like st_ino, so I renamed them to st_ex_xxx. Why this change? To support birthtime, we already have quite a few #ifdef's at places where it does not really belong. With a stat struct that we control, we can consolidate the nanosecond timestamps and the birthtime deep in the VFS stat calls. At this moment it is triggered by a request to support the birthtime field for GPFS. GPFS does not extend the system level struct stat, but instead has a separate call that gets us the additional information beyond posix. Without being able to do that within the VFS stat calls, that support would have to be scattered around the main smbd code. It will very likely break all the onefs modules, but I think the changes will be reasonably easy to do.
2009-05-21s3 onefs: Fix invalid argument from the unix_convert smb_filename struct patchTim Prouty1-1/+1
2009-05-20s3: Change unix_convert (and its callers) to use struct smb_filenameTim Prouty1-2/+13
This is the first of a series of patches that change path based operations to operate on a struct smb_filename instead of a char *. This same concept already exists in source4. My goals for this series of patches are to eventually: 1) Solve the stream vs. posix filename that contains a colon ambiguity that currently exists. 2) Make unix_convert the only function that parses the stream name. 3) Clean up the unix_convert API. 4) Change all path based vfs operation to take a struct smb_filename. 5) Make is_ntfs_stream_name() a constant operation that can simply check the state of struct smb_filename rather than re-parse the filename. 6) Eliminate the need for split_ntfs_stream_name() to exist. My strategy is to start from the inside at unix_convert() and work my way out through the vfs layer, call by call. This first patch does just that, by changing unix_convert and all of its callers to operate on struct smb_filename. Since this is such a large change, I plan on pushing the patches in phases, where each phase keeps full compatibility and passes make test. The API of unix_convert has been simplified from: NTSTATUS unix_convert(TALLOC_CTX *ctx, connection_struct *conn, const char *orig_path, bool allow_wcard_last_component, char **pp_conv_path, char **pp_saved_last_component, SMB_STRUCT_STAT *pst) to: NTSTATUS unix_convert(TALLOC_CTX *ctx, connection_struct *conn, const char *orig_path, struct smb_filename *smb_fname, uint32_t ucf_flags) Currently the smb_filename struct looks like: struct smb_filename { char *base_name; char *stream_name; char *original_lcomp; SMB_STRUCT_STAT st; }; One key point here is the decision to break up the base_name and stream_name. I have introduced a helper function called get_full_smb_filename() that takes an smb_filename struct and allocates the full_name. I changed the callers of unix_convert() to subsequently call get_full_smb_filename() for the time being, but I plan to eventually eliminate get_full_smb_filename().
2009-05-20Use SMB_VFS_NEXT_CLOSE. This VFS stuff is really opaque to me...Volker Lendecke1-5/+1
Thanks Michael to provide some transparency :-)
2009-05-20Fix bug disclosed by lock8 torture testVolker Lendecke1-0/+17
We have to drop the gpfs level share modes, regardless of whether we put the file into the pending close queue.
2009-05-19s3 onefs: Removing an incorrect TALLOC_FREEAravind Srinivasan1-1/+0
Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-05-18Move down the become_root()/unbecome_root() calls into the VFS modulesVolker Lendecke1-2/+22
The aio_fork module does not need this, as it does not communicate via signals but with pipes. Watching a strace log with those become_root() calls in aio.c is absolutely awful, and it does affect performance.