savannah-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Savannah-hackers] Trouble with kerberos, @gnu.org mail aliases ? UPDATE


From: Mathieu Roy
Subject: [Savannah-hackers] Trouble with kerberos, @gnu.org mail aliases ? UPDATE2
Date: 10 Aug 2002 12:19:50 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

This is the part of code (unchanged since a long time) concerned.

$krb5ret = krb5_login($HTTP_POST_VARS['form_loginname'], 
$HTTP_POST_VARS['form_pw']);
if($krb5ret == -1) { // KRB5_NOTOK
        $GLOBALS['register_error'] = "phpkrb5 module failure";
        return 0;
}
if($krb5ret == 1) { // KRB5_BAD_PASSWORD
        $GLOBALS['register_error'] = "User is a kerberos principal but password 
do not match. Please use your kerberos password for the first login and then 
change your" . $GLOBALS['sys_name'] . " password. This is necessary to prevent 
someone from stealing your account name.";
        return 0;
}
if($krb5ret == 2) { // KRB5_BAD_USER
        if(is_emailable_address($HTTP_POST_VARS['form_loginname'] . "@" . 
$GLOBALS['sys_lists_domain'])) {
                $GLOBALS['register_error'] = "User " . 
$HTTP_POST_VARS['form_loginname'] . " is a known mail alias and cannot be used. 
If you own this alias (" . $HTTP_POST_VARS['form_loginname'] . "@" . 
$GLOBALS['sys_lists_domain'] . ") please create a another user (for instance 
xx"  . $HTTP_POST_VARS['form_loginname'] . ") and ask " . 
$GLOBALS['sys_admin_list'] . "@" . $GLOBALS['sys_lists_domain'] . " to rename 
it to "  . $HTTP_POST_VARS['form_loginname'] . ".";
        return 0;
        }
}

We always get $krb5ret == 2
I do not know how works krb5_login, I think this was address@hidden who
set this. krb5* are not standard PHP function (nothing found in the
PHP manual - may it be in the kerberos manual ?)
Anyway, it used to work well since the old ages.




-- 
Mathieu Roy
 
http://savannah.gnu.org/users/yeupou
http://yeupou.coleumes.org
http://gpg.coleumes.org (GPG Key)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]