From 13a255516fb1f9c8b051218eb64b47d77db2df9e Mon Sep 17 00:00:00 2001 From: equinox Date: Tue, 27 Sep 2011 02:31:16 +0200 Subject: fork off and call kprop() (kprop takes around 20 seconds to finish) --- index.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/index.py b/index.py index 6432919..c68ec64 100755 --- a/index.py +++ b/index.py @@ -118,6 +118,9 @@ class SubdapSite(object): return render(errors = errors, username = username) accountservice.name_create(username, password) + if os.fork() == 0: + accountservice.kprop() + os._exit(0) return s.login(username, password) @expose('pwchange.html') @@ -137,11 +140,15 @@ class SubdapSite(object): try: assert kerberos.changePassword(username + '@SUBLAB.ORG', oldpassword, password) == True except kerberos.PwdChangeError, e: - return render(errors = {'password2': str(e.message)}, username = username) + return render(errors = {'password2': str(e[0])}, username = username) + + if os.fork() == 0: + accountservice.kprop() + os._exit(0) return s.selectpage(l, dn, '''Your password has been changed -- - please note that it may take up to 10 minutes for Kerberos to update + please note that it may take a few minutes for Kerberos to update its three heads. At any moment, either your old password or your new password will work.''') -- cgit v1.2.1