1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s3: selftest: Add share definition [bad_iconv] in fileserver.

Creates a utf8 valid filename within that is invalid in CP850.
Useful to test smbclient list directory character set conversions.

https://bugzilla.samba.org/show_bug.cgi?id=14374

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Jeremy Allison 2020-05-11 14:10:54 -07:00
parent 0f01b10679
commit a9651d6bc2

View File

@ -1287,6 +1287,9 @@ sub setup_fileserver
my $dropbox_sharedir="$share_dir/dropbox";
push(@dirs,$dropbox_sharedir);
my $bad_iconv_sharedir="$share_dir/bad_iconv";
push(@dirs, $bad_iconv_sharedir);
my $ip4 = Samba::get_ipv4_addr("FILESERVER");
my $fileserver_options = "
kernel change notify = yes
@ -1382,6 +1385,11 @@ sub setup_fileserver
writeable = yes
vfs objects =
[bad_iconv]
path = $bad_iconv_sharedir
comment = smb username is [%U]
vfs objects =
[homes]
comment = Home directories
browseable = No
@ -1454,6 +1462,11 @@ sub setup_fileserver
##
create_file_chmod("$valid_users_sharedir/foo", 0644) or return undef;
##
## create a valid utf8 filename which is invalid as a CP850 conversion
##
create_file_chmod("$bad_iconv_sharedir/\xED\x9F\xBF", 0644) or return undef;
return $vars;
}