Skip to content

Commit

Permalink
cleanup acls for extra configured paths
Browse files Browse the repository at this point in the history
  • Loading branch information
partouf committed Feb 23, 2024
1 parent 3caa3a3 commit 1487d90
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,13 @@ DWORD execute_using_appcontainer(const cewrapper::Job &job)
std::wcerr << "revoking access to: " << home_dir << "\n";
cewrapper::remove_access_to_path(container.getSid(), home_dir.data(), GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL);

for (auto &allowed : config.allowed_dirs)
{
if (config.debugging)
std::wcerr << "revoking access to: " << allowed.path << "\n";
cewrapper::remove_access_to_path(container.getSid(), allowed.path.data(), allowed.rights);
}

return processExitCode;
}

Expand Down

0 comments on commit 1487d90

Please sign in to comment.