summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sendmail/makemap/makemap.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/sendmail/makemap/makemap.c')
-rw-r--r--usr.sbin/sendmail/makemap/makemap.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/usr.sbin/sendmail/makemap/makemap.c b/usr.sbin/sendmail/makemap/makemap.c
index 9d088c6..8e10907 100644
--- a/usr.sbin/sendmail/makemap/makemap.c
+++ b/usr.sbin/sendmail/makemap/makemap.c
@@ -33,7 +33,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)makemap.c 8.38 (Berkeley) 9/23/97";
+static char sccsid[] = "@(#)makemap.c 8.37 (Berkeley) 7/10/97";
#endif /* not lint */
#include <sys/types.h>
@@ -152,7 +152,7 @@ main(argc, argv)
#else
#define OPTIONS "Ndforv"
#endif
- while ((opt = getopt(argc, argv, OPTIONS)) != EOF)
+ while ((opt = getopt(argc, argv, OPTIONS)) != -1)
{
switch (opt)
{
@@ -363,6 +363,13 @@ main(argc, argv)
pbuf, errstring(st));
exit(EX_CANTCREAT);
}
+ if (std.st_dev == stp.st_dev && std.st_ino == stp.st_ino)
+ {
+ fprintf(stderr,
+ "%s: cannot run with GDBM\n",
+ mapname);
+ exit(EX_CONFIG);
+ }
break;
#endif
default:
@@ -400,14 +407,6 @@ main(argc, argv)
#ifdef NDBM
case T_DBM:
dbp.dbm = dbm_open(mapname, mode, 0644);
- if (dbp.dbm != NULL &&
- dbm_dirfno(dbp.dbm) == dbm_pagfno(dbp.dbm))
- {
- fprintf(stderr, "dbm map %s: cannot run with GDBM\n",
- mapname);
- dbm_close(dbp.dbm);
- exit(EX_CONFIG);
- }
if (!ignoresafeties && dbp.dbm != NULL &&
(filechanged(dbuf, dbm_dirfno(dbp.dbm), &std, sff) ||
filechanged(pbuf, dbm_pagfno(dbp.dbm), &stp, sff)))
@@ -510,7 +509,7 @@ main(argc, argv)
progname, mapname, lineno, sizeof ibuf);
continue;
}
-
+
if (ibuf[0] == '\0' || ibuf[0] == '#')
continue;
if (isspace(ibuf[0]))
OpenPOWER on IntegriCloud