Re: [Freeipa-devel] [PATCH] 0075 handle weird values in nolog

2011-01-27 Thread Jan Zelený
Simo Sorce sso...@redhat.com wrote:
 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.


Ack,
but only a code inspection performed, since I'm not sure how to test it 
exactly.

Jan

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


Re: [Freeipa-devel] [PATCH] 0075 handle weird values in nolog

2011-01-27 Thread Simo Sorce
On Thu, 2011-01-27 at 11:43 +0100, Jan Zelený wrote:
 Simo Sorce sso...@redhat.com wrote:
  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.
 
 
 Ack,
 but only a code inspection performed, since I'm not sure how to test it 
 exactly.

If you want to test:
install replica, kinit admin, then run ipa-replica-manage re-initialize
--from other.master.com

W/o the patch it throws an error after it is done, w/ the patch it
terminates w/o errors.

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York

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

Re: [Freeipa-devel] [PATCH] 0075 handle weird values in nolog

2011-01-27 Thread Simo Sorce
On Thu, 2011-01-27 at 11:43 +0100, Jan Zelený wrote:
 
 Ack,
 but only a code inspection performed, since I'm not sure how to test
 it 
 exactly.

Pushed to master (I tested it extensively).

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York

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

[Freeipa-devel] [PATCH] 0075 handle weird values in nolog

2011-01-26 Thread Simo Sorce

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, '')
 stdout = stdout.replace(value, '')
 stderr = stderr.replace(value, '')
-- 
1.7.3.4

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