Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/rlogin Support -4 and -6. Approved by christos.
details: https://anonhg.NetBSD.org/src/rev/fa7f42b4f350
branches: trunk
changeset: 574737:fa7f42b4f350
user: ginsbach <ginsbach%NetBSD.org@localhost>
date: Fri Mar 11 03:19:31 2005 +0000
description:
Support -4 and -6. Approved by christos.
diffstat:
usr.bin/rlogin/rlogin.1 | 10 +++++++---
usr.bin/rlogin/rlogin.c | 26 ++++++++++++++++----------
2 files changed, 23 insertions(+), 13 deletions(-)
diffs (115 lines):
diff -r 445110562665 -r fa7f42b4f350 usr.bin/rlogin/rlogin.1
--- a/usr.bin/rlogin/rlogin.1 Fri Mar 11 02:55:23 2005 +0000
+++ b/usr.bin/rlogin/rlogin.1 Fri Mar 11 03:19:31 2005 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: rlogin.1,v 1.22 2004/12/21 02:39:00 ginsbach Exp $
+.\" $NetBSD: rlogin.1,v 1.23 2005/03/11 03:19:31 ginsbach Exp $
.\"
.\" Copyright (c) 1983, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -37,13 +37,13 @@
.Nd remote login
.Sh SYNOPSIS
.Nm
-.Op Fl 8ELd
+.Op Fl 468ELd
.Op Fl e Ar char
.Op Fl l Ar username
.Op Fl p Ar port
.Ar host
.Nm
-.Op Fl 8Ed
+.Op Fl 468Ed
.Op Fl e Ar char
.Op Fl p Ar port
.Ar username@host
@@ -58,6 +58,10 @@
authorization mechanism.
The options are as follows:
.Bl -tag -width XlXusernameX
+.It Fl 4
+Use IPv4 addresses only.
+.It Fl 6
+Use IPv6 addresses only.
.It Fl 8
The
.Fl 8
diff -r 445110562665 -r fa7f42b4f350 usr.bin/rlogin/rlogin.c
--- a/usr.bin/rlogin/rlogin.c Fri Mar 11 02:55:23 2005 +0000
+++ b/usr.bin/rlogin/rlogin.c Fri Mar 11 03:19:31 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rlogin.c,v 1.34 2005/01/08 03:23:15 ginsbach Exp $ */
+/* $NetBSD: rlogin.c,v 1.35 2005/03/11 03:19:31 ginsbach Exp $ */
/*
* Copyright (c) 1983, 1990, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)rlogin.c 8.4 (Berkeley) 4/29/95";
#else
-__RCSID("$NetBSD: rlogin.c,v 1.34 2005/01/08 03:23:15 ginsbach Exp $");
+__RCSID("$NetBSD: rlogin.c,v 1.35 2005/03/11 03:19:31 ginsbach Exp $");
#endif
#endif /* not lint */
@@ -155,6 +155,7 @@
uid_t uid;
int argoff, ch, dflag, one;
int i, len, len2;
+ int family = AF_UNSPEC;
char *host, *p, *user, *name, term[1024] = "network";
speed_t ospeed;
struct sigaction sa;
@@ -187,12 +188,18 @@
}
#ifdef KERBEROS
-#define OPTIONS "8EKde:p:k:l:x"
+#define OPTIONS "468EKde:p:k:l:x"
#else
-#define OPTIONS "8EKde:p:l:"
+#define OPTIONS "468EKde:p:l:"
#endif
while ((ch = getopt(argc - argoff, argv + argoff, OPTIONS)) != -1)
switch(ch) {
+ case '4':
+ family = AF_INET;
+ break;
+ case '6':
+ family = AF_INET6;
+ break;
case '8':
eight = 1;
break;
@@ -400,13 +407,12 @@
if (doencrypt)
errx(1, "the -x flag requires Kerberos authentication.");
#endif /* CRYPT */
- rem = rcmd_af(&host, sp->s_port, name, user, term, 0,
- PF_UNSPEC);
+ rem = rcmd_af(&host, sp->s_port, name, user, term, 0, family);
if (rem < 0)
exit(1);
}
#else
- rem = rcmd_af(&host, sp->s_port, name, user, term, 0, PF_UNSPEC);
+ rem = rcmd_af(&host, sp->s_port, name, user, term, 0, family);
#endif /* KERBEROS */
@@ -949,12 +955,12 @@
"usage: rlogin [-%s]%s[-e char] [-l username] [-p port] [username@]host\n",
#ifdef KERBEROS
#ifdef CRYPT
- "8EKdx", " [-k realm] ");
+ "468EKdx", " [-k realm] ");
#else
- "8EKd", " [-k realm] ");
+ "468EKd", " [-k realm] ");
#endif
#else
- "8Ed", " ");
+ "468Ed", " ");
#endif
exit(1);
}
Home |
Main Index |
Thread Index |
Old Index