Blob Blame History Raw
From d385d452001c91d01893b5ddc9e47f8200223ce9 Mon Sep 17 00:00:00 2001
From: Mark Reynolds <mreynolds@redhat.com>
Date: Mon, 11 Jun 2018 11:52:57 -0400
Subject: [PATCH] Ticket 49576 - ds-replcheck: fix certificate directory
 verification

Description:  The tool would crash if you attempted to use a certificate
              directory for conntacting replicas.

https://pagure.io/389-ds-base/issue/49576

Reviewed by: spichugi(Thanks!)
---
 ldap/admin/src/scripts/ds-replcheck | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ldap/admin/src/scripts/ds-replcheck b/ldap/admin/src/scripts/ds-replcheck
index 661c9e0ce..62f911034 100755
--- a/ldap/admin/src/scripts/ds-replcheck
+++ b/ldap/admin/src/scripts/ds-replcheck
@@ -1225,7 +1225,7 @@ def main():
     # Validate certdir
     opts['certdir'] = None
     if args.certdir:
-        if os.path.exists() and os.path.isdir(certdir):
+        if os.path.exists(args.certdir) and os.path.isdir(args.certdir):
             opts['certdir'] = args.certdir
         else:
             print("certificate directory ({}) does not exist or is not a directory".format(args.certdir))
-- 
2.17.0