PRB: ??? LogonUser ?? ?????? ISAPI

?????? ????????? ?????? ?????????
???? ???????: 232513 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

???????

???? ISAPI ???? ?? ???? ???? ???????? ??????? ????. ??? ????? ?????? ?????? ??? ????? ??? ???? ??? ?????? ??? ????????, ????? ??????? LogonUser ????? ?????? ??? ??? ????????? ?????? ???? ISAPI ?????? ?? ??????? ImpersonateLoggedonUser ?????? ??? ???????? ???? ???? ??? ?????? ????????. ???? ??? ??????? LogonUser ?????? GetLastError ERROR_ACCESS_DENIED ??? ????? ?? ?? ???????? ??????? ???? ????? ???????? SE_TCB_NAME ???????? SE_CHANGE_NOTIFY_NAME ????? (?????? ???? ???????.)

?????

????? ????????? ???????? ???? LogonUser ??? ????? ?????? ???????. ??? ??? ?????? ??? ??????? ?? ???? ???? ?? ?????? ??? ????? ?????? ??????? (SYSTEM ??? ??? inproc ISAPI.)

????

??? ???? ????? ??????? RevertToSelf ?????? ???? ??????? ??? ???? ?????? ????? ????? ?????? ??????? ??? ??????? LogonUser. ??????? ISAPI ????? inproc ?? ???? ?????? ????? ??????. ??? ?? ?????? ?????? ????? ?????? ??? ??? ???? ??????? ???? ?? ??? ??? ??????? ?? ???? ?????? ?????? ??? ??? ?? ?????.
BOOL bThreadToken = FALSE;
HANDLE hThreadToken1, hThreadToken2;

//Save the current thread token
if( OpenThreadToken(GetCurrentThread(), TOKEN_IMPERSONATE, FALSE, &hThreadToken1) )
{
   RevertToSelf();
   bThreadToken = TRUE;
}

//Impersonate a user account
//Insure the Sid associated with the process holds SE_TCB_NAME Privilege
LogonUser(...);
ImpersonateLoggedOnUser(...);

//Restore the original thread token
if( bThreadToken )
{
   hThreadToken2 = GetCurrentThread();
   SetThreadToken( &hThreadToken2, hThreadToken1 );
   CloseHandle( hThreadToken1 );
}
				

?????

????? ??? ?????? ??? ???????. ???? ?????? ??? ???? ?? ????????? ??? ????? ??????? LogOnUser ?? helpfile ?? ??? api.

??????? ????

????? ??? ?????? ???? ??????? ISAPI (OOP) ???? ??????? ??? ?????? ??? IIS4 ????? ??? ??????? ???? ???? ?? ???? ????? ?? ?????? ??????? ????????. ????? ?? ????? ???? ?????? ????? ISAPIs OOP.

?? ??? ?????? ???????? SE_TCB_NAME ??????? IUSR_MACHINE ?? IWAM_MACHINE ?? ?? ??? ?????? ?? ???? ??? ???????? Administrators. ???? ???? ?????? ?? ????? ?????? ?????.

???????

???? ???????: 232513 - ????? ??? ??????: 11/???? ?????/1424 - ??????: 2.1
????? ???
  • Microsoft Windows NT Server 4.0 Standard Edition
  • Microsoft Windows NT 4.0 Service Pack 4
  • Microsoft Windows NT Workstation 4.0 Developer Edition
  • Microsoft Windows NT Workstation 4.0 Developer Edition
  • Microsoft Internet Server Application Programming Interface 4.0
????? ??????: 
kbmt kbhttp kbprb KB232513 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????232513

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com