GP_LINK class is used to get GPO links from AD DC. gpo_parse_gplink is parsing links we get from DC, and it doesn't handle empty link that looks like '[ ]'. If there is an empty link for whatever reason, samba-gpupdate fails on getting GPOs. Proposition: Add check for the link to not be empty, e.g. check if ';' that separates LDAP link and options exists. Later we assume that semicolon is there.
MR: https://gitlab.com/samba-team/samba/-/merge_requests/4097
This bug was referenced in samba master: 44ee31c0258b0afb3d3f2ce17942cc86e308a690
This probably affects 4.19+, post a8bad5d5b859a2a76ce18919fbe2bf42f8ef7562 (2023-04), but I'm not aware of reports of it causing problems. Do we want to backport?
Created attachment 18671 [details] patch for 4.22 and 4.21
For 4.21 and 4.22, thanks.