Samba 3.0.32 - internal change notify on share directory
Jeremy Allison
jra at samba.org
Tue Nov 18 20:38:20 GMT 2008
On Tue, Nov 18, 2008 at 12:20:40PM -0800, Jeremy Allison wrote:
> Actually we should also do the same to the path
> creation in change_notify_create(), to ensure
> all the paths are correctly canonicalized - which
> would make the canonicalization code inside
> notify_add() able to be removed (but I'm going
> to leave it for now for stability).
>
> So the complete patch should be (IMHO) the
> attached. Please test !
Never mind, that the change in change_notify_create()
would break the "./" removal logic in notify_add().
Doh ! Sorry, the correct patch is just :
Jeremy.
-------------- next part --------------
diff --git a/source/smbd/notify.c b/source/smbd/notify.c
index 6e24466..b017237 100644
--- a/source/smbd/notify.c
+++ b/source/smbd/notify.c
@@ -349,6 +349,9 @@ void notify_fname(connection_struct *conn, uint32 action, uint32 filter,
{
char *fullpath;
+ if (path[0] == '.' && path[1] == '/') {
+ path += 2;
+ }
if (asprintf(&fullpath, "%s/%s", conn->connectpath, path) == -1) {
DEBUG(0, ("asprintf failed\n"));
return;
More information about the samba-technical
mailing list