Change user and group validators to match shadow-utils

This sets the regex to [a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,30}[a-zA-Z0-9_.$-]?

Also change the validators to return True/False

450613, 457124
This commit is contained in:
Rob Crittenden committed 2008-08-07 11:21:33 -04:00
1 parent fbc74a0cb4
commit 110f60da8e
12 files changed
+171 -79

No files matched your search

+1 -1
View File
@@ -347,7 +347,7 @@ def validate_nastype(nastype, variable_name=None):
return True
def validate_desc(desc, variable_name=None):
if ipavalidate.Plain(desc) != 0:
if not ipavalidate.Plain(desc):
print valid_desc_msg
return False
return True