Checking with "lsof" on the smbd process I noticed that every time I retrieve an ACL (vfs_zfsacl) it seems to leak a file descriptor for each access. Test: smbclient -k //filur00/peter86 dir dir dir showacls dir dir dir Checking with lsof -p on the smbd process associated the first three "dir" just opens the cwd directory and things look OK. But after enabling "showacls" it leaks 22 files per "dir" (there are 22 visible files/dirs in that directory). I've had a quick look at the source3/modules/vfs_zfsacl.c code but I can't really find why/where it leaks the file descriptors which is kind of annoying... Tested on FreeBSD 12.4 and 13.2 (13.2 with other patches needed to get it to work).
Hmm... I can't seem to reproduce it from Windows. Could it be a bug in smbclient perhaps? Will investigate a bit more...
Created attachment 17965 [details] Patch to fix fd leak with smbclient + showacls The enclosed patch seems to solve it (was a missing cli_close() call)
Looks like Volker was quicker then you to fix this one. :) 5c52f71c0d0e162dcbf42378357313035efa860f *** This bug has been marked as a duplicate of bug 15391 ***