[ros-diffs] [cgutman] 52223: [AFD] - FD_CLOSE is only for remote disconnects so don't send it when the app closes its own socket - Validate the user-mode event handle properly

cgutman at svn.reactos.org cgutman at svn.reactos.org
Tue Jun 14 00:56:50 UTC 2011


Author: cgutman
Date: Tue Jun 14 00:56:49 2011
New Revision: 52223

URL: http://svn.reactos.org/svn/reactos?rev=52223&view=rev
Log:
[AFD]
- FD_CLOSE is only for remote disconnects so don't send it when the app closes its own socket
- Validate the user-mode event handle properly

Modified:
    trunk/reactos/drivers/network/afd/afd/main.c
    trunk/reactos/drivers/network/afd/afd/select.c

Modified: trunk/reactos/drivers/network/afd/afd/main.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/main.c?rev=52223&r1=52222&r2=52223&view=diff
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/main.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/main.c [iso-8859-1] Tue Jun 14 00:56:49 2011
@@ -419,9 +419,6 @@
     if( !SocketAcquireStateLock( FCB ) ) return STATUS_FILE_CLOSED;
 
     FCB->State = SOCKET_STATE_CLOSED;
-    FCB->PollState = AFD_EVENT_CLOSE;
-    FCB->PollStatus[FD_CLOSE_BIT] = STATUS_SUCCESS; //I think we can return success here
-    PollReeval( FCB->DeviceExt, FCB->FileObject );
 
     InFlightRequest[0] = &FCB->ListenIrp;
     InFlightRequest[1] = &FCB->ReceiveIrp;

Modified: trunk/reactos/drivers/network/afd/afd/select.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/select.c?rev=52223&r1=52222&r2=52223&view=diff
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/select.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/select.c [iso-8859-1] Tue Jun 14 00:56:49 2011
@@ -287,8 +287,8 @@
 	Status = ObReferenceObjectByHandle( (PVOID)EventSelectInfo->
 					    EventObject,
 					    FILE_ALL_ACCESS,
-					    NULL,
-					    KernelMode,
+					    ExEventObjectType,
+					    UserMode,
 					    (PVOID *)&FCB->EventSelect,
 					    NULL );
 




More information about the Ros-diffs mailing list