summaryrefslogtreecommitdiff
path: root/source3/libsmb/clifile.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-12-01 13:24:22 -0800
committerJeremy Allison <jra@samba.org>2011-12-01 13:24:22 -0800
commitaf76d2588c9aab9ed0eb71ab216ea55faaa40cf2 (patch)
treea9fd4a77c5ff76bfb6e166ce75291813272c12b9 /source3/libsmb/clifile.c
parent3c4af39aa506a25fc6d6753dbe34e4e1c0dd0b43 (diff)
downloadsamba-af76d2588c9aab9ed0eb71ab216ea55faaa40cf2.tar.gz
samba-af76d2588c9aab9ed0eb71ab216ea55faaa40cf2.tar.bz2
samba-af76d2588c9aab9ed0eb71ab216ea55faaa40cf2.zip
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.
Diffstat (limited to 'source3/libsmb/clifile.c')
-rw-r--r--source3/libsmb/clifile.c6
1 files changed, 4 insertions, 2 deletions
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);