-
Notifications
You must be signed in to change notification settings - Fork 163
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
win_audit_rule reports unhandled exception when changing audit rule on a protected OS file #17
Comments
From @ShachafGoldstein on Mar 01, 2020 02:31 Can you please post the output of I vaguely remember that specific file not always present, on my win10 machine it is not there. |
From @Castingnet on Mar 08, 2020 03:56 The bootmgr is there when I use the command provided. And currently, I worked around the issue by using win_shell module. So I could make sure the file does exist. Yes, it's not present by default. To show system protected file, you need follow the guide below: Here is the output for my system:
|
bugfixes: - win_audit_rule - Fix exception when trying to change a rule on a hidden or protected system file - ansible-collections/community.windows#17 -ansible#67642
From @Castingnet on Feb 21, 2020 09:41
SUMMARY
win_audit_rule will try to get item type before doing the rule setting, (Get-Item $path).GetType() will work for most cases but not for a protected OS file, for example, C:\bootmgr.
To make it work for this scenario, a force is expected.
(Get-Item -force $path).GetType()
ISSUE TYPE
COMPONENT NAME
module win_audit_rule
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Target: windows system
STEPS TO REPRODUCE
EXPECTED RESULTS
win_audit_rule could change audit rule of a protected OS file without any exception
ACTUAL RESULTS
Copied from original issue: ansible/ansible#67642
The text was updated successfully, but these errors were encountered: