Actions
Bug #15890
openThe parent directory of the top-level of an SMB share served by Illumos kernel appears as a plain file to clients.
Status:
New
Priority:
Normal
Assignee:
-
Category:
cifs - CIFS server and client
Start date:
Due date:
% Done:
0%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:
Description
The parent directory ".." of the top-level of an SMB share served by Illumos kernel appears as a plain file to clients.
This prevents Windows clients from copying the user profile at login, if the profile directory is the top-level of an SMB share served by an Illumos kernel.
This issue can be observed by:
# zfs create rpool/smbtest # zfs set sharesmb=on rpool/smbtest # share -F smb c$@smb /var/smb/cvol "" "" rpool_smbtest@ /rpool/smbtest "" "" # smbadm list | head -1 [*] [MATH602] # smbclient -U MATH602\\nakano '\\localhost\rpool_smbtest' Password for [MATH602\nakano]: Try "help" to get a list of possible commands. smb: \> ls . DA 0 Fri Sep 8 15:06:30 2023 .. 0 Thu Jan 1 09:00:00 1970 2605433 blocks of size 131072. 2605432 blocks available smb: \> exit
The test environment is as follows:
# uname -rvimp 5.11 illumos-96d99ca952 i86pc i386 i86pc # pkg verify service/file-system/smb # pkg info service/file-system/smb Name: service/file-system/smb Summary: SMB Server Description: SMB Server libraries and commands Category: System/File System State: Installed Publisher: openindiana.org Version: 0.5.11 Branch: 2023.0.0.21799 Packaging Date: Wed Sep 6 01:10:13 2023 Last Install Time: Sun Oct 31 19:39:21 2021 Last Update Time: Wed Sep 6 06:12:37 2023 Size: 3.36 MB FMRI: pkg://openindiana.org/service/file-system/smb@0.5.11-2023.0.0.21799:20230906T011013Z # zfs get version rpool NAME PROPERTY VALUE SOURCE rpool version 5 # zpool get version rpool NAME PROPERTY VALUE SOURCE rpool version 28 local # sharectl get smb system_comment= max_workers=1024 netbios_enable=false netbios_scope= lmauth_level=4 keep_alive=0 wins_server_1= wins_server_2= wins_exclude= signing_enabled=true signing_required=true restrict_anonymous=false pdc= ads_site= ddns_enable=false autohome_map=/etc ipv6_enable=false print_enable=false traverse_mounts=true map= unmap= disposition= min_protocol= max_protocol= encrypt=disabled encrypt_ciphers= bypass_traverse_checking=true oplock_enable=true short_names=true
Perhaps, a patch like the following would be needed to usr/src/uts/common/fs/smbsrv/smb_vops.c.
diff -c usr/src/uts/common/fs/smbsrv/smb_vops.c.ORG usr/src/uts/common/fs/smbsrv/smb_vops.c *** usr/src/uts/common/fs/smbsrv/smb_vops.c.ORG Mon Sep 4 16:55:54 2023 --- usr/src/uts/common/fs/smbsrv/smb_vops.c Fri Sep 8 15:51:15 2023 *************** *** 686,691 **** --- 686,696 ---- if (rootvp && (dvp == rootvp)) { VN_HOLD(dvp); *vpp = dvp; + if (attr != NULL) { + attr->sa_mask = SMB_AT_ALL; + (void) smb_vop_getattr(*vpp, NULL, attr, 0, + zone_kcred()); + } return (0); }
No data to display
Actions