From 9fa0419ddf4ac7d048715fca648d5faffc31f77b Mon Sep 17 00:00:00 2001
From: Thomas Woerner <twoerner@redhat.com>
Date: Mon, 18 Sep 2017 17:36:11 +0200
Subject: [PATCH] library/ipanss.py: Check if principal is an empty string

---
 library/ipanss.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/ipanss.py b/library/ipanss.py
index 8b523991..3eb3826e 100644
--- a/library/ipanss.py
+++ b/library/ipanss.py
@@ -332,7 +332,7 @@ def main():
     # Check that nss is working properly
     if not on_master:
         user = principal
-        if user is None:
+        if user is None or user == "":
             user = "admin@%s" % domain
             module.log("Principal is not set when enrolling with OTP"
                        "; using principal '%s' for 'getent passwd'" % user)
-- 
GitLab