]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_fruit: remove a fsp check from ad_fset()
authorRalph Boehme <slow@samba.org>
Tue, 2 Nov 2021 04:34:59 +0000 (05:34 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 3 Nov 2021 16:45:32 +0000 (16:45 +0000)
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 <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/adouble.c

index fd435b6592d7351ab5a4e3f5ef32ffd8559d4445..f809a445081d365ce3454d598476adc860a6387d 100644 (file)
@@ -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;