Report the NSS database directory if it cannot be opened

If the system lacks DBM support and an older database is
opened then an exception is raised. Include the directory in
the exception so it is clearer which database cannot be opened.

https://pagure.io/freeipa/issue/8675

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Stanislav Levin <slev@altlinux.org>
This commit is contained in:
Rob Crittenden
2021-01-27 12:26:00 -05:00
committed by Florence Blanc-Renaud
parent 2c499e06f1
commit 693ac70964

View File

@@ -265,7 +265,8 @@ class NSSDatabase:
if dbtype == "dbm" and not nss_supports_dbm():
raise ValueError(
"NSS is built without support of the legacy database(DBM)"
f"NSS is built without support of the legacy database(DBM) "
f"directory '{nssdir}'",
)
if nssdir is None: