From ade01f083c502ecf7cba19303eb16d3c9a4be52a Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 25 May 2011 14:58:24 +1000 Subject: s3-smbd Split conn.c into 3 files The idea with this split is to make it easier to handle dependencies, avoiding having the loadparm code depend on the global server variables, without resorting to dummy functions and linker tricks. conn_clear_vuid_cache() is brought in from uid.c to make it static Andrew Bartlett --- source3/smbd/conn_msg.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 source3/smbd/conn_msg.c (limited to 'source3/smbd/conn_msg.c') diff --git a/source3/smbd/conn_msg.c b/source3/smbd/conn_msg.c new file mode 100644 index 0000000000..ba03823667 --- /dev/null +++ b/source3/smbd/conn_msg.c @@ -0,0 +1,49 @@ +/* + Unix SMB/CIFS implementation. + Manage connections_struct structures + Copyright (C) Andrew Tridgell 1998 + Copyright (C) Alexander Bokovoy 2002 + Copyright (C) Jeremy Allison 2010 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include "includes.h" +#include "smbd/smbd.h" +#include "smbd/globals.h" + +/**************************************************************************** + Receive a smbcontrol message to forcibly unmount a share. + The message contains just a share name and all instances of that + share are unmounted. + The special sharename '*' forces unmount of all shares. +****************************************************************************/ + +void msg_force_tdis(struct messaging_context *msg, + void *private_data, + uint32_t msg_type, + struct server_id server_id, + DATA_BLOB *data) +{ + struct smbd_server_connection *sconn; + const char *sharename = (const char *)data->data; + + sconn = msg_ctx_to_sconn(msg); + if (sconn == NULL) { + DEBUG(1, ("could not find sconn\n")); + return; + } + + return conn_force_tdis(sconn, sharename); +} -- cgit