The Samba-Bugzilla – Attachment 2356 Details for
Bug 4486
[PATCH] Fixed exclude_dir in the recycle vfs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch file
vfs_recycle.c.diff (text/plain), 1.78 KB, created by
Gerald (Jerry) Carter (dead mail address)
on 2007-04-04 08:40:06 UTC
(
hide
)
Description:
patch file
Filename:
MIME Type:
Creator:
Gerald (Jerry) Carter (dead mail address)
Created:
2007-04-04 08:40:06 UTC
Size:
1.78 KB
patch
obsolete
>Index: vfs_recycle.c >=================================================================== >--- vfs_recycle.c (revision 22072) >+++ vfs_recycle.c (working copy) >@@ -311,6 +311,33 @@ > } > > /** >+ * Check if needle is contained in haystack starting at first positon >+ * @param haystack list of parameters separated by delimimiter character >+ * @param needle string to be matched exactly to haystack >+ * @return True if found >+ **/ >+static BOOL checkdirparam(const char **haystack_list, const char *needle) >+{ >+ int i; >+ >+ if (haystack_list == NULL || haystack_list[0] == NULL || >+ *haystack_list[0] == '\0' || needle == NULL || *needle == '\0') { >+ return False; >+ } >+ >+ for(i=0; haystack_list[i] ; i++) { >+ char *phaystack; >+ >+ phaystack = haystack_list[i] + strlen(haystack_list[i]) - 1; >+ if (phaystack[0] != '/') return False; >+ if (strncmp(haystack_list[i], needle, strlen(haystack_list[i])) == 0) >+ return True; >+ } >+ >+ return False; >+} >+ >+/** > * Check if needle is contained exactly in haystack > * @param haystack list of parameters separated by delimimiter character > * @param needle string to be matched exactly to haystack >@@ -488,8 +515,12 @@ > /* FIXME: this check will fail if we have more than one level of directories, > * we shoud check for every level 1, 1/2, 1/2/3, 1/2/3/4 .... > * ---simo >+ * This is an attempt to fix the problem. Directories in the list must end with >+ * a '/', then this is used in the comparison. If a directory is excluded, all >+ * child directories are also excluded. >+ * --- jon gough > */ >- if (checkparam(recycle_exclude_dir(handle), path_name)) { >+ if (checkdirparam(recycle_exclude_dir(handle), path_name)) { > DEBUG(3, ("recycle: directory %s is excluded \n", path_name)); > rc = SMB_VFS_NEXT_UNLINK(handle, file_name); > goto done;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 4486
:
2356
|
2357
|
2358