When DFS is enabled (host msdfs = yes and msdfs root = yes), then SMB
clients send create requests in the format \hostname\service\path.
Putting the GMT tag as first element breaks the DFS parsing and results
in OBJECT_NOT_FOUND for snapshotted files. Fix this by appending the
GMT tag to the end of the path.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12150
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Aug 13 05:44:39 CEST 2016 on sn-devel-144
TALLOC_FREE(fname);
fname = talloc_asprintf(state,
- "@GMT-%04u.%02u.%02u-%02u.%02u.%02u\\%s",
+ "%s\\@GMT-%04u.%02u.%02u-%02u.%02u.%02u",
+ in_name,
tm->tm_year + 1900,
tm->tm_mon + 1,
tm->tm_mday,
tm->tm_hour,
tm->tm_min,
- tm->tm_sec,
- in_name);
+ tm->tm_sec);
if (tevent_req_nomem(fname, req)) {
return tevent_req_post(req, ev);
}