summaryrefslogtreecommitdiffstats
path: root/gnu/libexec
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1995-02-06 23:35:49 +0000
committerwpaul <wpaul@FreeBSD.org>1995-02-06 23:35:49 +0000
commitd3560dd142e7fdb96f584346659dc7ae4250e51d (patch)
treefec9d3bbc11a3dabee9551e9aac108f85232be37 /gnu/libexec
parentcf3a878379438c57a0061b76504645d924fe8076 (diff)
downloadFreeBSD-src-d3560dd142e7fdb96f584346659dc7ae4250e51d.zip
FreeBSD-src-d3560dd142e7fdb96f584346659dc7ae4250e51d.tar.gz
Removed annoying changelog entries from ypclnt.c, added usage() function
to ypxfr.c.
Diffstat (limited to 'gnu/libexec')
-rw-r--r--gnu/libexec/ypxfr/ypclnt.c25
-rw-r--r--gnu/libexec/ypxfr/ypxfr.c61
2 files changed, 25 insertions, 61 deletions
diff --git a/gnu/libexec/ypxfr/ypclnt.c b/gnu/libexec/ypxfr/ypclnt.c
index 3ad43e9..cefc58f 100644
--- a/gnu/libexec/ypxfr/ypclnt.c
+++ b/gnu/libexec/ypxfr/ypclnt.c
@@ -18,32 +18,9 @@
Modified for use with FreeBSD 2.x by Bill Paul (wpaul@ctr.columbia.edu)
- $Id$
+ $Id: ypclnt.c,v 1.1 1995/01/31 09:28:45 wpaul Exp $
*/
-/*
- * $Author: root $
- * $Log: ypclnt.c,v $
- * Revision 2.0 1994/01/06 16:58:48 root
- * Version 2.0
- *
- * Revision 0.17 1994/01/02 22:48:22 root
- * Added strict prototypes
- *
- * Revision 0.16 1994/01/02 20:09:39 root
- * Added GPL notice
- *
- * Revision 0.15 1993/12/30 22:34:57 root
- * *** empty log message ***
- *
- * Revision 0.14 1993/12/19 12:42:32 root
- * *** empty log message ***
- *
- * Revision 0.13 1993/06/12 09:39:30 root
- * Align with include-4.4
- *
- */
-
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
diff --git a/gnu/libexec/ypxfr/ypxfr.c b/gnu/libexec/ypxfr/ypxfr.c
index 3d06431..d8589e9 100644
--- a/gnu/libexec/ypxfr/ypxfr.c
+++ b/gnu/libexec/ypxfr/ypxfr.c
@@ -18,41 +18,9 @@
Modified for use with FreeBSD 2.x by Bill Paul (wpaul@ctr.columbia.edu)
- $Id$
+ $Id: ypxfr.c,v 1.1 1995/01/31 09:28:47 wpaul Exp $
*/
-/*
- * $Author: root $
- * $Log: ypxfr.c,v $
- * Revision 2.0 1994/01/06 16:58:08 root
- * Version 2.0
- *
- * Revision 0.20 1994/01/02 21:59:08 root
- * Strict prototypes
- *
- * Revision 0.19 1994/01/02 20:10:08 root
- * Added GPL notice
- *
- * Revision 0.18 1994/01/02 18:00:38 root
- * New arguments for -C flag.
- *
- * Revision 0.17 1993/12/30 22:21:49 root
- * Switch to GDBM
- *
- * Revision 0.16 1993/12/27 23:43:26 root
- * Use dbm directly instead of makedbm
- *
- * Revision 0.15 1993/12/27 21:21:00 root
- * This host should be the default master
- *
- * Revision 0.14 1993/12/19 12:41:55 root
- * *** empty log message ***
- *
- * Revision 0.13 1993/06/12 10:49:35 root
- * Align with include-4.4
- *
- */
-
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -67,6 +35,10 @@
DB *db;
+#ifndef _PATH_YP
+#define _PATH_YP "/var/yp"
+#endif
+
#define PERM_SECURE (S_IRUSR|S_IWUSR)
HASHINFO openinfo = {
4096, /* bsize */
@@ -108,7 +80,7 @@ extern char *optarg;
static char *SourceHost=NULL, *TargetDomain=NULL, *SourceDomain=NULL;
static struct in_addr IpAddress;
static int Force=0, NoClear=0, TaskId=0, ProgramNumber=0,
- PortNumber=0, Secure=0;
+ PortNumber=0;
static char *
ypxfr_err_string(enum ypxfrstat y) {
@@ -283,9 +255,24 @@ ypxfr(char *mapName) {
return y==0?YPXFR_SUCC:YPXFR_YPERR;
}
+void usage(progname)
+char *progname;
+{
+ fprintf(stderr, "usage: %s [-f] [-c] [-d target domain] \
+[-h source host]\n [-s source domain] \
+[-C taskid program-number ipaddr port] mapname\n", progname);
+}
+
void
main (int argc, char **argv)
{
+
+ if (argc < 2)
+ {
+ usage(argv[0]);
+ exit(1);
+ }
+
while(1) {
int c=getopt(argc, argv, "fcd:h:s:C:S");
if (c==EOF) break;
@@ -311,9 +298,9 @@ main (int argc, char **argv)
IpAddress.s_addr=inet_addr(argv[optind++]);
PortNumber=atoi(argv[optind++]);
break;
- case 'S':
- Secure++;
- break;
+ default:
+ usage(argv[0]);
+ exit(1);
}
}
argc-=optind;
OpenPOWER on IntegriCloud