Do the smb1-specific code directly in smb1-code. Don't tunnel it
through generic smb1/smb2 code.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
bool get_dosmode,
uint32_t *_mode)
{
- if (*_mode & FILE_ATTRIBUTE_REPARSE_POINT) {
- /*
- * Don't show symlinks/special files to old clients
- */
- return false;
- }
-
if (get_dosmode) {
SMB_ASSERT(smb_fname != NULL);
*_mode = fdos_mode(smb_fname->fsp);
uint32_t mode = 0;
bool ok;
+again:
ok = smbd_dirptr_get_entry(ctx,
dirptr,
mask,
if (!ok) {
return false;
}
+ if (mode & FILE_ATTRIBUTE_REPARSE_POINT) {
+ /* hide reparse points from ancient clients */
+ TALLOC_FREE(fname);
+ TALLOC_FREE(smb_fname);
+ goto again;
+ }
*_fname = talloc_move(ctx, &fname);
*_size = smb_fname->st.st_ex_size;