s3-torture/denytest.c: replace cli_read_old() with cli_read()
[Samba/gebeck_regimport.git] / source3 / smbd / conn_msg.c
blobb0c968a68073bb9d2ef34b68b317363788ba13ad
1 /*
2 Unix SMB/CIFS implementation.
3 Manage connections_struct structures
4 Copyright (C) Andrew Tridgell 1998
5 Copyright (C) Alexander Bokovoy 2002
6 Copyright (C) Jeremy Allison 2010
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #include "includes.h"
23 #include "smbd/smbd.h"
24 #include "smbd/globals.h"
26 /****************************************************************************
27 Receive a smbcontrol message to forcibly unmount a share.
28 The message contains just a share name and all instances of that
29 share are unmounted.
30 The special sharename '*' forces unmount of all shares.
31 ****************************************************************************/
33 void msg_force_tdis(struct messaging_context *msg,
34 void *private_data,
35 uint32_t msg_type,
36 struct server_id server_id,
37 DATA_BLOB *data)
39 struct smbd_server_connection *sconn;
40 const char *sharename = (const char *)data->data;
42 sconn = msg_ctx_to_sconn(msg);
43 if (sconn == NULL) {
44 DEBUG(1, ("could not find sconn\n"));
45 return;
48 conn_force_tdis(sconn, sharename);