Skip to content

roles: add gpo filesyspath method#260

Open
danlavu wants to merge 1 commit into
SSSD:masterfrom
danlavu:gpo-gpcpath
Open

roles: add gpo filesyspath method#260
danlavu wants to merge 1 commit into
SSSD:masterfrom
danlavu:gpo-gpcpath

Conversation

@danlavu

@danlavu danlavu commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

needed to configure an invalid gpcfilesyspath value.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new filesyspath method to the GenericGPO interface, with corresponding implementations in the Active Directory (GPO) and Samba (SambaGPO) roles to allow overwriting the gPCFileSysPath attribute. The review feedback correctly identifies an issue in the Active Directory implementation where PowerShell failures are masked by an explicit Exit 0, and suggests setting $ErrorActionPreference = "Stop" to ensure errors are properly propagated.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread sssd_test_framework/roles/ad.py
Comment thread sssd_test_framework/roles/generic.py Outdated
:return: Self.
:rtype: GenericGPO
"""
pass

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
pass
raise NotImplementedError()

We should make sure this fails properly if used incorrectly.

Comment on lines +2260 to +2271
"""
Overwrite the GPO's ``gPCFileSysPath`` attribute.

Implements :meth:`GenericGPO.filesyspath`.

Used only to set up 'test_gpo__rejects_path_traversal_in_gpo_file_sys_path' test case.

:param path: gPCFileSysPath value.
:type path: str
:return: Group policy object
:rtype: GPO
"""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The docstring could use some tweaks.
The absstract method is hopefully not used in "test_gpo__rejects_path_traversal_in_gpo_file_sys_path"

An if it is we want proper exception.

needed to configure an invalid gpcfilesyspath value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants