mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
smbd: Fix snapshot query on shares with DFS enabled
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
This commit is contained in:
parent
b6931d5edc
commit
f1b42ec778
@ -913,14 +913,14 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
|
||||
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user