The Samba-Bugzilla – Attachment 18215 Details for
Bug 15544
shadow_copy2 broken when current fileset's directories are removed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 4.18
bug-15544-4.18.txt (text/plain), 3.84 KB, created by
Volker Lendecke
on 2024-01-03 14:11:31 UTC
(
hide
)
Description:
Patch for 4.18
Filename:
MIME Type:
Creator:
Volker Lendecke
Created:
2024-01-03 14:11:31 UTC
Size:
3.84 KB
patch
obsolete
>From 0e840c6b84031bfcd8820c7b28a9ff5abc593bf4 Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Thu, 28 Dec 2023 14:20:11 +0100 >Subject: [PATCH 1/2] shadow_copy: Add test for missing directory in "current" > fileset > >Right now we can't traverse a subdirectory in a snapshot which was >deleted in the current set of files. > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=15544 > >Signed-off-by: Volker Lendecke <vl@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit a0bfadb32b83ab1e58290f84c298d345e21866d9) >--- > selftest/knownfail.d/shadow_copy2 | 1 + > source3/script/tests/test_shadow_copy.sh | 27 ++++++++++++++++++++++++ > 2 files changed, 28 insertions(+) > create mode 100644 selftest/knownfail.d/shadow_copy2 > >diff --git a/selftest/knownfail.d/shadow_copy2 b/selftest/knownfail.d/shadow_copy2 >new file mode 100644 >index 00000000000..cb53e558fd8 >--- /dev/null >+++ b/selftest/knownfail.d/shadow_copy2 >@@ -0,0 +1 @@ >+^samba3.blackbox.shadow_copy2.*.fetch\ a\ file\ without\ a\ latest\ version.* >\ No newline at end of file >diff --git a/source3/script/tests/test_shadow_copy.sh b/source3/script/tests/test_shadow_copy.sh >index fe4bcb8720e..45f4b6b7226 100755 >--- a/source3/script/tests/test_shadow_copy.sh >+++ b/source3/script/tests/test_shadow_copy.sh >@@ -389,6 +389,32 @@ test_shadow_copy_format() > failed=`expr $failed + 1` > } > >+# Test fetching a file where there's no current version of it >+test_missing_basedir() >+{ >+ local share >+ local where >+ local prefix >+ local snapidx >+ >+ share=$1 >+ where=$2 >+ prefix=$3 >+ snapidx=$4 >+ >+ #delete snapshots from previous tests >+ find $WORKDIR -name ".snapshots" -exec rm -rf {} \; 1>/dev/null 2>&1 >+ build_snapshots $WORKDIR/$where "$prefix" "$snapidx" "$snapidx" >+ >+ (cd "$WORKDIR/$where"/share; mv bar _bar) >+ >+ testit "fetch a file without a latest version" \ >+ test_fetch_snap_file "$share" "bar/baz" "$snapidx" || \ >+ failed=`expr $failed + 1` >+ >+ (cd "$WORKDIR/$where"/share; mv _bar bar) >+} >+ > #build "latest" files > build_files $WORKDIR/mount base/share "latest" "latest" > >@@ -423,5 +449,6 @@ test_shadow_copy_format shadow_fmt2 mount/base share 2 "shadow:format with some > test_shadow_copy_format shadow_fmt3 mount/base share 2 "shadow:format with modified format" > test_shadow_copy_format shadow_fmt4 mount/base share 3 "shadow:format with snapprefix" > test_shadow_copy_format shadow_fmt5 mount/base share 6 "shadow:format with delimiter" >+test_missing_basedir shadow3 "mount/base" "share" 6 > > exit $failed >-- >2.34.1 > > >From f898091d8a8cfd49d17bf995b9b7506778579cf1 Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Thu, 28 Dec 2023 14:38:37 +0100 >Subject: [PATCH 2/2] smbd: Fix traversing snapshot dirs that vanished in > current fileset > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=15544 > >Signed-off-by: Volker Lendecke <vl@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> > >Autobuild-User(master): Jeremy Allison <jra@samba.org> >Autobuild-Date(master): Tue Jan 2 20:37:01 UTC 2024 on atb-devel-224 >--- > selftest/knownfail.d/shadow_copy2 | 1 - > source3/smbd/filename.c | 2 +- > 2 files changed, 1 insertion(+), 2 deletions(-) > delete mode 100644 selftest/knownfail.d/shadow_copy2 > >diff --git a/selftest/knownfail.d/shadow_copy2 b/selftest/knownfail.d/shadow_copy2 >deleted file mode 100644 >index cb53e558fd8..00000000000 >--- a/selftest/knownfail.d/shadow_copy2 >+++ /dev/null >@@ -1 +0,0 @@ >-^samba3.blackbox.shadow_copy2.*.fetch\ a\ file\ without\ a\ latest\ version.* >\ No newline at end of file >diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c >index 77f5e3dee4e..dd0239777e8 100644 >--- a/source3/smbd/filename.c >+++ b/source3/smbd/filename.c >@@ -1145,7 +1145,7 @@ static NTSTATUS filename_convert_dirfsp_nosymlink( > mem_ctx, > conn, > dirname, >- 0, >+ twrp, > posix, > &smb_dirname, > &unparsed, >-- >2.34.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
slow
:
review+
Actions:
View
Attachments on
bug 15544
: 18215 |
18216