--- /vobs/vendor/smb/source/smbd/notify.c@@/main/local/bug20372/0 2008-11-18 12:39:02.195390000 +0200 +++ /vobs/vendor/smb/source/smbd/notify.c@@/main/local/bug20372/2 2008-11-18 14:38:05.000000000 +0200 @@ -348,8 +348,14 @@ void notify_fname(connection_struct *con const char *path) { char *fullpath; + /* cope with ./ on the beginning of the path */ + const char *tmp_path = path; - if (asprintf(&fullpath, "%s/%s", conn->connectpath, path) == -1) { + if (strlen(path) > 1 && path[0] == '.' && path[1] == '/') { + tmp_path = path + 2; + } + + if (asprintf(&fullpath, "%s/%s", conn->connectpath, tmp_path) == -1) { DEBUG(0, ("asprintf failed\n")); return; }