msdfs on 3.0.25b - hide unreadable on DFS links

Jan Martin Jan.Martin at rwedea.com
Fri Aug 10 10:43:37 GMT 2007


Jeremy,

that's funny.

> This patch doesn't work 
On my installation, I tested it before sending, and it was working:
- Dangling DFS link --> shown
- Valid DFS link, target readable --> shown
- Valid DFS link, target unreadable --> hidden
- link with DFS syntax wrong --> hidden, because of "can't stat"
- Non DFS entries worked as expected.

> you need to be doing a SMB_VFS_STAT of "entry" here, not "name".
Ooops, ... it was working, so I didn't look at it.
Name looked just plausible to me.
Maybe it worked because all entries with a VALID_STAT
already had one during my tests, so the code came to SMB_VFS_STAT only
for entries that would be hidden anyway.

> callers of is_visible_file don't all ensure
> that the passed in stat struct is zeroed (that's
> a bug, I'll fix it :-)
> plus this may have an effect on servers
> operating in POSIX mode, as they must do an
> LSTAT not a STAT on paths.
I believe you that both is true ... but I copied the code from
user_can_read_file(), so those three functions (user_can_read_file,
user_can_write_file and file_is_special) must have the both the same 
problems anyway. My patch didn't change anything in that
logic, I just copied it.

So as far as I see, nothing would get worse here.

> This isn't quite as simple as it looks :-).
Obviously.

Many thanks so far. What can I do now?

Jan Martin


More information about the samba-technical mailing list