From af76d2588c9aab9ed0eb71ab216ea55faaa40cf2 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 1 Dec 2011 13:24:22 -0800 Subject: After a discussion with Volker, sdd a backup_intent state to the client struct. This causes the backup_intent flags to be added to findfirst/findnext and ntcreate/nttrans_create calls. cli_set_backup_intent() sets the flag and returns the old value of its state. --- source3/libsmb/clifile.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3/libsmb/clifile.c') diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index b418049d32..ec8395626b 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -1813,7 +1813,8 @@ struct tevent_req *cli_ntcreate_send(TALLOC_CTX *mem_ctx, SIVAL(vwv+13, 1, FileAttributes); SIVAL(vwv+15, 1, ShareAccess); SIVAL(vwv+17, 1, CreateDisposition); - SIVAL(vwv+19, 1, CreateOptions); + SIVAL(vwv+19, 1, CreateOptions | + (cli->backup_intent ? FILE_OPEN_FOR_BACKUP_INTENT : 0)); SIVAL(vwv+21, 1, 0x02); /* ImpersonationLevel */ SCVAL(vwv+23, 1, SecurityFlags); @@ -2002,7 +2003,8 @@ struct tevent_req *cli_nttrans_create_send(TALLOC_CTX *mem_ctx, SIVAL(param, 20, FileAttributes); SIVAL(param, 24, ShareAccess); SIVAL(param, 28, CreateDisposition); - SIVAL(param, 32, CreateOptions); + SIVAL(param, 32, CreateOptions | + (cli->backup_intent ? FILE_OPEN_FOR_BACKUP_INTENT : 0)); SIVAL(param, 36, secdesc_len); SIVAL(param, 40, 0); /* EA length*/ SIVAL(param, 44, converted_len); -- cgit