* krlogin.c (main): Error out if -D isn't followed by another argument. Based
on patch from Brad Thompson.
* krshd.c (v4_kdata, v4_ticket): Don't define if KRB5_KRB4_COMPAT is not
defined. Patch from Brad Thompson.
* kcmd.c (kcmd): If krb5_get_credentials returns a nonzero error code, print an
error message before returning.
* krlogin.c (main): If ospeed is outside of compiled-in table index range but
not high enough to be a baud rate, use the highest rate in the table.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11777
dc483132-0cff-0310-8789-
dd5450dbe970
+1999-09-01 Ken Raeburn <raeburn@mit.edu>
+
+ * krlogin.c (main): Error out if -D isn't followed by another
+ argument. Based on patch from Brad Thompson.
+
+ * krshd.c (v4_kdata, v4_ticket): Don't define if KRB5_KRB4_COMPAT
+ is not defined. Patch from Brad Thompson.
+
+ * kcmd.c (kcmd): If krb5_get_credentials returns a nonzero error
+ code, print an error message before returning.
+
+ * krlogin.c (main): If ospeed is outside of compiled-in table
+ index range but not high enough to be a baud rate, use the highest
+ rate in the table.
+
1999-08-24 Tom Yu <tlyu@mit.edu>
* Makefile.in (kshd): Remove $(LOGINLIBS) from kshd dependencies.
status = krb5_get_credentials(bsd_context, 0, cc, get_cred, &ret_cred);
krb5_free_creds(bsd_context, get_cred);
(void) krb5_cc_close(bsd_context, cc);
- if (status) goto bad2;
+ if (status) {
+ fprintf (stderr, "error getting credentials: %s\n",
+ error_message (status));
+ goto bad2;
+ }
/* Reset internal flags; these should not be sent. */
authopts &= (~OPTS_FORWARD_CREDS);
if (argc > 0 && !strcmp(*argv, "-D")) {
argv++; argc--;
+ if (*argv == NULL) {
+ fprintf (stderr,
+ "rlogin: -D flag must be followed by the debug port.\n");
+ exit (1);
+ }
debug_port = htons(atoi(*argv));
argv++; argc--;
goto another;
/* On some systems, ospeed is the baud rate itself,
not a table index. */
sprintf (term + strlen (term), "%d", ospeed);
+ else if (ospeed >= sizeof(speeds)/sizeof(char*))
+ /* Past end of table, but not high enough to
+ look like a real speed. */
+ (void) strcat (term, speeds[sizeof(speeds)/sizeof(char*) - 1]);
else {
(void) strcat(term, speeds[ospeed]);
}
krb5_principal client;
krb5_authenticator *kdata;
+#ifdef KRB5_KRB4_COMPAT
AUTH_DAT *v4_kdata;
KTEXT v4_ticket;
+#endif
int auth_sys = 0; /* Which version of Kerberos used to authenticate */