s4:ntvfs/ipc: fix ipc_close()
authorStefan Metzmacher <metze@samba.org>
Sat, 18 Oct 2014 08:42:00 +0000 (10:42 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 3 Jul 2015 00:00:28 +0000 (02:00 +0200)
Until now this always returned NT_STATUS_INVALID_LEVEL
for everything but RAW_CLOSE_CLOSE.

Now it maps everything correctly to RAW_CLOSE_GENERIC.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source4/ntvfs/ipc/vfs_ipc.c

index 50f0e5995cbbdda8e5dae17cb68865fb27c22db1..a5f2bb1642c56888b302f3f009c0dd74dcb640e5 100644 (file)
@@ -737,11 +737,13 @@ static NTSTATUS ipc_close(struct ntvfs_module_context *ntvfs,
                                    struct ipc_private);
        struct pipe_state *p;
 
-       if (io->generic.level != RAW_CLOSE_CLOSE) {
+       if (io->generic.level != RAW_CLOSE_GENERIC) {
                return ntvfs_map_close(ntvfs, req, io);
        }
 
-       p = pipe_state_find(ipriv, io->close.in.file.ntvfs);
+       ZERO_STRUCT(io->generic.out);
+
+       p = pipe_state_find(ipriv, io->generic.in.file.ntvfs);
        if (!p) {
                return NT_STATUS_INVALID_HANDLE;
        }