diff options
Diffstat (limited to 'contrib/amd/mk-amd-map')
-rw-r--r-- | contrib/amd/mk-amd-map/mk-amd-map.8 | 42 | ||||
-rw-r--r-- | contrib/amd/mk-amd-map/mk-amd-map.c | 22 |
2 files changed, 26 insertions, 38 deletions
diff --git a/contrib/amd/mk-amd-map/mk-amd-map.8 b/contrib/amd/mk-amd-map/mk-amd-map.8 index b9587f7..f6f31f5 100644 --- a/contrib/amd/mk-amd-map/mk-amd-map.8 +++ b/contrib/amd/mk-amd-map/mk-amd-map.8 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 1997-2003 Erez Zadok +.\" Copyright (c) 1997-1999 Erez Zadok .\" Copyright (c) 1993 Jan-Simon Pendry .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -33,30 +33,32 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)mk-amd-map.8 8.1 (Berkeley) 6/28/93 -.\" $Id: mk-amd-map.8,v 1.3.2.3 2002/12/27 22:45:15 ezk Exp $ +.\" $Id: mk-amd-map.8,v 1.2 1999/01/10 21:54:41 ezk Exp $ +.\" $FreeBSD$ .\" -.TH MK-AMD-MAP 8 "June 28, 1993" -.SH NAME -.B mk-amd-map -\- create database maps for Amd -.SH SYNOPSIS -.B mk-amd-map -[ -.B \-p -] -.I mapname -.SH DESCRIPTION -.B mk-amd-map +.Dd June 28, 1993 +.Dt MK-AMD-MAP 8 +.Os +.Sh NAME +.Nm mk-amd-map +.Nd create database maps for Amd +.Sh SYNOPSIS +.Nm +.Op Fl p +.Ar mapname +.Sh DESCRIPTION +.Nm creates the database maps used by the keyed map lookups in -amd(8). +.Xr amd 8 . It reads input from the named file and outputs them to a correspondingly named hashed database. -.TP -.B \-p -This +.Pp +The +.Fl p option prints the map on standard output instead of generating a database. This is usually used to merge continuation lines into one physical line. -.SH SEE ALSO -.BR amd (8). +.Sh SEE ALSO +.Xr amd.conf 5 , +.Xr amd 8 diff --git a/contrib/amd/mk-amd-map/mk-amd-map.c b/contrib/amd/mk-amd-map/mk-amd-map.c index 1503600..c059f70 100644 --- a/contrib/amd/mk-amd-map/mk-amd-map.c +++ b/contrib/amd/mk-amd-map/mk-amd-map.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2003 Erez Zadok + * Copyright (c) 1997-2001 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,8 @@ * * %W% (Berkeley) %G% * - * $Id: mk-amd-map.c,v 1.5.2.5 2003/06/09 16:57:46 ezk Exp $ + * $Id: mk-amd-map.c,v 1.5.2.1 2001/01/10 03:23:42 ezk Exp $ + * $FreeBSD$ */ /* @@ -286,22 +287,7 @@ main(int argc, char *argv[]) exit(1); } -#ifdef HAVE_MKSTEMP - { - /* - * XXX: hack to avoid compiler complaints about mktemp not being - * secure, since we have to do a dbm_open on this anyway. So use - * mkstemp if you can, and then close the fd, but we get a safe - * and unique file name. - */ - int dummyfd; - dummyfd = mkstemp(maptmp); - if (dummyfd >= 0) - close(dummyfd); - } -#else /* not HAVE_MKSTEMP */ mktemp(maptmp); -#endif /* not HAVE_MKSTEMP */ /* remove existing temps (if any) */ #ifdef HAVE_DB_SUFFIX @@ -321,7 +307,7 @@ main(int argc, char *argv[]) } #endif /* not HAVE_DB_SUFFIX */ - db = dbm_open(maptmp, O_RDWR|O_CREAT|O_EXCL, 0444); + db = dbm_open(maptmp, O_RDWR|O_CREAT, 0444); if (!db) { fprintf(stderr, "cannot initialize temporary database: %s", maptmp); exit(1); |