forked from 0ad/0ad
by default, don't attempt to start the aken driver
addresses security concerns [http://www.wildfiregames.com/forum/index.php?showtopic=15482] This was SVN commit r10858.
This commit is contained in:
parent
c5cb50421f
commit
785b6efa4b
@ -80,4 +80,17 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// allow an attempt to start the Aken driver (i.e. service) at runtime.
|
||||
// enable at your own risk on WinXP systems to allow access to
|
||||
// better timers than Windows provides. on newer Windows versions,
|
||||
// attempts to start the service from code fail unless the process
|
||||
// is elevated, and definitely fail due to lack of cross-signing unless
|
||||
// test-signing mode is active.
|
||||
// if the user has taken explicit action to install and start the
|
||||
// service via aken_install.bat, mahaf.cpp will be able to access it
|
||||
// even if this is defined to 0.
|
||||
#ifndef CONFIG2_MAHAF_ATTEMPT_DRIVER_START
|
||||
# define CONFIG2_MAHAF_ATTEMPT_DRIVER_START 0
|
||||
#endif
|
||||
|
||||
#endif // #ifndef INCLUDED_CONFIG2
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "precompiled.h"
|
||||
#include "lib/sysdep/os/win/mahaf.h"
|
||||
|
||||
#include "lib/config2.h"
|
||||
#include "lib/module_init.h"
|
||||
|
||||
#include "lib/sysdep/os/win/wutil.h"
|
||||
@ -347,10 +348,12 @@ static Status Init()
|
||||
if(wutil_HasCommandLineArgument(L"-wNoMahaf"))
|
||||
return ERR::NOT_SUPPORTED; // NOWARN
|
||||
|
||||
#if CONFIG2_MAHAF_ATTEMPT_DRIVER_START
|
||||
{
|
||||
const OsPath driverPathname = DriverPathname();
|
||||
StartDriver(driverPathname);
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
const DWORD shareMode = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user