symlink failure when listing a dircetory in samba 3.0.25
Jeremy Allison
jra at samba.org
Fri May 11 16:59:45 GMT 2007
On Fri, May 11, 2007 at 10:40:08AM -0500, Gerald (Jerry) Carter wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Jeremy,
>
> Is this a change in behavior ?
>
> * create a symlink in a share to a directory that
> has permissions that would deny a given user to
> stat the link target
>
> * smbd removes the link from the list of files
> in the output to smbclient and Windows 2003
>
> get_lanman2_dir_entry: SMB_FIND_FILE_BOTH_DIRECTORY_INFO
> get_lanman2_dir_entry:readdir on dirptr 0x8558a30 now at offset
> -2147483648
> dos_mode: ./..
> dos_mode_from_sbuf returning d
> dos_mode returning d
> get_lanman2_dir_entry found ./.. fname=..
> get_lanman2_dir_entry: SMB_FIND_FILE_BOTH_DIRECTORY_INFO
> get_lanman2_dir_entry:readdir on dirptr 0x8558a30 now at offset 56
> get_lanman2_dir_entry:Couldn't stat [./lwi-builds] (Permission denied)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> get_lanman2_dir_entry:readdir on dirptr 0x8558a30 now at offset 72
> dos_mode: ./winadmin
> dos_mode_from_sbuf returning d
> dos_mode returning d
> get_lanman2_dir_entry found ./winadmin fname=winadmin
> get_lanman2_dir_entry: SMB_FIND_FILE_BOTH_DIRECTORY_INFO
> get_lanman2_dir_entry:readdir on dirptr 0x8558a30 now at offset 4096
>
> It seems to be that we should display the link anyways.
> Hide unreadable is not set.
Actually this isn't a change in behavior I think.
What should we display if we can't stat a symlink target ?
Is is a link to a directory ? Is it a link to a file ?
We don't know and can't guess - whatever we guess it'll be
wrong. I think we just have to filter it.
Jeremy.
More information about the samba-technical
mailing list