SMB_BIG_UINT initial_allocation_size; /* Faked up initial allocation on disk. */
SMB_BIG_UINT position_information;
mode_t mode;
+ uint16 file_pid;
uint16 vuid;
write_bmpx_struct *wbmpx_ptr;
write_cache *wcp;
}
}
+/****************************************************************************
+ Close all open files for a pid.
+****************************************************************************/
+
+void file_close_pid(uint16 smbpid)
+{
+ files_struct *fsp, *next;
+
+ for (fsp=Files;fsp;fsp=next) {
+ next = fsp->next;
+ if (fsp->file_pid == smbpid) {
+ close_file(fsp,False);
+ }
+ }
+}
+
/****************************************************************************
Initialise file structures.
****************************************************************************/
extern userdom_struct current_user_info;
extern uint16 global_oplock_port;
+extern uint16 global_smbpid;
extern BOOL global_client_failed_oplock_break;
/****************************************************************************
fsp->inode = psbuf->st_ino;
fsp->dev = psbuf->st_dev;
fsp->vuid = current_user.vuid;
+ fsp->file_pid = global_smbpid;
fsp->size = psbuf->st_size;
fsp->can_lock = True;
fsp->can_read = ((flags & O_WRONLY)==0);
fsp->dev = psbuf->st_dev;
fsp->size = psbuf->st_size;
fsp->vuid = current_user.vuid;
+ fsp->file_pid = global_smbpid;
fsp->can_lock = True;
fsp->can_read = False;
fsp->can_write = False;
fsp->dev = (SMB_DEV_T)0;
fsp->size = psbuf->st_size;
fsp->vuid = current_user.vuid;
+ fsp->file_pid = global_smbpid;
fsp->can_lock = False;
fsp->can_read = False;
fsp->can_write = False;
{
int outsize;
START_PROFILE(SMBexit);
+
+ file_close_pid(SVAL(inbuf,smb_pid));
+
outsize = set_message(outbuf,0,0,True);
DEBUG(3,("exit\n"));