mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
ipa-backup: backup the PKCS module config files setup by IPA
ipa installer creates /etc/pkcs11/modules/softhsm2.module in order to disable global p11-kit configuration for NSS. This file was not included in the backups, and not restored. The fix adds the file to the list of files to include in a backup. Fixes: https://pagure.io/freeipa/issue/8073 Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
parent
c11fd328bc
commit
055ea253df
@ -338,6 +338,11 @@ class BaseTaskNamespace:
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def get_pkcs11_modules(self):
|
||||
"""Return the list of module config files setup by IPA.
|
||||
"""
|
||||
return ()
|
||||
|
||||
def configure_nsswitch_database(self, fstore, database, services,
|
||||
preserve=True, append=True,
|
||||
default_value=()):
|
||||
|
@ -744,6 +744,13 @@ class RedHatTaskNamespace(BaseTaskNamespace):
|
||||
|
||||
return filenames
|
||||
|
||||
def get_pkcs11_modules(self):
|
||||
"""Return the list of module config files setup by IPA
|
||||
"""
|
||||
return tuple(os.path.join(paths.ETC_PKCS11_MODULES_DIR,
|
||||
"{}.module".format(name))
|
||||
for name, _module, _disabled in PKCS11_MODULES)
|
||||
|
||||
def enable_ldap_automount(self, statestore):
|
||||
"""
|
||||
Point automount to ldap in nsswitch.conf.
|
||||
|
@ -194,7 +194,7 @@ class Backup(admintool.AdminTool):
|
||||
) + tuple(
|
||||
os.path.join(paths.IPA_NSSDB_DIR, file)
|
||||
for file in (certdb.NSS_DBM_FILES + certdb.NSS_SQL_FILES)
|
||||
)
|
||||
) + tasks.get_pkcs11_modules()
|
||||
|
||||
logs=(
|
||||
paths.VAR_LOG_PKI_DIR,
|
||||
|
Loading…
Reference in New Issue
Block a user