[ros-diffs] [weiden] 13142: implemented the TokenSessionId class for NtQueryInformationToken()

weiden at svn.reactos.com weiden at svn.reactos.com
Wed Jan 19 23:45:16 CET 2005


implemented the TokenSessionId class for NtQueryInformationToken()
Modified: trunk/reactos/ntoskrnl/se/token.c
  _____  

Modified: trunk/reactos/ntoskrnl/se/token.c
--- trunk/reactos/ntoskrnl/se/token.c	2005-01-19 21:47:51 UTC (rev
13141)
+++ trunk/reactos/ntoskrnl/se/token.c	2005-01-19 22:45:14 UTC (rev
13142)
@@ -838,8 +838,18 @@

 	break;
 
       case TokenSessionId:
-	DPRINT1("NtQueryInformationToken(TokenSessionId) not
implemented\n");
-	Status = STATUS_NOT_IMPLEMENTED;
+	DPRINT("NtQueryInformationToken(TokenSessionId)\n");
+	if (TokenInformationLength < sizeof(ULONG))
+	  {
+	    Length = sizeof(ULONG);
+	    Status = MmCopyToCaller(ReturnLength, &Length,
sizeof(ULONG));
+	    if (NT_SUCCESS(Status))
+	      Status = STATUS_BUFFER_TOO_SMALL;
+	  }
+	else
+	  {
+	    Status = MmCopyToCaller(TokenInformation, &Token->SessionId,
sizeof(ULONG));
+	  }
 	break;
 
       default:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050119/9d8dcc54/attachment.html


More information about the Ros-diffs mailing list