From 19c5af5b9b7a0e20018a4dbf082eee3e2f8f41ff Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Wed, 12 Jun 2013 14:49:53 -0700 Subject: [PATCH 1/2] Initialize the file descriptor in the files_struct before trying to close it. Otherwise, if one of the SETXATTR calls had failed, the close() call will return EBADF. Signed-off-by: Christof Schmitt Reviewed-by: Jeremy Allison Reviewed-by: Richard Sharpe Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Thu Jun 13 01:43:18 CEST 2013 on sn-devel-104 (cherry picked from commit 5c488cfb79873287e769622fd5da43b7a735e29c) --- source3/modules/vfs_streams_xattr.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c index dd1135d..748af4f 100644 --- a/source3/modules/vfs_streams_xattr.c +++ b/source3/modules/vfs_streams_xattr.c @@ -532,6 +532,7 @@ static int streams_xattr_open(vfs_handle_struct *handle, * BUGBUGBUG -- we would need to call fd_close_posix here, but * we don't have a full fsp yet */ + fsp->fh->fd = hostfd; SMB_VFS_CLOSE(fsp); } -- 1.7.1