When using ipa-replica-manage re-initialize with GSSAPI credentials it
turns out that the DN password may be set to None and this can end up in
the nolog list.

Add a check to skip any non-string object in the log substitution list,
so that the code doesn't freak out on None objects.

Ticket #856

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York
>From 70ad80b34b518b82c5dd9334e2db6c653da12649 Mon Sep 17 00:00:00 2001
From: Simo Sorce <sso...@redhat.com>
Date: Wed, 26 Jan 2011 17:37:46 -0500
Subject: [PATCH 3/3] Handle nolog list containing None values

Fixes: https://fedorahosted.org/freeipa/ticket/856
---
 ipapython/ipautil.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/ipapython/ipautil.py b/ipapython/ipautil.py
index 88d0836549ebfd87b2251b6491ee7bd2c38a1ab8..7a91dcba0a9bd1e9839daeaf056adf4ab22a5bb5 100644
--- a/ipapython/ipautil.py
+++ b/ipapython/ipautil.py
@@ -136,6 +136,8 @@ def run(args, stdin=None, raiseonerr=True,
     # to log. Run through the nolog items.
     args = ' '.join(args)
     for value in nolog:
+        if not isinstance(value, basestring):
+            continue
         args = args.replace(value, 'XXXXXXXX')
         stdout = stdout.replace(value, 'XXXXXXXX')
         stderr = stderr.replace(value, 'XXXXXXXX')
-- 
1.7.3.4

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to