[SCM] Samba Shared Repository - branch master updated -
release-4-0-0alpha7-779-g9be2e2f
Jeremy Allison
jra at samba.org
Mon Mar 30 22:08:05 GMT 2009
The branch, master has been updated
via 9be2e2fdce9f0823f428afd492c066eb5e097f59 (commit)
from 5b33918947914f6d6805e6ac43436cac58388a59 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 9be2e2fdce9f0823f428afd492c066eb5e097f59
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