library/ipanss.py: Check if principal is an empty string

This commit is contained in:
Thomas Woerner
2017-09-18 17:36:11 +02:00
parent 0a8672fcb5
commit 9fa0419ddf

View File

@@ -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)