Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uses builtin salt lgpo functions, removing external lgpo utility #56

Merged
merged 32 commits into from
Mar 19, 2020

Conversation

lorengordon
Copy link
Member

@lorengordon lorengordon commented Mar 18, 2020

Closes #29

@lorengordon
Copy link
Member Author

The terrafirm logs are here, so you can see it is working:

Due to plus3it/terrafirm#63, the codebuild jobs are not succeeding, but watchmaker is actually completing.

Copy link

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this affect standalones all-in-one feature if they have to download Apply_LGPO_Delta.exe separately?

@lorengordon
Copy link
Member Author

The standalone's have always had to download Apply_LGPO_Delta.exe. That was done by the salt state, it was not part of the watchmaker standalone package. Similar to how salt is not itself part of the watchmaker standalone package...

However, this set of patches is removing the need for Apply_LGPO_Delta.exe entirely...

Without this, for example, Disabled is accepted but 0 results in a validation
error.

With this both 0 and Disabled will work.

Disabled/0 are just examples. The code will actually lookup the acceptable
values using the policy information maintained in the lgpo execution module.
Also adds option to output policy details to help identify valid values for
all valid secedit policies
An empty string/list is used to clear the user privileges.
The salt builtin `_policyFileReplaceOrAppend()` has bugs when
the regpol file has DELETE policies, where it does not properly
match or replace the target policy.

This patch replaces `_policyFileReplaceOrAppend()` with a pure
regex-based solution that will properly match an existing policy
in the regpol file, regardless of the policy type (add value, delete
value, or delete all values)
@lorengordon
Copy link
Member Author

Going to merge this and the terrafirm pr, then kick dependabot on watchmaker to update the submodule and get a good run of the tests...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update lgpo custom python modules to use the newer LGPO.exe utility
2 participants