kinit return bug (?)
Grau, Stephen
Stephen.Grau at digex.com
Fri Apr 18 17:33:48 EDT 2003
If you kinit, for example, with a slash in the realm error, you get a
KRB5_PARSE_MALFORMED error, but kinit returns with a 0 return code.
In the code, it is only returning an error code if a valid instance was
parsed and it wasn't authenticated. I think it should return an error code
if it wasn't able to get a valid instance.
This is the best I could do with the diff. This is also present in 1.2.8 and
1.3-alpha2.
--- krb5-1.2.6/src/clients/kinit/kinit.c Mon Dec 10 15:49:50 2001
+++ krb5-1.2.6/src/clients/kinit/kinit.c Fri Apr 18 17:21:24 2003
@@ -1107,7 +1107,7 @@
k5_end(&k5);
k4_end(&k4);
- if ((got_k5 && !authed_k5) || (got_k4 && !authed_k4))
+ if ((got_k5 && !authed_k5) || (got_k4 && !authed_k4) || (!got_k5 &&
!got_k4))
exit(1);
return 0;
}
More information about the krbdev
mailing list