Fwd: Re: "hide unreadable" only hides files (not directories)
wmoran at potentialtech.com
Thu Jan 31 15:47:06 GMT 2002
On Wednesday 30 January 2002 17:32, Simo Sorce wrote:
> windows Nt 2k XP started using also RPCs to retrieve directory
> information, probably I have to look at these too and make them obey the
> hide unreadable files.
This isn't consistent with what I observed.
On both Windows 95, and on Window 2K, unreadable files were successfully
hidden, but unreadable/unscannable directories were not. The directory was
displayed, but attempting to double-click results in "Access Denied".
I was able make it work by removing the line in dir.c:
ret = user_can_read_file(conn, entry);
And replacing it with:
ret = access(entry, R_OK);
(the if/then statement below needed changed to check for a value of -1)
This results in hide unreadable hiding both directories and files on both
W2K and W95.
> On Wed, Jan 30, 2002 at 11:30:21AM -0500, Bill Moran wrote:
> > Using Samba 2.2.2_2 (from FreeBSD port) on FreeBSD 4.4 & 4.3
> > The hide unreadable feature only hides unreadable files, not directories.
> > Is this intended behaviour or is it only evident on FreeBSD (Linux?
> > Others?)
> > I hacked dir.c and replaced user_can_read_file() with a call to access(1)
> > but I doubt this is a proper fix in the grand scheme of things. For now,
> > however, it make things work right.
> > Any thoughts?
Potential Technology technical services
More information about the samba-technical