make su promt AIX compatible

$ su suuser date
suusers's Password:
release1.8.3
Henk Wiedig 10 years ago committed by James Cammarata
parent 8be7716064
commit 55a2d370b0

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

Loading…
Cancel
Save