summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-12-29 20:39:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:47 -0500
commit8e6390a1604da9e34f1f6823399687bf38cd7380 (patch)
treef0de6388740a055541c96c9ae203e379e726bbb6
parent76cdf68ee9f4982f1b847023818641cf4603dfd1 (diff)
downloadsamba-8e6390a1604da9e34f1f6823399687bf38cd7380.tar.gz
samba-8e6390a1604da9e34f1f6823399687bf38cd7380.tar.bz2
samba-8e6390a1604da9e34f1f6823399687bf38cd7380.zip
r20411: Fix originally from SATOH Fumiyasu (slightly
modified). Ensure "hide unXXX" parameters don't hide MSDFS links. Bug #3319. Jeremy. (This used to be commit e5466fffc286a99fafe0fcfbf70e903e33baa7f9)
-rw-r--r--source3/smbd/dir.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index 1c77630ee7..5a6b9713e5 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -1011,6 +1011,18 @@ BOOL is_visible_file(connection_struct *conn, const char *dir_path, const char *
if (asprintf(&entry, "%s/%s", dir_path, name) == -1) {
return False;
}
+
+ /* If it's a dfs symlink, ignore _hide xxxx_ options */
+ if (lp_host_msdfs() &&
+ lp_msdfs_root(SNUM(conn)) &&
+ /* We get away with NULL talloc ctx here as
+ we're not interested in the link contents
+ so we have nothing to free. */
+ is_msdfs_link(NULL, conn, entry, NULL, NULL, NULL)) {
+ SAFE_FREE(entry);
+ return True;
+ }
+
/* Honour _hide unreadable_ option */
if (hide_unreadable && !user_can_read_file(conn, entry, pst)) {
DEBUG(10,("is_visible_file: file %s is unreadable.\n", entry ));