]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_error_inject: ignore path_ref_fd's
authorRalph Boehme <slow@samba.org>
Mon, 15 Jun 2020 09:33:39 +0000 (11:33 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 16 Dec 2020 09:08:30 +0000 (09:08 +0000)
This avoids failing opens triggered by filename_convert() ->
openat_pathref_fsp().

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_error_inject.c

index b0fbb652d65aa58f812e3dea1ab1f753c89713bb..2230b8a29910bcfa0f938680383739bef862911b 100644 (file)
@@ -115,7 +115,8 @@ static int vfs_error_inject_openat(struct vfs_handle_struct *handle,
                                   mode_t mode)
 {
        int error = inject_unix_error("openat", handle);
-       if (error != 0) {
+
+       if (!fsp->fsp_flags.is_pathref && error != 0) {
                errno = error;
                return -1;
        }