From 6d6401a67a9985c8c51175db520114dc2ef421ce Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 19 Aug 2003 01:53:45 +0000 Subject: Implement SMBexit properly. Found by Samba4 tester. You must do a make clean proto all; after this commit. Jeremy. (This used to be commit 27af1f9feab12542dc538bfceac4593e644ba3b4) --- source3/smbd/files.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'source3/smbd/files.c') diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 186fa96d7d..1fe6f250e5 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -142,6 +142,22 @@ void file_close_conn(connection_struct *conn) } } +/**************************************************************************** + 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. ****************************************************************************/ -- cgit