svn commit: samba r20672 - in branches/SAMBA_3_0_24/source/smbd: .
jra at samba.org
jra at samba.org
Thu Jan 11 00:35:08 GMT 2007
Author: jra
Date: 2007-01-11 00:35:06 +0000 (Thu, 11 Jan 2007)
New Revision: 20672
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20672
Log:
Start working on the wildcard cases - put back this
exception case.
Jeremy.
Modified:
branches/SAMBA_3_0_24/source/smbd/filename.c
Changeset:
Modified: branches/SAMBA_3_0_24/source/smbd/filename.c
===================================================================
--- branches/SAMBA_3_0_24/source/smbd/filename.c 2007-01-11 00:10:09 UTC (rev 20671)
+++ branches/SAMBA_3_0_24/source/smbd/filename.c 2007-01-11 00:35:06 UTC (rev 20672)
@@ -260,6 +260,25 @@
if (ISDOT(start)) {
if (end) {
+ if (allow_wcard_last_component) {
+ /* We're terminating here so we
+ * can be a little slower and get
+ * the error code right. Windows
+ * treats the last part of the pathname
+ * separately I think, so if the last
+ * component is a wildcard then we treat
+ * this ./ as "end of component" */
+
+ const char *p = strchr(end+1, '/');
+
+ if (!p && ms_has_wild(end+1)) {
+ /* Error code at the end of a pathname. */
+ return NT_STATUS_OBJECT_NAME_INVALID;
+ } else {
+ /* Error code within a pathname. */
+ return NT_STATUS_OBJECT_PATH_NOT_FOUND;
+ }
+ }
/* Error code within a pathname. */
return NT_STATUS_OBJECT_PATH_NOT_FOUND;
} else {
More information about the samba-cvs
mailing list