2 Unix SMB/CIFS implementation.
3 default IPC$ NTVFS backend
4 Copyright (C) Andrew Tridgell 2003
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 this implements the IPC$ backend, called by the NTVFS subsystem to
22 handle requests on IPC$ shares
29 connect to a share - always works
31 static NTSTATUS ipc_connect(struct request_context *req, const char *sharename)
33 struct tcon_context *conn = req->conn;
35 conn->fs_type = talloc_strdup(conn->mem_ctx, "IPC");
36 conn->dev_type = talloc_strdup(conn->mem_ctx, "IPC");
42 disconnect from a share
44 static NTSTATUS ipc_disconnect(struct tcon_context *tcon)
52 static NTSTATUS ipc_unlink(struct request_context *req, struct smb_unlink *unl)
54 return NT_STATUS_ACCESS_DENIED;
59 ioctl interface - we don't do any
61 static NTSTATUS ipc_ioctl(struct request_context *req, struct smb_ioctl *io)
63 return NT_STATUS_ACCESS_DENIED;
67 check if a directory exists
69 static NTSTATUS ipc_chkpath(struct request_context *req, struct smb_chkpath *cp)
71 return NT_STATUS_ACCESS_DENIED;
75 return info on a pathname
77 static NTSTATUS ipc_qpathinfo(struct request_context *req, union smb_fileinfo *info)
79 return NT_STATUS_ACCESS_DENIED;
83 set info on a pathname
85 static NTSTATUS ipc_setpathinfo(struct request_context *req, union smb_setfileinfo *st)
87 return NT_STATUS_ACCESS_DENIED;
93 static NTSTATUS ipc_open(struct request_context *req, union smb_open *oi)
95 return NT_STATUS_ACCESS_DENIED;
101 static NTSTATUS ipc_mkdir(struct request_context *req, union smb_mkdir *md)
103 return NT_STATUS_ACCESS_DENIED;
109 static NTSTATUS ipc_rmdir(struct request_context *req, struct smb_rmdir *rd)
111 return NT_STATUS_ACCESS_DENIED;
115 rename a set of files
117 static NTSTATUS ipc_rename(struct request_context *req, struct smb_rename *ren)
119 return NT_STATUS_ACCESS_DENIED;
125 static NTSTATUS ipc_copy(struct request_context *req, struct smb_copy *cp)
127 return NT_STATUS_ACCESS_DENIED;
133 static NTSTATUS ipc_read(struct request_context *req, union smb_read *rd)
135 return NT_STATUS_ACCESS_DENIED;
141 static NTSTATUS ipc_write(struct request_context *req, union smb_write *wr)
143 return NT_STATUS_ACCESS_DENIED;
149 static NTSTATUS ipc_seek(struct request_context *req, struct smb_seek *io)
151 return NT_STATUS_ACCESS_DENIED;
157 static NTSTATUS ipc_flush(struct request_context *req, struct smb_flush *io)
159 return NT_STATUS_ACCESS_DENIED;
165 static NTSTATUS ipc_close(struct request_context *req, union smb_close *io)
167 return NT_STATUS_ACCESS_DENIED;
171 exit - closing files?
173 static NTSTATUS ipc_exit(struct request_context *req)
175 return NT_STATUS_ACCESS_DENIED;
181 static NTSTATUS ipc_lock(struct request_context *req, union smb_lock *lck)
183 return NT_STATUS_ACCESS_DENIED;
187 set info on a open file
189 static NTSTATUS ipc_setfileinfo(struct request_context *req, union smb_setfileinfo *info)
191 return NT_STATUS_ACCESS_DENIED;
195 query info on a open file
197 static NTSTATUS ipc_qfileinfo(struct request_context *req, union smb_fileinfo *info)
199 return NT_STATUS_ACCESS_DENIED;
204 return filesystem info
206 static NTSTATUS ipc_fsinfo(struct request_context *req, union smb_fsinfo *fs)
208 return NT_STATUS_ACCESS_DENIED;
212 return print queue info
214 static NTSTATUS ipc_lpq(struct request_context *req, union smb_lpq *lpq)
216 return NT_STATUS_ACCESS_DENIED;
220 list files in a directory matching a wildcard pattern
222 NTSTATUS ipc_search_first(struct request_context *req, union smb_search_first *io,
223 void *search_private,
224 BOOL (*callback)(void *, union smb_search_data *))
226 return NT_STATUS_ACCESS_DENIED;
230 continue listing files in a directory
232 NTSTATUS ipc_search_next(struct request_context *req, union smb_search_next *io,
233 void *search_private,
234 BOOL (*callback)(void *, union smb_search_data *))
236 return NT_STATUS_ACCESS_DENIED;
240 end listing files in a directory
242 NTSTATUS ipc_search_close(struct request_context *req, union smb_search_close *io)
244 return NT_STATUS_ACCESS_DENIED;
249 initialialise the IPC backend, registering ourselves with the ntvfs subsystem
251 BOOL ipc_vfs_init(void)
254 struct ntvfs_ops ops;
258 /* fill in all the operations */
259 ops.connect = ipc_connect;
260 ops.disconnect = ipc_disconnect;
261 ops.unlink = ipc_unlink;
262 ops.chkpath = ipc_chkpath;
263 ops.qpathinfo = ipc_qpathinfo;
264 ops.setpathinfo = ipc_setpathinfo;
266 ops.mkdir = ipc_mkdir;
267 ops.rmdir = ipc_rmdir;
268 ops.rename = ipc_rename;
270 ops.ioctl = ipc_ioctl;
272 ops.write = ipc_write;
274 ops.flush = ipc_flush;
275 ops.close = ipc_close;
278 ops.setfileinfo = ipc_setfileinfo;
279 ops.qfileinfo = ipc_qfileinfo;
280 ops.fsinfo = ipc_fsinfo;
282 ops.search_first = ipc_search_first;
283 ops.search_next = ipc_search_next;
284 ops.search_close = ipc_search_close;
286 /* register ourselves with the NTVFS subsystem. */
287 ret = ntvfs_register("ipc", NTVFS_IPC, &ops);
290 DEBUG(0,("Failed to register IPC backend!\n"));