4 # Helper for domtool to check if a vmail password matches the stored
5 # password, before allowing the portal to change the password. This
6 # should never be run manually, since it does not suppress echoing of
9 import crypt
, getpass
, sys
14 return (crypted
, clear
)
16 def checkpassword (crypted
, clear
):
17 return crypt
.crypt (clear
, crypted
) == crypted
20 (crypted
, clear
) = getpasswords ()
21 if checkpassword (crypted
, clear
):
26 if __name__
== "__main__":