Fix for client accessing a named pipe after the server closes it.

This commit is contained in:
Bill Medland 2003-04-17 02:14:04 +00:00 committed by Alexandre Julliard
parent ac1d1056d4
commit 3f7c3ff76e
2 changed files with 4 additions and 2 deletions

View File

@ -987,7 +987,7 @@ static struct fd *get_handle_fd_obj( struct process *process, obj_handle_t handl
if ((obj = get_handle_obj( process, handle, access, NULL )))
{
if (!(fd = get_obj_fd( obj ))) set_error( STATUS_OBJECT_TYPE_MISMATCH );
fd = get_obj_fd( obj );
release_object( obj );
}
return fd;

View File

@ -163,7 +163,9 @@ static void notify_waiter( struct pipe_user *user, unsigned int status)
static struct fd *pipe_user_get_fd( struct object *obj )
{
struct pipe_user *user = (struct pipe_user *)obj;
return (struct fd *)grab_object( user->fd );
if (user->fd) return (struct fd *)grab_object( user->fd );
set_error( STATUS_PIPE_DISCONNECTED );
return NULL;
}
static void pipe_user_destroy( struct object *obj)