Created attachment 9316 [details]
Patch solving problem
At source3/client/client.c file calls to cli_ntcreate are not followed by cli_close and some commands leave opened files.
smbclient '\\srv\resource' -c 'showacls; recurse; ls'
after listing 65k files issues erors like
display_finfo() Failed to open \filename: NT_STATUS_TOO_MANY_OPENED_FILES
Also I've added showaclscwd command to display changing current working directory while recursing with showacls on.