gp: Support more global trust directories
authorGabriel Nagy <gabriel.nagy@canonical.com>
Wed, 16 Aug 2023 22:05:54 +0000 (01:05 +0300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 28 Aug 2023 02:04:36 +0000 (02:04 +0000)
commita1b285e485c0b5a8747499bdbbb9f3f4fc025b2f
treeb138d08c5e88e0746dc2054496c1d9997152b269
parent776597bce922d291257e34f1e3304227265a1dbc
gp: Support more global trust directories

In addition to the SUSE global trust directory, add support for RHEL and
Debian-based distributions (including Ubuntu).

To determine the correct directory to use, we iterate over the variants
and stop at the first which is a directory.

In case none is found, fallback to the first option which will produce a
warning as it did previously.

Signed-off-by: Gabriel Nagy <gabriel.nagy@canonical.com>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: David Mulder <dmulder@samba.org>
python/samba/gp/gp_cert_auto_enroll_ext.py