-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow sssd backend to work without ad_domain
This restores the functionality prior to the refactor in PR #467, where the case of having a domain section without the ad_domain setting resorted to using the domain from the sssd.domains setting. This is valid behavior supported and suggested[1] by sssd. In addition to that, avoid being too lenient and still raise an error if the domain section is empty or does not exist. Fixes #910 / UDENG-2268 [1] https://sssd.io/docs/ad/ad-provider-manual.html#id4
- Loading branch information
1 parent
9a792dd
commit 4918afd
Showing
5 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
internal/ad/backends/sss/testdata/TestSSSD/configs/example.com-without-ad_domain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[sssd] | ||
domains = example.com | ||
|
||
[domain/example.com] | ||
id_provider = ad |
4 changes: 4 additions & 0 deletions
4
internal/ad/backends/sss/testdata/TestSSSD/configs/sssddomain-empty-section
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[sssd] | ||
domains=empty-section.com | ||
|
||
[domain/empty-section.com] |
9 changes: 9 additions & 0 deletions
9
internal/ad/backends/sss/testdata/TestSSSD/golden/use_domain_from_section_if_no_ad_domain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
* Domain(): example.com | ||
* ServerFQDN(): dynamic_active_server.example.com | ||
* IsOnline(): true | ||
* HostKrb5CCName(): /var/lib/sss/db/ccache_EXAMPLE.COM | ||
* DefaultDomainSuffix(): example.com | ||
* Config(): | ||
Current backend is SSSD | ||
Configuration: testdata/TestSSSD/configs/example.com-without-ad_domain | ||
Cache: /var/lib/sss/db |