}
bool has_other_nonposix_opens(struct share_mode_lock *lck,
- struct files_struct *fsp,
- struct server_id self)
+ struct files_struct *fsp)
{
struct share_mode_data *data = lck->data;
+ struct server_id self = messaging_server_id(fsp->conn->sconn->msg_ctx);
uint32_t i;
for (i=0; i<data->num_share_modes; i++) {
enum file_close_type close_type)
{
connection_struct *conn = fsp->conn;
- struct server_id self = messaging_server_id(conn->sconn->msg_ctx);
bool delete_file = false;
bool changed_user = false;
struct share_mode_lock *lck = NULL;
delete_file = is_delete_on_close_set(lck, fsp->name_hash);
- delete_file &= !has_other_nonposix_opens(lck, fsp, self);
+ delete_file &= !has_other_nonposix_opens(lck, fsp);
/*
* NT can set delete_on_close of the last open
static NTSTATUS close_directory(struct smb_request *req, files_struct *fsp,
enum file_close_type close_type)
{
- struct server_id self = messaging_server_id(fsp->conn->sconn->msg_ctx);
struct share_mode_lock *lck = NULL;
bool delete_dir = False;
NTSTATUS status = NT_STATUS_OK;
delete_dir = get_delete_on_close_token(lck, fsp->name_hash,
&del_nt_token, &del_token);
- delete_dir &= !has_other_nonposix_opens(lck, fsp, self);
+ delete_dir &= !has_other_nonposix_opens(lck, fsp);
if ((close_type == NORMAL_CLOSE || close_type == SHUTDOWN_CLOSE) &&
delete_dir) {
connection_struct *conn,
struct smb_filename *smb_dname);
bool has_other_nonposix_opens(struct share_mode_lock *lck,
- struct files_struct *fsp,
- struct server_id self);
+ struct files_struct *fsp);
/* The following definitions come from smbd/conn.c */
int total_data,
struct smb_filename *smb_fname)
{
- struct server_id self = messaging_server_id(conn->sconn->msg_ctx);
NTSTATUS status = NT_STATUS_OK;
files_struct *fsp = NULL;
uint16_t flags = 0;
return NT_STATUS_INVALID_PARAMETER;
}
- other_nonposix_opens = has_other_nonposix_opens(lck, fsp, self);
+ other_nonposix_opens = has_other_nonposix_opens(lck, fsp);
if (other_nonposix_opens) {
/* Fail with sharing violation. */
TALLOC_FREE(lck);