diff options
author | Tim Prouty <tprouty@samba.org> | 2009-06-16 12:01:13 -0700 |
---|---|---|
committer | Tim Prouty <tprouty@samba.org> | 2009-06-17 20:11:53 -0700 |
commit | 4e3656b8d1d0bf8c0c4ade01332e7384ea890810 (patch) | |
tree | efcb240c8b0dbdd791e01dfe62a50f4cfdca47e5 /source3/modules/vfs_acl_xattr.c | |
parent | 5cfac1a1bd59712d7a771d3631e869c5d078a0f3 (diff) | |
download | samba-4e3656b8d1d0bf8c0c4ade01332e7384ea890810.tar.gz samba-4e3656b8d1d0bf8c0c4ade01332e7384ea890810.tar.bz2 samba-4e3656b8d1d0bf8c0c4ade01332e7384ea890810.zip |
s3: Change SMB_VFS_OPEN to take an smb_filename struct
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.
Diffstat (limited to 'source3/modules/vfs_acl_xattr.c')
-rw-r--r-- | source3/modules/vfs_acl_xattr.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/source3/modules/vfs_acl_xattr.c b/source3/modules/vfs_acl_xattr.c index 05156f8456..efcc87740a 100644 --- a/source3/modules/vfs_acl_xattr.c +++ b/source3/modules/vfs_acl_xattr.c @@ -417,7 +417,7 @@ static NTSTATUS inherit_new_acl(vfs_handle_struct *handle, *********************************************************************/ static int open_acl_xattr(vfs_handle_struct *handle, - const char *fname, + struct smb_filename *smb_fname, files_struct *fsp, int flags, mode_t mode) @@ -425,7 +425,17 @@ static int open_acl_xattr(vfs_handle_struct *handle, uint32_t access_granted = 0; struct security_descriptor *pdesc = NULL; bool file_existed = true; - NTSTATUS status = get_nt_acl_xattr_internal(handle, + char *fname = NULL; + NTSTATUS status; + + status = get_full_smb_filename(talloc_tos(), smb_fname, + &fname); + if (!NT_STATUS_IS_OK(status)) { + errno = map_errno_from_nt_status(status); + return -1; + } + + status = get_nt_acl_xattr_internal(handle, NULL, fname, (OWNER_SECURITY_INFORMATION | @@ -441,7 +451,7 @@ static int open_acl_xattr(vfs_handle_struct *handle, if (!NT_STATUS_IS_OK(status)) { DEBUG(10,("open_acl_xattr: file %s open " "refused with error %s\n", - fname, + smb_fname_str_dbg(smb_fname), nt_errstr(status) )); errno = map_errno_from_nt_status(status); return -1; @@ -452,10 +462,10 @@ static int open_acl_xattr(vfs_handle_struct *handle, DEBUG(10,("open_acl_xattr: get_nt_acl_attr_internal for " "file %s returned %s\n", - fname, + smb_fname_str_dbg(smb_fname), nt_errstr(status) )); - fsp->fh->fd = SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode); + fsp->fh->fd = SMB_VFS_NEXT_OPEN(handle, smb_fname, fsp, flags, mode); if (!file_existed && fsp->fh->fd != -1) { /* File was created. Inherit from parent directory. */ |