Ignore:
Timestamp:
Dec 18, 1999, 10:45:13 PM (26 years ago)
Author:
sandervl
Message:

Token api update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/NTDLL/ntdll.cpp

    r2122 r2128  
    1 /* $Id: ntdll.cpp,v 1.4 1999-12-18 20:01:14 sandervl Exp $ */
     1/* $Id: ntdll.cpp,v 1.5 1999-12-18 21:45:13 sandervl Exp $ */
    22
    33/*
     
    3838#include <string.h>
    3939#include <ctype.h>
    40 #include "misc.h"
     40#include <misc.h>
    4141#include "unicode.h"
    4242
     
    5252//SvL: per process heap for NTDLL
    5353HANDLE NTDLL_hHeap = 0;
     54
     55PROCESSTHREAD_SECURITYINFO ProcSecInfo = {0};
    5456
    5557/*****************************************************************************
     
    8789    switch (fdwReason) {
    8890    case DLL_PROCESS_ATTACH:
    89         NTDLL_hHeap = HeapCreate(0, 0x10000, 0);
     91    {
     92     SID_IDENTIFIER_AUTHORITY sidIdAuth = {0};
     93
     94        NTDLL_hHeap = HeapCreate(0, 0x10000, 0);
     95
     96        ProcSecInfo.dwType = SECTYPE_PROCESS;
     97        RtlAllocateAndInitializeSid(&sidIdAuth, 1, 0, 0, 0, 0, 0, 0, 0, 0, &ProcSecInfo.SidUser.User.Sid);
     98        ProcSecInfo.SidUser.User.Attributes = 0; //?????????
     99
     100        ProcSecInfo.pTokenGroups = (TOKEN_GROUPS*)Heap_Alloc(sizeof(TOKEN_GROUPS));
     101        ProcSecInfo.pTokenGroups->GroupCount = 1;
     102        RtlAllocateAndInitializeSid(&sidIdAuth, 1, 0, 0, 0, 0, 0, 0, 0, 0, &ProcSecInfo.PrimaryGroup.PrimaryGroup);
     103        ProcSecInfo.pTokenGroups->Groups[0].Sid = ProcSecInfo.PrimaryGroup.PrimaryGroup;
     104        ProcSecInfo.pTokenGroups->Groups[0].Attributes = 0; //????
     105
     106//        pPrivilegeSet   = NULL;
     107//        pTokenPrivileges= NULL;
     108//        TokenOwner      = {0};
     109//        DefaultDACL     = {0};
     110//        TokenSource     = {0};
     111        ProcSecInfo.TokenType = TokenPrimary;
    90112        break;
     113    }
    91114    case DLL_PROCESS_DETACH:
    92115        HeapDestroy(NTDLL_hHeap);
Note: See TracChangeset for help on using the changeset viewer.