-/* $NetBSD: arithmetic.c,v 1.5 1995/03/21 11:59:32 cgd Exp $ */
+/* $NetBSD: arithmetic.c,v 1.6 1996/03/21 18:30:19 jtc Exp $ */
/*
* Copyright (c) 1989, 1993
#if 0
static char sccsid[] = "@(#)arithmetic.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: arithmetic.c,v 1.5 1995/03/21 11:59:32 cgd Exp $";
+static char rcsid[] = "$NetBSD: arithmetic.c,v 1.6 1996/03/21 18:30:19 jtc Exp $";
#endif
#endif /* not lint */
* bound is 10. After every NQUESTS questions, statistics on the performance
* so far are printed.
*/
-void
+int
main(argc, argv)
int argc;
char **argv;
-/* $NetBSD: ftpcmd.y,v 1.6 1995/06/03 22:46:45 mycroft Exp $ */
+/* $NetBSD: ftpcmd.y,v 1.7 1996/04/08 19:03:11 jtc Exp $ */
/*
* Copyright (c) 1985, 1988, 1993, 1994
#if 0
static char sccsid[] = "@(#)ftpcmd.y 8.3 (Berkeley) 4/6/94";
#else
-static char rcsid[] = "$NetBSD: ftpcmd.y,v 1.6 1995/06/03 22:46:45 mycroft Exp $";
+static char rcsid[] = "$NetBSD: ftpcmd.y,v 1.7 1996/04/08 19:03:11 jtc Exp $";
#endif
#endif /* not lint */
struct tm *t;
t = gmtime(&stbuf.st_mtime);
reply(213,
- "19%02d%02d%02d%02d%02d%02d",
- t->tm_year, t->tm_mon+1, t->tm_mday,
+ "%04d%02d%02d%02d%02d%02d",
+ 1900 + t->tm_year,
+ t->tm_mon+1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec);
}
}
-/* $OpenBSD: sys_term.c,v 1.3 1996/03/28 23:22:00 niklas Exp $ */
-/* $NetBSD: sys_term.c,v 1.8 1996/02/28 20:38:21 thorpej Exp $ */
+/* $OpenBSD: sys_term.c,v 1.4 1996/04/23 03:03:47 deraadt Exp $ */
+/* $NetBSD: sys_term.c,v 1.9 1996/03/20 04:25:53 tls Exp $ */
/*
* Copyright (c) 1989, 1993
static char sccsid[] = "@(#)sys_term.c 8.4+1 (Berkeley) 5/30/95";
static char rcsid[] = "$NetBSD: sys_term.c,v 1.8 1996/02/28 20:38:21 thorpej Exp $";
#else
-static char rcsid[] = "$OpenBSD: sys_term.c,v 1.3 1996/03/28 23:22:00 niklas Exp $";
+static char rcsid[] = "$OpenBSD: sys_term.c,v 1.4 1996/04/23 03:03:47 deraadt Exp $";
#endif
#endif /* not lint */
register char **argv;
char **addarg();
extern char *getenv();
+ extern char *getstr();
+ extern char *gettyname;
+#define TABBUFSIZ 512
+ char defent[TABBUFSIZ];
+ char defstrs[TABBUFSIZ];
+#undef TABBUFSIZ
+ char *loginprog;
#ifdef UTMPX
register int pid = getpid();
struct utmpx utmpx;
if (pty > 2)
close(pty);
#endif
+ if (getent(defent, gettyname) == 1) {
+ char *cp = defstrs;
+
+ loginprog = getstr("lo", &cp);
+ }
+ if (loginprog == NULL)
+ loginprog = _PATH_LOGIN;
closelog();
/*
* This sleep(1) is in here so that telnetd can
* the login banner message gets lost...
*/
sleep(1);
- execv(_PATH_LOGIN, argv);
+ execv(loginprog, argv);
- syslog(LOG_ERR, "%s: %m\n", _PATH_LOGIN);
- fatalperror(net, _PATH_LOGIN);
+ syslog(LOG_ERR, "%s: %m\n", loginprog);
+ fatalperror(net, loginprog);
/*NOTREACHED*/
}
-.\" $OpenBSD: telnetd.8,v 1.3 1996/03/28 23:22:02 niklas Exp $
-.\" $NetBSD: telnetd.8,v 1.7 1996/02/28 20:30:33 thorpej Exp $
+.\" $OpenBSD: telnetd.8,v 1.4 1996/04/23 03:03:50 deraadt Exp $
+.\" $NetBSD: telnetd.8,v 1.8 1996/03/20 04:25:55 tls Exp $
.\"
.\" Copyright (c) 1983, 1993
.\" The Regents of the University of California. All rights reserved.
.Op Fl X Ar authtype
.Op Fl a Ar authmode
.Op Fl edebug
+.Op Fl g Ar gettyent
.Op Fl r Ns Ar lowpty-highpty
.Op Fl u Ar len
.Op Fl debug Op Ar port
has been compiled with support for data encryption, then the
.Fl edebug
option may be used to enable encryption debugging code.
+.It Fl g Ar gettyent
+Specifies which entry from
+.Pa /etc/gettytab
+should be used to get banner strings, login program and
+other information. The default entry is
+.Dv default.
.It Fl h
Disables the printing of host-specific information before
login has been completed.
-/* $OpenBSD: telnetd.c,v 1.2 1996/03/28 23:22:03 niklas Exp $ */
-/* $NetBSD: telnetd.c,v 1.5 1996/02/28 20:38:23 thorpej Exp $ */
+/* $OpenBSD: telnetd.c,v 1.3 1996/04/23 03:03:55 deraadt Exp $ */
+/* $NetBSD: telnetd.c,v 1.6 1996/03/20 04:25:57 tls Exp $ */
/*
* Copyright (c) 1989, 1993
static char sccsid[] = "@(#)telnetd.c 8.4 (Berkeley) 5/30/95";
static char rcsid[] = "$NetBSD: telnetd.c,v 1.5 1996/02/28 20:38:23 thorpej Exp $";
#else
-static char rcsid[] = "$OpenBSD: telnetd.c,v 1.2 1996/03/28 23:22:03 niklas Exp $";
+static char rcsid[] = "$OpenBSD: telnetd.c,v 1.3 1996/04/23 03:03:55 deraadt Exp $";
#endif
#endif /* not lint */
int debug = 0;
int keepalive = 1;
+char *gettyname = "default";
char *progname;
extern void usage P((void));
* passed off to getopt().
*/
char valid_opts[] = {
- 'd', ':', 'h', 'k', 'n', 'S', ':', 'u', ':', 'U',
+ 'd', ':', 'g', ':', 'h', 'k', 'n', 'S', ':', 'u', ':', 'U',
#ifdef AUTHENTICATION
'a', ':', 'X', ':',
#endif
break;
#endif /* DIAGNOSTICS */
+ case 'g':
+ gettyname = optarg;
+ break;
case 'h':
hostinfo = 0;
hostinfo = 0;
#endif
- if (getent(defent, "default") == 1) {
+ if (getent(defent, gettyname) == 1) {
char *getstr();
char *cp=defstrs;