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/clilist.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3/libsmb/clilist.c') diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c index 5118f9f377..ce36a4b2e7 100644 --- a/source3/libsmb/clilist.c +++ b/source3/libsmb/clilist.c @@ -585,7 +585,8 @@ static struct tevent_req *cli_list_trans_send(TALLOC_CTX *mem_ctx, SSVAL(state->param, 2, state->max_matches); SSVAL(state->param, 4, FLAG_TRANS2_FIND_REQUIRE_RESUME - |FLAG_TRANS2_FIND_CLOSE_IF_END); + |FLAG_TRANS2_FIND_CLOSE_IF_END + |(cli->backup_intent ? FLAG_TRANS2_FIND_BACKUP_INTENT : 0)); SSVAL(state->param, 6, state->info_level); SIVAL(state->param, 8, 0); @@ -760,7 +761,8 @@ static void cli_list_trans_done(struct tevent_req *subreq) * continue instead. JRA */ SSVAL(param, 10, (FLAG_TRANS2_FIND_REQUIRE_RESUME - |FLAG_TRANS2_FIND_CLOSE_IF_END)); + |FLAG_TRANS2_FIND_CLOSE_IF_END + |(state->cli->backup_intent ? FLAG_TRANS2_FIND_BACKUP_INTENT : 0))); if (last_name_raw.length) { state->param = trans2_bytes_push_bytes(state->param, last_name_raw.data, -- cgit