diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 3 | ||||
-rw-r--r-- | source3/modules/vfs_acl_common.c | 3 | ||||
-rw-r--r-- | source3/smbd/files.c | 5 | ||||
-rw-r--r-- | source3/smbd/open.c | 5 | ||||
-rw-r--r-- | source3/smbd/reply.c | 5 | ||||
-rw-r--r-- | source3/smbd/trans2.c | 4 |
6 files changed, 15 insertions, 10 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index d70c823e20..a6ae87f887 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -4763,7 +4763,8 @@ struct files_struct *files_forall( files_struct *file_find_fd(int fd); files_struct *file_find_dif(struct smbd_server_connection *sconn, struct file_id id, unsigned long gen_id); -files_struct *file_find_di_first(struct file_id id); +files_struct *file_find_di_first(struct smbd_server_connection *sconn, + struct file_id id); files_struct *file_find_di_next(files_struct *start_fsp); bool file_find_subpath(files_struct *dir_fsp); void file_sync_all(connection_struct *conn); diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c index e759dc2df3..dbf3a09395 100644 --- a/source3/modules/vfs_acl_common.c +++ b/source3/modules/vfs_acl_common.c @@ -806,7 +806,8 @@ static int acl_common_remove_object(vfs_handle_struct *handle, /* Ensure we have this file open with DELETE access. */ id = vfs_file_id_from_sbuf(conn, &local_fname.st); - for (fsp = file_find_di_first(id); fsp; file_find_di_next(fsp)) { + for (fsp = file_find_di_first(conn->sconn, id); fsp; + file_find_di_next(fsp)) { if (fsp->access_mask & DELETE_ACCESS && fsp->delete_on_close) { /* We did open this for delete, diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 3f353a3eb2..98afd77bcc 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -308,7 +308,8 @@ files_struct *file_find_dif(struct smbd_server_connection *sconn, calls. ****************************************************************************/ -files_struct *file_find_di_first(struct file_id id) +files_struct *file_find_di_first(struct smbd_server_connection *sconn, + struct file_id id) { files_struct *fsp; @@ -319,7 +320,7 @@ files_struct *file_find_di_first(struct file_id id) fsp_fi_cache.id = id; - for (fsp=smbd_server_conn->files;fsp;fsp=fsp->next) { + for (fsp=sconn->files;fsp;fsp=fsp->next) { if (file_id_equal(&fsp->file_id, &id)) { /* Setup positive cache. */ fsp_fi_cache.fsp = fsp; diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 44de5a3cd0..00bee5b862 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1165,7 +1165,7 @@ NTSTATUS fcb_or_dos_open(struct smb_request *req, DEBUG(5,("fcb_or_dos_open: attempting old open semantics for " "file %s.\n", smb_fname_str_dbg(smb_fname))); - for(fsp = file_find_di_first(id); fsp; + for(fsp = file_find_di_first(conn->sconn, id); fsp; fsp = file_find_di_next(fsp)) { DEBUG(10,("fcb_or_dos_open: checking file %s, fd = %d, " @@ -2773,7 +2773,8 @@ void msg_file_was_renamed(struct messaging_context *msg, sharepath, smb_fname_str_dbg(smb_fname), file_id_string_tos(&id))); - for(fsp = file_find_di_first(id); fsp; fsp = file_find_di_next(fsp)) { + for(fsp = file_find_di_first(smbd_server_conn, id); fsp; + fsp = file_find_di_next(fsp)) { if (memcmp(fsp->conn->connectpath, sharepath, sp_len) == 0) { DEBUG(10,("msg_file_was_renamed: renaming file fnum %d from %s -> %s\n", diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 3b4ea09336..c84c077d58 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -5793,7 +5793,7 @@ static void rename_open_files(connection_struct *conn, bool did_rename = False; NTSTATUS status; - for(fsp = file_find_di_first(lck->id); fsp; + for(fsp = file_find_di_first(conn->sconn, lck->id); fsp; fsp = file_find_di_next(fsp)) { /* fsp_name is a relative path under the fsp. To change this for other sharepaths we need to manipulate relative paths. */ @@ -6068,7 +6068,8 @@ NTSTATUS rename_internals_fsp(connection_struct *conn, if (dst_exists) { struct file_id fileid = vfs_file_id_from_sbuf(conn, &smb_fname_dst->st); - files_struct *dst_fsp = file_find_di_first(fileid); + files_struct *dst_fsp = file_find_di_first(conn->sconn, + fileid); /* The file can be open when renaming a stream */ if (dst_fsp && !new_is_stream) { DEBUG(3, ("rename_internals_fsp: Target file open\n")); diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 304476476e..0888ded21a 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -4314,7 +4314,7 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn, /* Do we have this path open ? */ files_struct *fsp1; struct file_id fileid = vfs_file_id_from_sbuf(conn, psbuf); - fsp1 = file_find_di_first(fileid); + fsp1 = file_find_di_first(conn->sconn, fileid); if (fsp1 && fsp1->initial_allocation_size) { allocation_size = SMB_VFS_GET_ALLOC_SIZE(conn, fsp1, psbuf); } @@ -6987,7 +6987,7 @@ static NTSTATUS smb_set_file_unix_basic(connection_struct *conn, } id = vfs_file_id_from_sbuf(conn, &sbuf); - for(all_fsps = file_find_di_first(id); all_fsps; + for(all_fsps = file_find_di_first(conn->sconn, id); all_fsps; all_fsps = file_find_di_next(all_fsps)) { /* * We're setting the time explicitly for UNIX. |