3 modified files
reactos/include/ntos
diff -u -r1.18 -r1.19
--- security.h 25 Jul 2004 12:36:45 -0000 1.18
+++ security.h 10 Aug 2004 20:13:38 -0000 1.19
@@ -176,7 +176,14 @@
TokenSource,
TokenType,
TokenImpersonationLevel,
- TokenStatistics
+ TokenStatistics,
+ TokenRestrictedSids,
+ TokenSessionId,
+ TokenGroupsAndPrivileges,
+ TokenSessionReference,
+ TokenSandBoxInert,
+ TokenAuditPolicy,
+ TokenOrigin
} TOKEN_INFORMATION_CLASS;
typedef ULONG SECURITY_IMPERSONATION_LEVEL, *PSECURITY_IMPERSONATION_LEVEL;
@@ -343,6 +350,10 @@
LUID ModifiedId;
} TOKEN_STATISTICS, *PTOKEN_STATISTICS;
+typedef struct _TOKEN_ORIGIN {
+ LUID OriginatingLogonSession;
+} TOKEN_ORIGIN, *PTOKEN_ORIGIN;
+
typedef struct _GENERIC_MAPPING
{
ACCESS_MASK GenericRead;
reactos/w32api/include
diff -u -r1.3 -r1.4
--- winnt.h 13 Jun 2004 20:04:56 -0000 1.3
+++ winnt.h 10 Aug 2004 20:13:42 -0000 1.4
@@ -2063,6 +2063,21 @@
DWORD GroupCount;
SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY];
} TOKEN_GROUPS,*PTOKEN_GROUPS,*LPTOKEN_GROUPS;
+typedef struct _TOKEN_GROUPS_AND_PRIVILEGES {
+ ULONG SidCount;
+ ULONG SidLength;
+ PSID_AND_ATTRIBUTES Sids;
+ ULONG RestrictedSidCount;
+ ULONG RestrictedSidLength;
+ PSID_AND_ATTRIBUTES RestrictedSids;
+ ULONG PrivilegeCount;
+ ULONG PrivilegeLength;
+ PLUID_AND_ATTRIBUTES Privileges;
+ LUID AuthenticationId;
+} TOKEN_GROUPS_AND_PRIVILEGES, *PTOKEN_GROUPS_AND_PRIVILEGES;
+typedef struct _TOKEN_ORIGIN {
+ LUID OriginatingLogonSession;
+} TOKEN_ORIGIN, *PTOKEN_ORIGIN;
typedef struct _TOKEN_OWNER {
PSID Owner;
} TOKEN_OWNER,*PTOKEN_OWNER;
@@ -2107,7 +2122,8 @@
TokenUser=1,TokenGroups,TokenPrivileges,TokenOwner,
TokenPrimaryGroup,TokenDefaultDacl,TokenSource,TokenType,
TokenImpersonationLevel,TokenStatistics,TokenRestrictedSids,
- TokenSessionId
+ TokenSessionId,TokenGroupsAndPrivileges,TokenSessionReference,
+ TokenSandBoxInert,TokenAuditPolicy,TokenOrigin,
} TOKEN_INFORMATION_CLASS;
typedef enum _SID_NAME_USE {
SidTypeUser=1,SidTypeGroup,SidTypeDomain,SidTypeAlias,
reactos/ntoskrnl/se
diff -u -r1.38 -r1.39
--- token.c 3 Aug 2004 19:20:39 -0000 1.38
+++ token.c 10 Aug 2004 20:13:42 -0000 1.39
@@ -1,4 +1,4 @@
-/* $Id: token.c,v 1.38 2004/08/03 19:20:39 ion Exp $
+/* $Id: token.c,v 1.39 2004/08/10 20:13:42 gvg Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -569,7 +569,7 @@
IN ULONG TokenInformationLength,
OUT PULONG ReturnLength)
{
- NTSTATUS Status;
+ NTSTATUS Status, LengthStatus;
PVOID UnusedInfo;
PVOID EndMem;
PACCESS_TOKEN Token;
@@ -807,6 +807,50 @@
Status = STATUS_SUCCESS;
}
break;
+
+ case TokenOrigin:
+ DPRINT1("NtQueryInformationToken(TokenOrigin)\n");
+ if (TokenInformationLength < sizeof(TOKEN_ORIGIN))
+ {
+ Status = STATUS_BUFFER_TOO_SMALL;
+ }
+ else
+ {
+ Status = MmCopyToCaller(&((PTOKEN_ORIGIN)TokenInformation)->OriginatingLogonSession,
+ &Token->AuthenticationId, sizeof(LUID));
+ }
+ Length = sizeof(TOKEN_ORIGIN);
+ LengthStatus = MmCopyToCaller(ReturnLength, &Length, sizeof(ULONG));
+ if (NT_SUCCESS(Status))
+ {
+ Status = LengthStatus;
+ }
+ break;
+
+ case TokenGroupsAndPrivileges:
+ DPRINT1("NtQueryInformationToken(TokenGroupsAndPrivileges) not implemented\n");
+ Status = STATUS_NOT_IMPLEMENTED;
+ break;
+
+ case TokenRestrictedSids:
+ DPRINT1("NtQueryInformationToken(TokenRestrictedSids) not implemented\n");
+ Status = STATUS_NOT_IMPLEMENTED;
+ break;
+
+ case TokenSandBoxInert:
+ DPRINT1("NtQueryInformationToken(TokenSandboxInert) not implemented\n");
+ Status = STATUS_NOT_IMPLEMENTED;
+ break;
+
+ case TokenSessionId:
+ DPRINT1("NtQueryInformationToken(TokenSessionId) not implemented\n");
+ Status = STATUS_NOT_IMPLEMENTED;
+ break;
+
+ default:
+ DPRINT1("NtQueryInformationToken(%d) invalid parameter\n");
+ Status = STATUS_INVALID_PARAMETER;
+ break;
}
ObDereferenceObject(Token);
CVSspam 0.2.8