Skip to content

Commit 4b3d570

Browse files
committed
drop restrictDriverAccessCls
Change-Id: I34a02cdfd90cb5615d9e9de65fb23d039a34093e
1 parent 54bb537 commit 4b3d570

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

‎src/utils.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,7 @@ bool readMapFromSysFS(const char * path, std::unordered_map<std::string, uint32>
12621262

12631263
#ifdef _MSC_VER
12641264

1265+
//! restrict usage of driver to system (SY) and builtin admins (BA)
12651266
void restrictDriverAccessNative(LPCTSTR path)
12661267
{
12671268
PSECURITY_DESCRIPTOR pSD = nullptr;

‎src/windows/restrictDriverAccess.cpp‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,4 @@ namespace pcm {
1313
#endif
1414
#endif // _MSC_VER
1515

16-
//! restrict usage of driver to system (SY) and builtin admins (BA)
17-
void restrictDriverAccessCls(LPCTSTR path)
18-
{
19-
try {
20-
System::Security::AccessControl::FileSecurity^ fSecurity = System::IO::File::GetAccessControl(gcnew System::String(path));
21-
fSecurity->SetSecurityDescriptorSddlForm("O:BAG:SYD:(A;;FA;;;SY)(A;;FA;;;BA)");
22-
System::IO::File::SetAccessControl(gcnew System::String(path), fSecurity);
23-
}
24-
catch (...)
25-
{
26-
tcerr << "Error in GetAccessControl/SetSecurityDescriptorSddlForm for " << path << " driver.\n";
27-
}
28-
}
29-
3016
} // namespace pcm

0 commit comments

Comments
 (0)