summaryrefslogtreecommitdiffstats
path: root/source/smbd/conn.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-07-06 00:49:45 +0000
committerJeremy Allison <jra@samba.org>2001-07-06 00:49:45 +0000
commitfb1e289408cb8de4b8f9b988c56aa6d64df9b622 (patch)
tree9a8a56b622404f352d416cd7ddd0354f030b332e /source/smbd/conn.c
parent6ad113dce11db901ff666dac9a34e74f7b763f14 (diff)
downloadsamba-fb1e289408cb8de4b8f9b988c56aa6d64df9b622.tar.gz
samba-fb1e289408cb8de4b8f9b988c56aa6d64df9b622.tar.xz
samba-fb1e289408cb8de4b8f9b988c56aa6d64df9b622.zip
Syncup getting ready for release.
Jeremy.
Diffstat (limited to 'source/smbd/conn.c')
-rw-r--r--source/smbd/conn.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/source/smbd/conn.c b/source/smbd/conn.c
index e160c6ac83d..725ab22dc44 100644
--- a/source/smbd/conn.c
+++ b/source/smbd/conn.c
@@ -198,3 +198,33 @@ void conn_free(connection_struct *conn)
ZERO_STRUCTP(conn);
free(conn);
}
+
+
+/****************************************************************************
+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(int msg_type, pid_t pid, void *buf, size_t len)
+{
+ connection_struct *conn, *next;
+ fstring sharename;
+
+ fstrcpy(sharename, buf);
+
+ if (strcmp(sharename, "*") == 0) {
+ DEBUG(1,("Forcing close of all shares\n"));
+ conn_close_all();
+ return;
+ }
+
+ for (conn=Connections;conn;conn=next) {
+ next=conn->next;
+ if (strequal(lp_servicename(conn->service), sharename)) {
+ DEBUG(1,("Forcing close of share %s cnum=%d\n",
+ sharename, conn->cnum));
+ close_cnum(conn, (uint16)-1);
+ }
+ }
+}