summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ypcat/Makefile3
-rw-r--r--usr.bin/ypcat/ypcat.14
-rw-r--r--usr.bin/ypcat/ypcat.c12
-rw-r--r--usr.bin/ypmatch/Makefile3
-rw-r--r--usr.bin/ypmatch/ypmatch.14
-rw-r--r--usr.bin/ypmatch/ypmatch.c12
-rw-r--r--usr.bin/ypwhich/Makefile2
-rw-r--r--usr.bin/ypwhich/ypwhich.14
-rw-r--r--usr.bin/ypwhich/ypwhich.c7
9 files changed, 32 insertions, 19 deletions
diff --git a/usr.bin/ypcat/Makefile b/usr.bin/ypcat/Makefile
index 6cab8ff07c5..92a0c474cb6 100644
--- a/usr.bin/ypcat/Makefile
+++ b/usr.bin/ypcat/Makefile
@@ -1,5 +1,4 @@
-# from: @(#)Makefile 5.8 (Berkeley) 7/28/90
-# $Id: Makefile,v 1.1 1995/10/18 08:47:08 deraadt Exp $
+# $OpenBSD: Makefile,v 1.2 1996/05/21 21:32:39 deraadt Exp $
PROG= ypcat
diff --git a/usr.bin/ypcat/ypcat.1 b/usr.bin/ypcat/ypcat.1
index d35c83c7d33..6be7ec72519 100644
--- a/usr.bin/ypcat/ypcat.1
+++ b/usr.bin/ypcat/ypcat.1
@@ -1,3 +1,5 @@
+.\" $OpenBSD: ypcat.1,v 1.2 1996/05/21 21:32:40 deraadt Exp $
+.\" $NetBSD: ypcat.1,v 1.4 1996/05/13 02:43:36 thorpej Exp $
.\"
.\" Copyright (c) 1993 Winning Strategies, Inc.
.\" All rights reserved.
@@ -27,7 +29,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $Id: ypcat.1,v 1.1 1995/10/18 08:47:08 deraadt Exp $
+.\" $Id: ypcat.1,v 1.2 1996/05/21 21:32:40 deraadt Exp $
.\"
.Dd December 3, 1993
.Dt YPCAT 1
diff --git a/usr.bin/ypcat/ypcat.c b/usr.bin/ypcat/ypcat.c
index c72e7150a77..f82937068a5 100644
--- a/usr.bin/ypcat/ypcat.c
+++ b/usr.bin/ypcat/ypcat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ypcat.c,v 1.3 1996/05/05 16:19:31 deraadt Exp $ */
+/* $OpenBSD: ypcat.c,v 1.4 1996/05/21 21:32:40 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993, 1996 Theo de Raadt <deraadt@theos.com>
@@ -33,7 +33,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: ypcat.c,v 1.3 1996/05/05 16:19:31 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: ypcat.c,v 1.4 1996/05/21 21:32:40 deraadt Exp $";
#endif
#include <sys/param.h>
@@ -90,7 +90,7 @@ int
main(argc, argv)
char **argv;
{
- char *domain;
+ char *domain = NULL;
struct ypall_callback ypcb;
char *inmap;
extern char *optarg;
@@ -99,8 +99,6 @@ char **argv;
int c, r, i;
notrans = key = 0;
- yp_get_default_domain(&domain);
-
while( (c=getopt(argc, argv, "xd:kt")) != -1)
switch(c) {
case 'x':
@@ -125,6 +123,10 @@ char **argv;
if(optind + 1 != argc )
usage();
+ if (!domainname) {
+ yp_get_default_domain(&domainname);
+ }
+
inmap = argv[optind];
if (!notrans) {
for(i=0; i<sizeof ypaliases/sizeof ypaliases[0]; i++)
diff --git a/usr.bin/ypmatch/Makefile b/usr.bin/ypmatch/Makefile
index 312d0ee4a44..8818529e658 100644
--- a/usr.bin/ypmatch/Makefile
+++ b/usr.bin/ypmatch/Makefile
@@ -1,5 +1,4 @@
-# from: @(#)Makefile 5.8 (Berkeley) 7/28/90
-# $Id: Makefile,v 1.1 1995/10/18 08:47:08 deraadt Exp $
+# $OpenBSD: Makefile,v 1.2 1996/05/21 21:32:41 deraadt Exp $
PROG= ypmatch
diff --git a/usr.bin/ypmatch/ypmatch.1 b/usr.bin/ypmatch/ypmatch.1
index 1ad6b5baf3c..1818369e415 100644
--- a/usr.bin/ypmatch/ypmatch.1
+++ b/usr.bin/ypmatch/ypmatch.1
@@ -1,3 +1,5 @@
+.\" $OpenBSD: ypmatch.1,v 1.3 1996/05/21 21:32:42 deraadt Exp $
+.\" $NetBSD: ypmatch.1,v 1.5 1996/05/13 02:43:41 thorpej Exp $
.\"
.\" Copyright (c) 1993 Winning Strategies, Inc.
.\" All rights reserved.
@@ -27,7 +29,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $Id: ypmatch.1,v 1.2 1996/05/10 13:03:13 deraadt Exp $
+.\" $Id: ypmatch.1,v 1.3 1996/05/21 21:32:42 deraadt Exp $
.\"
.Dd December 3, 1993
.Dt YPMATCH 1
diff --git a/usr.bin/ypmatch/ypmatch.c b/usr.bin/ypmatch/ypmatch.c
index f13fcccb3af..1c0542de776 100644
--- a/usr.bin/ypmatch/ypmatch.c
+++ b/usr.bin/ypmatch/ypmatch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ypmatch.c,v 1.4 1996/05/10 13:03:14 deraadt Exp $ */
+/* $OpenBSD: ypmatch.c,v 1.5 1996/05/21 21:32:42 deraadt Exp $ */
/* $NetBSD: ypmatch.c,v 1.8 1996/05/07 01:24:52 jtc Exp $ */
/*
@@ -34,7 +34,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: ypmatch.c,v 1.4 1996/05/10 13:03:14 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: ypmatch.c,v 1.5 1996/05/21 21:32:42 deraadt Exp $";
#endif
#include <sys/param.h>
@@ -62,6 +62,7 @@ struct ypalias {
{ "ethers", "ethers.byname" },
};
+void
usage()
{
fprintf(stderr, "Usage:\n");
@@ -87,9 +88,8 @@ char **argv;
int c, r, i;
int rval;
+ domainname = NULL;
notrans = key = 0;
- yp_get_default_domain(&domainname);
-
while( (c=getopt(argc, argv, "xd:kt")) != -1)
switch(c) {
case 'x':
@@ -114,6 +114,10 @@ char **argv;
if( (argc-optind) < 2 )
usage();
+ if (!domainname) {
+ yp_get_default_domain(&domainname);
+ }
+
inmap = argv[argc-1];
if (!notrans) {
for(i=0; i<sizeof ypaliases/sizeof ypaliases[0]; i++)
diff --git a/usr.bin/ypwhich/Makefile b/usr.bin/ypwhich/Makefile
index d58bd08b62b..301e2cd1dd1 100644
--- a/usr.bin/ypwhich/Makefile
+++ b/usr.bin/ypwhich/Makefile
@@ -1,5 +1,5 @@
+# $OpenBSD: Makefile,v 1.2 1996/05/21 21:32:43 deraadt Exp $
# from: @(#)Makefile 5.8 (Berkeley) 7/28/90
-# $Id: Makefile,v 1.1 1995/10/18 08:47:08 deraadt Exp $
PROG= ypwhich
diff --git a/usr.bin/ypwhich/ypwhich.1 b/usr.bin/ypwhich/ypwhich.1
index bb26a04c4d8..b6bce0a2573 100644
--- a/usr.bin/ypwhich/ypwhich.1
+++ b/usr.bin/ypwhich/ypwhich.1
@@ -1,3 +1,5 @@
+.\" $OpenBSD: ypwhich.1,v 1.2 1996/05/21 21:32:43 deraadt Exp $
+.\" $NetBSD: ypwhich.1,v 1.3 1996/05/13 02:43:46 thorpej Exp $
.\"
.\" Copyright (c) 1994 Christopher G. Demetriou
.\" All rights reserved.
@@ -27,7 +29,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $Id: ypwhich.1,v 1.1 1995/10/18 08:47:08 deraadt Exp $
+.\" $Id: ypwhich.1,v 1.2 1996/05/21 21:32:43 deraadt Exp $
.\"
.Dd February 23, 1994
.Dt YPWHICH 1
diff --git a/usr.bin/ypwhich/ypwhich.c b/usr.bin/ypwhich/ypwhich.c
index a2890e95a34..9a1e1731b75 100644
--- a/usr.bin/ypwhich/ypwhich.c
+++ b/usr.bin/ypwhich/ypwhich.c
@@ -1,5 +1,8 @@
+/* $OpenBSD: ypwhich.c,v 1.3 1996/05/21 21:32:44 deraadt Exp $
+/* $NetBSD: ypwhich.c,v 1.6 1996/05/13 02:43:48 thorpej Exp $ */
+
/*
- * Copyright (c) 1992, 1993 Theo de Raadt <deraadt@fsa.ca>
+ * Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,7 +34,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$Id: ypwhich.c,v 1.2 1996/04/24 21:39:56 deraadt Exp $";
+static char rcsid[] = "$Id: ypwhich.c,v 1.3 1996/05/21 21:32:44 deraadt Exp $";
#endif
#include <sys/param.h>