make su promt AIX compatible

$ su suuser date
suusers's Password:
This commit is contained in:
Henk Wiedig 2015-02-10 05:18:37 -05:00
parent 7c86db3187
commit 0a902a5afd

View file

@ -53,7 +53,7 @@ SU_PROMPT_LOCALIZATIONS = [
'密碼',
]
SU_PROMPT_LOCALIZATIONS_RE = re.compile("|".join([x + ' ?: ?' for x in SU_PROMPT_LOCALIZATIONS]), flags=re.IGNORECASE)
SU_PROMPT_LOCALIZATIONS_RE = re.compile("|".join(['(\w+\'s )?' + x + ' ?: ?' for x in SU_PROMPT_LOCALIZATIONS]), flags=re.IGNORECASE)
def check_su_prompt(data):
return bool(SU_PROMPT_LOCALIZATIONS_RE.match(data))