krb5_change_password returns non zero but still changes password

snacktime snacktime at gmail.com
Mon Sep 18 19:32:50 EDT 2006


I'm fairly new to C programming so this could be something I am just
missing, but I can't figure this one out.  The following code is in a
ruby C extension (hence the INT2NUM), and it works, but the value of
krbret gets set to -1765328346 (Incorrect net address).  This is mit
kerberos 5-1.4.3 on freebsd 6.1.  As new as I am I can't figure out how
krbret could not be 0 but the password is still changed.  Any ideas?

if ((krbret = krb5_change_password(ctx, &creds, newpass, &pw_result,
&pw_res_string, &res_string )) != 0) {
  fprintf (stderr,"Changepass return: %d",krbret);
    krb5_free_cred_contents(ctx, &creds);
    krb5_free_principal(ctx, princ);
    krb5_free_context(ctx);
    return INT2NUM(krbret);
}




More information about the Kerberos mailing list