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

[BUG] LGPO: Allow duplicate policies if the full path is identical #62732

Open
twangboy opened this issue Sep 21, 2022 · 0 comments
Open

[BUG] LGPO: Allow duplicate policies if the full path is identical #62732

twangboy opened this issue Sep 21, 2022 · 0 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior Execution-Module lgpo P2 Priority 2 Windows

Comments

@twangboy
Copy link
Contributor

twangboy commented Sep 21, 2022

Description
On Windows Server operating systems there are two adml/admx files for terminal services.

  • TerminalServer.adml/.admx
  • TerminalServer-Server.adml/.admx

These files share identical policy names for `Do not allow Clipboard redirection". The Server policy redirects to the original policy

Since this is basically the same policy and ends up having the exact same path, we should just resolve it and allow it to be set using just the short name.

Steps to Reproduce the behavior
On Windows Server 2016/2019

(venv) C:\src\salt>salt-call --local lgpo.get_policy_info "Do not allow Clipboard redirection" Machine
local:
    ----------
    message:
        ADML policy name "Do not allow Clipboard redirection" is used as the display name for multiple policies. These policies matched: Windows Components\Remote Desktop Services\Remote Desktop Session Host\Device and Resource Redirection\Do not allow Clipboard redirection, Windows Components\Remote Desktop Services\Remote Desktop Session Host\Device and Resource Redirection\Do not allow Clipboard redirection. You can utilize these long names to specify the correct policy
    policy_aliases:
    policy_class:
        Machine
    policy_elements:
    policy_found:
        False
    policy_name:
        Do not allow Clipboard redirection
    rights_assignment:
        False

Expected behavior
Should just return the single non-duplicate policy name

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
          Salt: 3003rc1+2846.ga6f9e76c79

Dependency Versions:
          cffi: 1.14.6
      cherrypy: 18.6.1
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: 4.0.7
     gitpython: 3.1.18
        Jinja2: 3.1.0
       libgit2: Not Installed
      M2Crypto: Not Installed
          Mako: 1.1.4
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.10.1
        pygit2: Not Installed
        Python: 3.8.13 (tags/v3.8.13:ea67321, Jun 16 2022, 15:50:48) [MSC v.1916 64 bit (AMD64)]
  python-gnupg: 0.4.8
        PyYAML: 5.4.1
         PyZMQ: 19.0.0
         smmap: 4.0.0
       timelib: 0.2.4
       Tornado: 4.5.3
           ZMQ: 4.3.2

System Versions:
          dist:
        locale: cp1252
       machine: AMD64
       release: 2019Server
        system: Windows
       version: 2019Server 10.0.17763 SP0 Multiprocessor Free```
</details>
@twangboy twangboy added Bug broken, incorrect, or confusing behavior needs-triage Windows lgpo and removed needs-triage labels Sep 21, 2022
@twangboy twangboy self-assigned this Sep 21, 2022
@twangboy twangboy added the Sulfur v3006.0 release code name and version label Sep 21, 2022
@twangboy twangboy added this to the Sulphur v3006.0 milestone Sep 21, 2022
@twangboy twangboy changed the title [BUG] [BUG] LGPO: Allow duplicate policies if the full path is identical Sep 21, 2022
@waynew waynew removed the Sulfur v3006.0 release code name and version label Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Execution-Module lgpo P2 Priority 2 Windows
Projects
None yet
Development

No branches or pull requests

2 participants