[1151] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

krb5b4pl3: support for non-encrypting krlogin/krlogind

daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Tue Mar 14 10:22:12 1995

From: "Jonathan I. Kamens" <jik@cam.ov.com>
Date: Tue, 14 Mar 1995 10:25:27 -0500
To: krb5-bugs@MIT.EDU

In order to make it easier for us to compile a Kerberos-5-based that
can be exported, we added code to krlogin and krlogind to enable them
to be compiled without support for encryption if the NX symbol is
defined.

I'd like for these patches (at least the ones to krlogin.c krlogind.c,
if not the ones for Makefile.in) incorporated into the MIT source
tree, since they don't change the default behavior of the programs and
might be useful to some other sites.  I've include patches below.

Note, however, that these patches are dependent on my DO_RHOSTS
patches, which I will submit (and explain) shortly.

BTW, the patch to krlogind's usage message is correct even if you
don't take the rest of these patches.

--- appl/bsd/Makefile.in	1995/03/09 18:58:12	1.4
+++ appl/bsd/Makefile.in	1995/03/09 19:04:06	1.5
@@ -61,3 +61,23 @@
 
 getdtablesize.o: $(srcdir)/getdtablesize.c
 
+all:: ovrlogin_nx ovrlogind_nx
+clean:: ; $(RM) ovrlogin_nx ovrlogind_nx
+
+krlogin_nx.o: krlogin.c
+	$(CC) -o krlogin_nx.o -c $(CFLAGS) -DNX $<
+
+ovrlogin_nx: krlogin_nx.o kcmd.o forward.o $(SETENVOBJ) $(DEPKLIB)
+	$(CC) $(CFLAGS) -o ovrlogin_nx krlogin_nx.o kcmd.o forward.o $(SETENVOBJ) $(KLIB) $(LIBS)
+
+install::
+	$(INSTALL_PROGRAM) ovrlogin_nx $(DESTDIR)$(CLIENT_BINDIR)/ovrlogin_nx
+
+ovrlogind_nx: krlogind_nx.o logutil.o kcmd.o forward.o $(SETENVOBJ) $(DEPKLIB)
+	$(CC) $(CFLAGS) -o ovrlogind_nx krlogind.o logutil.o kcmd.o forward.o $(SETENVOBJ) $(K4LIB) $(KLIB) $(LIBS)
+
+krlogind_nx.o: krlogind.c
+	$(CC) -o krlogind_nx.o -c $(CFLAGS) -DNX $<
+
+install::
+	$(INSTALL_PROGRAM) ovrlogind_nx $(DESTDIR)$(SERVER_BINDIR)/ovrlogind_nx
--- appl/bsd/krlogin.c	1995/03/09 20:11:22	1.3
+++ appl/bsd/krlogin.c	1995/03/09 20:17:50	1.4
@@ -415,11 +415,13 @@
 	argv++, argc--;
 	goto another;
     }
+#ifndef NX
     if (argc > 0 && !strcmp(*argv, "-x")) {
 	encrypt_flag++;
 	argv++, argc--;
 	goto another;
     }
+#endif
     if (argc > 0 && !strcmp(*argv, "-f")) {
 	if (Fflag) {
 	    fprintf(stderr, "rlogin: Only one of -f and -F allowed\n");
@@ -618,7 +620,13 @@
 #ifdef KERBEROS
     fprintf (stderr,
 	     "usage: rlogin host [-option] [-option...] [-k realm ] [-t ttytype] [-l username]\n");
-    fprintf (stderr, "     where option is e, 7, 8, noflow, n, a, x, f, F, or c\n");
+    fprintf (stderr, "     where option is e, 7, 8, noflow, n, a, %sf, F, or c\n",
+#ifdef NX
+	     ""
+#else
+	     "x, "
+#endif
+	);
 #else /* !KERBEROS */
     fprintf (stderr,
 	     "usage: rlogin host [-option] [-option...] [-t ttytype] [-l username]\n");
--- appl/bsd/krlogind.c	1995/03/10 19:58:19	1.8
+++ appl/bsd/krlogind.c	1995/03/10 20:04:34	1.9
@@ -98,7 +98,9 @@
  * #define KERBEROS
  */
 #define LOG_REMOTE_REALM
+#ifndef NX
 #define CRYPT
+#endif
 
 #include <stdio.h>
 #include <sys/types.h>
@@ -254,9 +256,17 @@
 #endif
 
 #if DO_RHOSTS
+#ifdef CRYPT
 #define ARGSTR	"rRkKeExXpPD:l:?"
 #else
+#define ARGSTR	"rRkKpPD:l:?"
+#endif /* CRYPT */
+#else
+#ifdef CRYPT
 #define ARGSTR	"kKeExXpPD:l:?"
+#else
+#define ARGSTR	"kKpPD:l:?"
+#endif /* CRYPT */
 #endif /* DO_RHOSTS */
 
 #else /* !KERBEROS */
@@ -1438,7 +1448,13 @@
 {
 #ifdef KERBEROS
     syslog(LOG_ERR, 
-	   "usage: klogind [-rRkKxpP] [-D port] [-l login-program] or [r/R][k/K][x/e][p/P]logind");
+	   "usage: klogind [-rRkK%spP] [-D port] [-l login-program] or [r/R][k/K]%s[p/P]logind",
+#ifdef CRYPT
+	   "x", "[x/e]"
+#else
+	   "", ""
+#endif /* CRYPT */
+	);
 #else
     syslog(LOG_ERR, 
 	   "usage: rlogind [-rRpP] [-D port] [-l login-program] or [r/R][p/P]logind");

home help back first fref pref prev next nref lref last post