[ros-kernel] ReactOS is not loading auto-start drivers anymore

Aleksey Bragin aleksey at studiocerebral.com
Mon Apr 12 11:04:17 CEST 2004


Even no GPRS?!


WBR,
Aleksey Bragin.
  ----- Original Message ----- 
  From: Richard Campbell 
  To: ReactOS Kernel List 
  Sent: Monday, April 12, 2004 3:21 AM
  Subject: Re: [ros-kernel] ReactOS is not loading auto-start drivers anymore


  it's privilege :-)

  *shuts up*

  i'm moving as of tomorrow, no net access where i'm going...cyas in 3 months :)

  ----- Original Message ----- 
  From: "Filip Navara" <xnavara at volny.cz>
  To: "ReactOS Kernel List" <ros-kernel at reactos.com>
  Sent: Sunday, April 11, 2004 12:06 PM
  Subject: Re: [ros-kernel] ReactOS is not loading auto-start drivers anymore


  > Jason Filby wrote:
  > 
  > >It looks like its a problem with privileges. I just committed an
  > >updated 
  > >ntoskrnl/io/driver.c, which when you commented out NDEBUG, shows a 
  > >message on failure:
  > >(io/driver.c:1519) Privilege not held
  > >
  > >In NtLoadDriver, the first call (to SeSinglePrivilegeCheck), fails.
  > >But 
  > >I'm not yet sure why.
  > >  
  > >
  > You're right Jason. The "services" application doesn't acquire the Load 
  > Driver privilage.
  > Here is the code, add it to "subsys/system/services/services.c" above 
  > WinMain and then call it somewhere there :
  > 
  > VOID FASTCALL
  > AcquireLoadDriverPrivilage(VOID)
  > {
  >     HANDLE hProcess;
  >     HANDLE hToken;
  >     TOKEN_PRIVILEGES tkp;
  > 
  >     /* Change our priority class to HIGH */
  >     hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, 
  > GetCurrentProcessId());
  >     SetPriorityClass(hProcess, HIGH_PRIORITY_CLASS);
  >     CloseHandle(hProcess);
  > 
  >     /* Get a token for this process.  */
  >     if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | 
  > TOKEN_QUERY, &hToken)) {
  >         /* Get the LUID for the debug privilege.  */
  >         LookupPrivilegeValue(NULL, SE_LOAD_DRIVER_NAME, 
  > &tkp.Privileges[0].Luid);
  > 
  >         tkp.PrivilegeCount = 1;  /* one privilege to set */
  >         tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
  > 
  >         /* Get the debug privilege for this process. */
  >         AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, 
  > (PTOKEN_PRIVILEGES)NULL, 0);
  >     }
  > }
  > 
  > 
  > - Filip
  > _______________________________________________
  > Ros-kernel mailing list
  > Ros-kernel at reactos.com
  > http://reactos.com/mailman/listinfo/ros-kernel 


------------------------------------------------------------------------------


  _______________________________________________
  Ros-kernel mailing list
  Ros-kernel at reactos.com
  http://reactos.com/mailman/listinfo/ros-kernel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://reactos.com:8080/pipermail/ros-kernel/attachments/20040412/5d78d4ba/attachment.htm


More information about the Ros-kernel mailing list