The Samba-Bugzilla – Bug 7415
recycle:exclude_dir will match directory at any depth
Last modified: 2010-05-06 18:38:51 UTC
the problem is with the function
static bool matchdirparam(const char **dir_exclude_list, char *path)
this function processes the parameter recycle:exclude_dir
in a way that it is used only to check single path element at a time.
So on one side, pattern like "data/mail" will never match,
on the other side, pattern like "mail" will match
"/mail", "/data/mail", as well as "/data/john/important/mail" etc.
This is not described in the doc as well as it is not intuitive
and may result in data loss.
I suggest to change semantics to allow control over
what part of the path is matched and if the pattern is anchored,
e.g. pattern like /mail should be anchored and match only start
of the path (under the share or absolute).
Most important - the semantics needs to be described in the docs.