pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone
Blob Blame History Raw
From 57bf3ea34f2b727ffe1977de1010fdf0f62c354a Mon Sep 17 00:00:00 2001
From: Jan Cholasta <jcholast@redhat.com>
Date: Tue, 10 Dec 2013 16:32:08 +0100
Subject: [PATCH] Prevent garbage from readline on standard output of
 dogtag-ipa-retrieve-agent.

https://fedorahosted.org/freeipa/ticket/4064
---
 install/certmonger/dogtag-ipa-retrieve-agent-submit | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/install/certmonger/dogtag-ipa-retrieve-agent-submit b/install/certmonger/dogtag-ipa-retrieve-agent-submit
index 3781fc5d01da12ce2dc01e17fc60143e82fbedc6..70cbd82d7d5cc392a2877e7478f459cc8b4a570f 100644
--- a/install/certmonger/dogtag-ipa-retrieve-agent-submit
+++ b/install/certmonger/dogtag-ipa-retrieve-agent-submit
@@ -23,6 +23,10 @@
 # retrieve the updated certificate from IPA.
 
 import os
+# Prevent garbage from readline on standard output
+# (see https://fedorahosted.org/freeipa/ticket/4064)
+if not os.isatty(1):
+    os.environ['TERM'] = 'dumb'
 import sys
 import shutil
 import tempfile
-- 
1.8.4.2