diff options
author | Ralph Boehme <slow@samba.org> | 2019-05-21 18:39:52 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-05-23 23:26:14 +0000 |
commit | bb5a457f2872a383b58d62981dade322fca9b283 (patch) | |
tree | f575e5eabb9fef7887e55d1a3b78d72acba18ee0 /source4 | |
parent | c3d28d49be3c7536d1ccfe8d00553ce72843f369 (diff) | |
download | samba-bb5a457f2872a383b58d62981dade322fca9b283.tar.gz |
s4:torture/vfs/fruit: ensure test_adouble_conversion_wo_xattr() uses a non-emtpy resourcefork
This ensures the resource fork is not deleted as part of the AppleDouble file
conversion for the option fruit:wipe_intentionally_left_blank_rfork=yes.
This is currently not a problem in selftest, as we don't enable the option, but
a subsequent commit will run all vfs.fruit tests against a share with this
option enabled.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13958
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/vfs/fruit.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c index 5126037ad91..e3d8539595d 100644 --- a/source4/torture/vfs/fruit.c +++ b/source4/torture/vfs/fruit.c @@ -902,7 +902,7 @@ static char osx_adouble_w_xattr[] = { * * -RAW DUMP--: 0 1 2 3 4 5 6 7 8 9 A B C D E F : (ASCII) * 00000000 : 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 1E : ................ - * 00000010 : 54 68 69 73 20 72 65 73 6F 75 72 63 65 20 66 6F : This resource fo + * 00000010 : F0 F1 F2 F3 F5 F5 F6 F7 F8 F9 FA FB FC FD FE FF : ................ * 00000020 : 72 6B 20 69 6E 74 65 6E 74 69 6F 6E 61 6C 6C 79 : rk intentionally * 00000030 : 20 6C 65 66 74 20 62 6C 61 6E 6B 20 20 20 00 00 : left blank .. * 00000040 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 : ................ @@ -991,9 +991,9 @@ static char osx_adouble_without_xattr[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x1e, 0x54, 0x68, 0x69, 0x73, 0x20, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, - 0x66, 0x6f, 0x72, 0x6b, 0x20, 0x69, 0x6e, 0x74, + 0x00, 0x1e, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, + 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, + 0xfe, 0xff, 0x72, 0x6b, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x6c, 0x65, 0x66, 0x74, 0x20, 0x62, 0x6c, 0x61, 0x6e, 0x6b, 0x20, 0x20, 0x20, @@ -2833,8 +2833,11 @@ static bool test_adouble_conversion_wo_xattr(struct torture_context *tctx, struct smb2_find find; unsigned int count; union smb_search_data *d; - const char *data = "This resource fork intentionally left blank"; - size_t datalen = strlen(data); + const char data[] = { + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff + }; + size_t datalen = sizeof(data); bool is_osx = torture_setting_bool(tctx, "osx", false); if (is_osx) { |