mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
cmd/cli: lowercase AD domain to be consistent with network rules
While at it, also add a note that the domain comparison are done in case-insensitive manner.
This commit is contained in:
committed by
Cuong Manh Le
parent
da91aabc35
commit
484643e114
@@ -18,6 +18,9 @@ func addExtraSplitDnsRule(cfg *ctrld.Config) bool {
|
|||||||
mainLog.Load().Debug().Msg("no active directory domain found")
|
mainLog.Load().Debug().Msg("no active directory domain found")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
// Network rules are lowercase during toml config marshaling,
|
||||||
|
// lowercase the domain here too for consistency.
|
||||||
|
domain = strings.ToLower(domain)
|
||||||
for n, lc := range cfg.Listener {
|
for n, lc := range cfg.Listener {
|
||||||
if lc.Policy == nil {
|
if lc.Policy == nil {
|
||||||
lc.Policy = &ctrld.ListenerPolicyConfig{}
|
lc.Policy = &ctrld.ListenerPolicyConfig{}
|
||||||
|
|||||||
@@ -564,6 +564,12 @@ And within each policy, the rules are processed from top to bottom.
|
|||||||
- Required: no
|
- Required: no
|
||||||
- Default: []
|
- Default: []
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Note that the domain comparisons are done in case in-sensitive manner following [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034#section-3.1)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### macs:
|
### macs:
|
||||||
`macs` is the list of mac rules within the policy. Mac address value is case-insensitive.
|
`macs` is the list of mac rules within the policy. Mac address value is case-insensitive.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user