From fcda2645f099e5d356361ec3de4f45d97285f0b5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 20 Jun 2001 03:05:09 +0000 Subject: added a close-share smbcontrol message that forcibly closes a share in smbd (to allow unmount) (This used to be commit 15b17a80db605a55f667c95fb7e316877a441887) --- source3/smbd/process.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source3/smbd/process.c') diff --git a/source3/smbd/process.c b/source3/smbd/process.c index f757467680..72e0fc311a 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -693,6 +693,12 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize if (!(flags & AS_USER)) unbecome_user(); + /* does this protocol need a valid tree connection? */ + if ((flags & AS_USER) && !conn) { + return ERROR(ERRSRV, ERRinvnid); + } + + /* does this protocol need to be run as the connected user? */ if ((flags & AS_USER) && !become_user(conn,session_tag)) { if (flags & AS_GUEST) @@ -1195,6 +1201,9 @@ void smbd_process(void) /* re-initialise the timezone */ TimeInit(); + /* register our message handlers */ + message_register(MSG_SMB_FORCE_TDIS, msg_force_tdis); + while (True) { int deadtime = lp_deadtime()*60; int select_timeout = setup_select_timeout(); -- cgit