From 3cb9f8f5ff29c14e117b57896c4540cc66510a1a Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Tue, 2 Nov 2021 05:34:59 +0100 Subject: [PATCH] vfs_fruit: remove a fsp check from ad_fset() This comes from times before we had pathref fsps. Back then if you wanted to check if fsp->fh->fd contained a valid value != -1, you'd also first check that the passed in fsp and fsp->fh are non NULL. With pathref fsps we don't need this anymore. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14890 RN: Crash in vfs_fruit asking for fsp_get_io_fd() for an XATTR call Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- source3/lib/adouble.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/source3/lib/adouble.c b/source3/lib/adouble.c index fd435b6592d..f809a445081 100644 --- a/source3/lib/adouble.c +++ b/source3/lib/adouble.c @@ -2591,13 +2591,6 @@ int ad_fset(struct vfs_handle_struct *handle, DBG_DEBUG("Path [%s]\n", fsp_str_dbg(fsp)); - if ((fsp == NULL) - || (fsp->fh == NULL) - || (fsp_get_io_fd(fsp) == -1)) - { - smb_panic("bad fsp"); - } - ok = ad_pack(handle, ad, fsp); if (!ok) { return -1; -- 2.47.2