diff options
author | Andrew Bartlett <abartlet@samba.org> | 2007-05-15 06:51:18 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:52:28 -0500 |
commit | 4febada51fca5953b84b71b71c9aa0a430c4ee3d (patch) | |
tree | b48aecc6a3af6620da7704574bf4016d77768f59 /source4/ntvfs/ipc | |
parent | 3173a3cee6e7b85e0822e21306c5612467dfd5e2 (diff) | |
download | samba-4febada51fca5953b84b71b71c9aa0a430c4ee3d.tar.gz samba-4febada51fca5953b84b71b71c9aa0a430c4ee3d.tar.bz2 samba-4febada51fca5953b84b71b71c9aa0a430c4ee3d.zip |
r22882: It seems entirly reasonable to follow metze's suggestion and check for
a valid file handle first.
Andrew Bartlett
(This used to be commit 3947db3dcbfe97e9ccb9b9bd2b3a69cf7683af9f)
Diffstat (limited to 'source4/ntvfs/ipc')
-rw-r--r-- | source4/ntvfs/ipc/vfs_ipc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c index 20b70415aa..70dd3e3561 100644 --- a/source4/ntvfs/ipc/vfs_ipc.c +++ b/source4/ntvfs/ipc/vfs_ipc.c @@ -610,14 +610,13 @@ static NTSTATUS ipc_qfileinfo(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_fileinfo *info) { struct ipc_private *private = ntvfs->private_data; + struct pipe_state *p = pipe_state_find(private, info->generic.in.file.ntvfs); + if (!p) { + return NT_STATUS_INVALID_HANDLE; + } 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, '\\'); |