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>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
This commit is contained in:
Rob Crittenden authored and Florence Blanc-Renaud committed 2021-01-31 15:07:57 +01:00
1 parent 5ab290a048
commit b71c0c6784
1 file changed
+2 -1
+2 -1
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: