summaryrefslogtreecommitdiff
path: root/source4/ntvfs/ipc
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-05-15 01:21:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:52:27 -0500
commit3a88c56346929695cc4b2ecc22e20aee51b493d9 (patch)
tree42f24be9fda8f25045a70be99fd353434cc63284 /source4/ntvfs/ipc
parentd307c116c8e50e9d6d304209636d9d23f6574488 (diff)
downloadsamba-3a88c56346929695cc4b2ecc22e20aee51b493d9.tar.gz
samba-3a88c56346929695cc4b2ecc22e20aee51b493d9.tar.bz2
samba-3a88c56346929695cc4b2ecc22e20aee51b493d9.zip
r22874: Expand the RPC-QFILEINFO-IPC test, and add a server implementation to match.
This should help with Vista joins. Andrew Bartlett (This used to be commit 8f85fb37862044d4b618e4184274bc67432af73b)
Diffstat (limited to 'source4/ntvfs/ipc')
-rw-r--r--source4/ntvfs/ipc/vfs_ipc.c42
1 files changed, 41 insertions, 1 deletions
diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c
index bb80963287..20b70415aa 100644
--- a/source4/ntvfs/ipc/vfs_ipc.c
+++ b/source4/ntvfs/ipc/vfs_ipc.c
@@ -149,7 +149,14 @@ static NTSTATUS ipc_chkpath(struct ntvfs_module_context *ntvfs,
static NTSTATUS ipc_qpathinfo(struct ntvfs_module_context *ntvfs,
struct ntvfs_request *req, union smb_fileinfo *info)
{
- return NT_STATUS_ACCESS_DENIED;
+ switch (info->generic.level) {
+ case RAW_FILEINFO_GENERIC:
+ return NT_STATUS_INVALID_DEVICE_REQUEST;
+ case RAW_FILEINFO_GETATTR:
+ return NT_STATUS_ACCESS_DENIED;
+ default:
+ return ntvfs_map_qpathinfo(ntvfs, req, info);
+ }
}
/*
@@ -602,6 +609,39 @@ static NTSTATUS ipc_setfileinfo(struct ntvfs_module_context *ntvfs,
static NTSTATUS ipc_qfileinfo(struct ntvfs_module_context *ntvfs,
struct ntvfs_request *req, union smb_fileinfo *info)
{
+ struct ipc_private *private = ntvfs->private_data;
+ switch (info->generic.level) {
+ case RAW_FILEINFO_GENERIC:
+ {
+ struct pipe_state *p;
+ p = pipe_state_find(private, info->generic.in.file.ntvfs);
+ if (!p) {
+ return NT_STATUS_INVALID_HANDLE;
+ }
+ ZERO_STRUCT(info->generic.out);
+ info->generic.out.attrib = FILE_ATTRIBUTE_NORMAL;
+ info->generic.out.fname.s = strrchr(p->pipe_name, '\\');
+ info->generic.out.alloc_size = 4096;
+ info->generic.out.nlink = 1;
+ /* What the heck? Match Win2k3: IPC$ pipes are delete pending */
+ info->generic.out.delete_pending = 1;
+ return NT_STATUS_OK;
+ }
+ case RAW_FILEINFO_ALT_NAME_INFO:
+ case RAW_FILEINFO_ALT_NAME_INFORMATION:
+ case RAW_FILEINFO_STREAM_INFO:
+ case RAW_FILEINFO_STREAM_INFORMATION:
+ case RAW_FILEINFO_COMPRESSION_INFO:
+ case RAW_FILEINFO_COMPRESSION_INFORMATION:
+ case RAW_FILEINFO_NETWORK_OPEN_INFORMATION:
+ case RAW_FILEINFO_ATTRIBUTE_TAG_INFORMATION:
+ return NT_STATUS_INVALID_PARAMETER;
+ case RAW_FILEINFO_ALL_EAS:
+ return NT_STATUS_ACCESS_DENIED;
+ default:
+ return ntvfs_map_qfileinfo(ntvfs, req, info);
+ }
+
return NT_STATUS_ACCESS_DENIED;
}