[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-598-g286d6a4

Jeremy Allison jra at samba.org
Mon Mar 30 22:09:19 GMT 2009


The branch, v3-4-test has been updated
       via  286d6a404cca02a0d3662f6aa2ddd69d3dcbc17a (commit)
      from  2d12e14ad277d28b7b8181525b16992f4cad1370 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test


- Log -----------------------------------------------------------------
commit 286d6a404cca02a0d3662f6aa2ddd69d3dcbc17a
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Mar 30 15:05:39 2009 -0700

    Ensure files starting with multiple dots are hidden
    if "hide dot files" is set. Thanks to Barry Kelly <bkelly.ie at gmail.com>
    for pointing this one out.
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/dosmode.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index 555718b..5ae7151 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -325,8 +325,10 @@ uint32 dos_mode_msdfs(connection_struct *conn, const char *path,SMB_STRUCT_STAT
 		} else {
 			p = path;
 		}
-		
-		if (p[0] == '.' && p[1] != '.' && p[1] != 0) {
+
+		/* Only . and .. are not hidden. */
+		if (p[0] == '.' && !((p[1] == '\0') ||
+				(p[1] == '.' && p[2] == '\0'))) {
 			result |= aHIDDEN;
 		}
 	}
@@ -484,8 +486,10 @@ uint32 dos_mode(connection_struct *conn, const char *path,SMB_STRUCT_STAT *sbuf)
 		} else {
 			p = path;
 		}
-		
-		if (p[0] == '.' && p[1] != '.' && p[1] != 0) {
+
+		/* Only . and .. are not hidden. */
+		if (p[0] == '.' && !((p[1] == '\0') ||
+				(p[1] == '.' && p[2] == '\0'))) {
 			result |= aHIDDEN;
 		}
 	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list