#include "includes.h"
#include "lib/util/time_basic.h"
+#include "smbd/proto.h"
#include "system/filesys.h"
#include "lib/util/server_id.h"
#include "share_mode_lock.h"
bool get_delete_on_close_token(struct share_mode_lock *lck,
uint32_t name_hash,
const struct security_token **pp_nt_tok,
- const struct security_unix_token **pp_tok)
+ const struct security_unix_token **pp_tok,
+ struct smb2_lease_key *parent_lease_key)
{
struct share_mode_data *d = NULL;
struct delete_token *dt;
}
*pp_nt_tok = dt->delete_nt_token;
*pp_tok = dt->delete_token;
+ *parent_lease_key = dt->parent_lease_key;
return true;
}
bool get_delete_on_close_token(struct share_mode_lock *lck,
uint32_t name_hash,
const struct security_token **pp_nt_tok,
- const struct security_unix_token **pp_tok);
+ const struct security_unix_token **pp_tok,
+ struct smb2_lease_key *parent_lease_key);
void reset_delete_on_close_lck(files_struct *fsp,
struct share_mode_lock *lck);
void set_delete_on_close_lck(files_struct *fsp,
enum file_close_type close_type;
bool delete_object;
bool got_tokens;
+ struct smb2_lease_key parent_lease_key;
const struct security_unix_token *del_token;
const struct security_token *del_nt_token;
bool reset_delete_on_close;
*/
*keep_locked = true;
- state->got_tokens = get_delete_on_close_token(lck, fsp->name_hash,
- &state->del_nt_token, &state->del_token);
+ state->got_tokens = get_delete_on_close_token(lck,
+ fsp->name_hash,
+ &state->del_nt_token,
+ &state->del_token,
+ &state->parent_lease_key);
if (state->close_type != ERROR_CLOSE) {
SMB_ASSERT(state->got_tokens);
}