summaryrefslogtreecommitdiffstats
path: root/source3/modules/vfs_streams_xattr.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2014-02-07 10:19:26 -0800
committerJeremy Allison <jra@samba.org>2014-02-08 00:01:16 +0100
commit17adbbcad7e401dd544dfa76f7ec9aeb6a847381 (patch)
treebff8cf3f30fa3d90735c9c586df6b4aedbd6980a /source3/modules/vfs_streams_xattr.c
parent9088bde059e93a84745ec2158e2e640b5bb13844 (diff)
downloadsamba-17adbbcad7e401dd544dfa76f7ec9aeb6a847381.tar.gz
samba-17adbbcad7e401dd544dfa76f7ec9aeb6a847381.tar.xz
samba-17adbbcad7e401dd544dfa76f7ec9aeb6a847381.zip
s3: modules: streaminfo: As we have no VFS function SMB_VFS_LLISTXATTR we can't cope with a symlink when lp_posix_pathnames() is true.
Fix bug : Bug 10429 - samba returns STATUS_OBJECT_NAME_NOT_FOUND when attempting to remove dangling symlink https://bugzilla.samba.org/show_bug.cgi?id=10429 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Jeff Layton <jlayton@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Feb 8 00:01:16 CET 2014 on sn-devel-104
Diffstat (limited to 'source3/modules/vfs_streams_xattr.c')
-rw-r--r--source3/modules/vfs_streams_xattr.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c
index 355c47c07f..5e9bd3e864 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -793,8 +793,19 @@ static NTSTATUS streams_xattr_streaminfo(vfs_handle_struct *handle,
state.handle = handle;
state.status = NT_STATUS_OK;
- status = walk_xattr_streams(handle->conn, fsp, fname,
+ if (S_ISLNK(sbuf.st_ex_mode)) {
+ /*
+ * Currently we do't have SMB_VFS_LLISTXATTR
+ * inside the VFS which means there's no way
+ * to cope with a symlink when lp_posix_pathnames().
+ * returns true. For now ignore links.
+ * FIXME - by adding SMB_VFS_LLISTXATTR. JRA.
+ */
+ status = NT_STATUS_OK;
+ } else {
+ status = walk_xattr_streams(handle->conn, fsp, fname,
collect_one_stream, &state);
+ }
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(state.streams);