summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>1999-09-01 21:51:42 +0000
committerKen Raeburn <raeburn@mit.edu>1999-09-01 21:51:42 +0000
commit1b1905a9ed467f428ea3b4732d184aea42311b83 (patch)
treebb1ca7e403c11d8686041a327bda66aaf9e31d4a /src
parent6772cbcb5be8aa088e5bcfbe1db78edb83fd07d7 (diff)
downloadkrb5-1b1905a9ed467f428ea3b4732d184aea42311b83.tar.gz
krb5-1b1905a9ed467f428ea3b4732d184aea42311b83.tar.xz
krb5-1b1905a9ed467f428ea3b4732d184aea42311b83.zip
from 1.1 branch:
* 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
Diffstat (limited to 'src')
-rw-r--r--src/appl/bsd/ChangeLog15
-rw-r--r--src/appl/bsd/kcmd.c6
-rw-r--r--src/appl/bsd/krlogin.c9
-rw-r--r--src/appl/bsd/krshd.c2
4 files changed, 31 insertions, 1 deletions
diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog
index 629dcfb1f4..6108bdb2d9 100644
--- a/src/appl/bsd/ChangeLog
+++ b/src/appl/bsd/ChangeLog
@@ -1,3 +1,18 @@
+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.
diff --git a/src/appl/bsd/kcmd.c b/src/appl/bsd/kcmd.c
index 6b0eafcdeb..0e68f88e7c 100644
--- a/src/appl/bsd/kcmd.c
+++ b/src/appl/bsd/kcmd.c
@@ -339,7 +339,11 @@ kcmd(sock, ahost, rport, locuser, remuser, cmd, fd2p, service, realm,
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);
diff --git a/src/appl/bsd/krlogin.c b/src/appl/bsd/krlogin.c
index 0bfb3ef571..0a8e7902e7 100644
--- a/src/appl/bsd/krlogin.c
+++ b/src/appl/bsd/krlogin.c
@@ -383,6 +383,11 @@ main(argc, argv)
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;
@@ -545,6 +550,10 @@ main(argc, argv)
/* 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]);
}
diff --git a/src/appl/bsd/krshd.c b/src/appl/bsd/krshd.c
index 2a13917042..3844087bb5 100644
--- a/src/appl/bsd/krshd.c
+++ b/src/appl/bsd/krshd.c
@@ -529,8 +529,10 @@ char *kremuser;
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 */