summaryrefslogtreecommitdiff
path: root/source3/smbd/conn_msg.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-05-25 14:58:24 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-05-31 00:32:07 +0200
commitade01f083c502ecf7cba19303eb16d3c9a4be52a (patch)
tree8fe090925a70c9ed4f5de4efa344ea4a79a80216 /source3/smbd/conn_msg.c
parent4e374d167992195b7a0e0f8c82aab755fd3d8379 (diff)
downloadsamba-ade01f083c502ecf7cba19303eb16d3c9a4be52a.tar.gz
samba-ade01f083c502ecf7cba19303eb16d3c9a4be52a.tar.bz2
samba-ade01f083c502ecf7cba19303eb16d3c9a4be52a.zip
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
Diffstat (limited to 'source3/smbd/conn_msg.c')
-rw-r--r--source3/smbd/conn_msg.c49
1 files changed, 49 insertions, 0 deletions
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 <http://www.gnu.org/licenses/>.
+*/
+
+#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);
+}