From 5c488cfb79873287e769622fd5da43b7a735e29c Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Wed, 12 Jun 2013 14:49:53 -0700 Subject: [PATCH] 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 --- source3/modules/vfs_streams_xattr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c index de67197c71a..82e2dd8d1ef 100644 --- a/source3/modules/vfs_streams_xattr.c +++ b/source3/modules/vfs_streams_xattr.c @@ -527,6 +527,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); } -- 2.11.4.GIT