svn commit: samba r10360 - in trunk/source/smbd: .
jra at samba.org
jra at samba.org
Tue Sep 20 20:21:00 GMT 2005
Author: jra
Date: 2005-09-20 20:20:59 +0000 (Tue, 20 Sep 2005)
New Revision: 10360
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10360
Log:
Ensure that smb.conf requests for hidden files are honored, even
when DOS attributes are stored in EA's.
Jeremy.
Modified:
trunk/source/smbd/dosmode.c
Changeset:
Modified: trunk/source/smbd/dosmode.c
===================================================================
--- trunk/source/smbd/dosmode.c 2005-09-20 20:20:51 UTC (rev 10359)
+++ trunk/source/smbd/dosmode.c 2005-09-20 20:20:59 UTC (rev 10360)
@@ -297,27 +297,28 @@
return 0;
}
- /* Get the DOS attributes from an EA by preference. */
- if (get_ea_dos_attribute(conn, path, sbuf, &result)) {
- result |= set_sparse_flag(sbuf);
- return result;
- }
-
- result = dos_mode_from_sbuf(conn, path, sbuf);
-
- /* Now do any modifications that depend on the path name. */
+ /* First do any modifications that depend on the path name. */
/* hide files with a name starting with a . */
if (lp_hide_dot_files(SNUM(conn))) {
const char *p = strrchr_m(path,'/');
- if (p)
+ if (p) {
p++;
- else
+ } else {
p = path;
+ }
- if (p[0] == '.' && p[1] != '.' && p[1] != 0)
+ if (p[0] == '.' && p[1] != '.' && p[1] != 0) {
result |= aHIDDEN;
+ }
}
+ /* Get the DOS attributes from an EA by preference. */
+ if (get_ea_dos_attribute(conn, path, sbuf, &result)) {
+ result |= set_sparse_flag(sbuf);
+ } else {
+ result |= dos_mode_from_sbuf(conn, path, sbuf);
+ }
+
/* Optimization : Only call is_hidden_path if it's not already
hidden. */
if (!(result & aHIDDEN) && IS_HIDDEN_PATH(conn,path)) {
More information about the samba-cvs
mailing list