Skip to content

Commit

Permalink
all rights, so you can also delete files
Browse files Browse the repository at this point in the history
  • Loading branch information
partouf committed Nov 22, 2023
1 parent 3150e5c commit 3caa3a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ DWORD execute_using_appcontainer(const cewrapper::Job &job)

if (config.debugging)
std::wcerr << "granting access to: " << home_dir << "\n";
cewrapper::grant_access_to_path(container.getSid(), home_dir.data(), GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE);
cewrapper::grant_access_to_path(container.getSid(), home_dir.data(), GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL);

for (auto &allowed : config.allowed_dirs)
{
Expand All @@ -197,7 +197,7 @@ DWORD execute_using_appcontainer(const cewrapper::Job &job)

if (config.debugging)
std::wcerr << "revoking access to: " << home_dir << "\n";
cewrapper::remove_access_to_path(container.getSid(), home_dir.data(), GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE);
cewrapper::remove_access_to_path(container.getSid(), home_dir.data(), GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL);

return processExitCode;
}
Expand Down

0 comments on commit 3caa3a3

Please sign in to comment.