+Fri Apr 21 17:18:57 1995 Mark Eichin <eichin@cygnus.com>
+
+ rlogin testing changes from ian@cygnus.com.
+
+> Fri Mar 24 15:04:25 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * krlogind.c (srvtab): New global variable.
+ (krb5_override_default_realm): Declare.
+ (ARGSTR): Add "S:M:L:" to Kerberos version.
+ (login_program): New global variable.
+ (main): Handle -S, -M, and -L arguments. Call SO_REUSEADDR on
+ socket if debug_port set.
+ (doit): Use login_program instead of LOGIN_PROGRAM.
+ (recvauth): Pass srvtab to krb5_compat_recvauth.
+ * krlogind.M: Document -S, -M, and -L.
+
Fri Apr 21 17:13:48 1995 Mark Eichin <eichin@cygnus.com>
More changes from ian@cygnus.com to support testing.
.IR environ (7).
The screen or window size of the terminal is requested from the client,
and window size changes from the client are propagated to the pseudo terminal.
+.PP
+.I Krlogind
+supports three options which are used for testing purposes:
+
+.IP \fB\-S\ srvtab\fP 10
+Set the \fIsrvtab\fP file to use.
+
+.IP \fB\-M\ realm\fP
+Set the Kerberos realm to use.
+
+.IP \fB\-L\ login\fP
+Set the login program to use. This option only has an effect if
+DO_NOT_USE_K_LOGIN was not defined when
+.I krlogind
+was compiled.
.SH DIAGNOSTICS
All diagnostic messages are returned on the connection
associated with the
krb5_ticket *ticket = 0;
krb5_context bsd_context;
-#define ARGSTR "rRkKeExXpPD:?"
+char *srvtab = NULL;
+extern char *krb5_override_default_realm;
+
+#define ARGSTR "rRkKeExXpPD:S:M:L:?"
#else /* !KERBEROS */
#define ARGSTR "rRpPD:?"
#define (*des_read) read
#endif /* DO_NOT_USE_K_LOGIN */
#endif /* LOGIN_PROGRAM */
+char *login_program = LOGIN_PROGRAM;
+
#define MAXRETRIES 4
#define MAX_PROG_NAME 16
do_encrypt = 1;
break;
#endif
+ case 'S':
+ srvtab = optarg;
+ break;
+ case 'M':
+ krb5_override_default_realm = optarg;
+ break;
#endif
case 'p':
passwd_if_fail = 1; /* Passwd reqd if any check fails */
case 'D':
debug_port = atoi(optarg);
break;
+ case 'L':
+#ifndef DO_NOT_USE_K_LOGIN
+ login_program = optarg;
+#endif
+ break;
case '?':
default:
usage();
sin.sin_port = htons(debug_port);
sin.sin_addr.s_addr = INADDR_ANY;
+ (void) setsockopt(s, SOL_SOCKET, SO_REUSEADDR,
+ (char *)&on, sizeof(on));
+
if ((bind(s, (struct sockaddr *) &sin, sizeof(sin))) < 0) {
fprintf(stderr, "Error in bind: %s\n", strerror(errno));
exit(2);
#endif
#ifdef DO_NOT_USE_K_LOGIN
- execl(LOGIN_PROGRAM, "login", "-r", rhost_name, 0);
+ execl(login_program, "login", "-r", rhost_name, 0);
#else
if (passwd_req)
- execl(LOGIN_PROGRAM, "login","-h", rhost_name, lusername, 0);
+ execl(login_program, "login","-h", rhost_name, lusername, 0);
else
- execl(LOGIN_PROGRAM, "login", "-h", rhost_name, "-e", lusername, 0);
+ execl(login_program, "login", "-h", rhost_name, "-e", lusername, 0);
#endif
- fatalperror(2, LOGIN_PROGRAM);
+ fatalperror(2, login_program);
/*NOTREACHED*/
} /* if (pid == 0) */
server, /* Specify daemon principal */
0, /* default rc_type */
0, /* no flags */
- NULL, /* default keytab */
+ srvtab, /* normally NULL to use v5srvtab */
do_encrypt ? KOPT_DO_MUTUAL : 0, /*v4_opts*/
"rcmd", /* v4_service */