svn commit: samba r20411 - in branches: SAMBA_3_0/source/smbd
SAMBA_3_0_24/source/smbd
jra at samba.org
jra at samba.org
Fri Dec 29 20:39:54 GMT 2006
Author: jra
Date: 2006-12-29 20:39:53 +0000 (Fri, 29 Dec 2006)
New Revision: 20411
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20411
Log:
Fix originally from SATOH Fumiyasu (slightly
modified). Ensure "hide unXXX" parameters don't
hide MSDFS links. Bug #3319.
Jeremy.
Modified:
branches/SAMBA_3_0/source/smbd/dir.c
branches/SAMBA_3_0_24/source/smbd/dir.c
Changeset:
Modified: branches/SAMBA_3_0/source/smbd/dir.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/dir.c 2006-12-29 12:36:41 UTC (rev 20410)
+++ branches/SAMBA_3_0/source/smbd/dir.c 2006-12-29 20:39:53 UTC (rev 20411)
@@ -1011,6 +1011,18 @@
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 ));
Modified: branches/SAMBA_3_0_24/source/smbd/dir.c
===================================================================
--- branches/SAMBA_3_0_24/source/smbd/dir.c 2006-12-29 12:36:41 UTC (rev 20410)
+++ branches/SAMBA_3_0_24/source/smbd/dir.c 2006-12-29 20:39:53 UTC (rev 20411)
@@ -1011,6 +1011,18 @@
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 ));
More information about the samba-cvs
mailing list