summaryrefslogtreecommitdiffstats
path: root/eBones/kdb_destroy/kdb_destroy.c
diff options
context:
space:
mode:
Diffstat (limited to 'eBones/kdb_destroy/kdb_destroy.c')
-rw-r--r--eBones/kdb_destroy/kdb_destroy.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/eBones/kdb_destroy/kdb_destroy.c b/eBones/kdb_destroy/kdb_destroy.c
index 29c68a8..95206fe 100644
--- a/eBones/kdb_destroy/kdb_destroy.c
+++ b/eBones/kdb_destroy/kdb_destroy.c
@@ -4,12 +4,12 @@
* <Copyright.MIT>.
*
* from: kdb_destroy.c,v 4.0 89/01/24 21:49:02 jtkohl Exp $
- * $Id: kdb_destroy.c,v 1.1.1.1 1994/09/30 14:49:56 csgr Exp $
+ * $Id: kdb_destroy.c,v 1.2 1995/01/25 19:57:27 ache Exp $
*/
#ifndef lint
static char rcsid[] =
-"$Id: kdb_destroy.c,v 1.1.1.1 1994/09/30 14:49:56 csgr Exp $";
+"$Id: kdb_destroy.c,v 1.2 1995/01/25 19:57:27 ache Exp $";
#endif lint
#include <strings.h>
@@ -17,24 +17,28 @@ static char rcsid[] =
#include "krb.h"
#include "krb_db.h"
+#ifdef dbm_pagfno
+#define DB
+#endif
+
main()
{
char answer[10]; /* user input */
char dbm[256]; /* database path and name */
char dbm1[256]; /* database path and name */
-#ifndef __FreeBSD__
- char *file1, *file2; /* database file names */
-#else
+#ifdef DB
char *file; /* database file names */
+#else
+ char *file1, *file2; /* database file names */
#endif
strcpy(dbm, DBM_FILE);
-#ifndef __FreeBSD__
+#ifdef __FreeBSD__
+ file = strcat(dbm, ".db");
+#else
strcpy(dbm1, DBM_FILE);
file1 = strcat(dbm, ".dir");
file2 = strcat(dbm1, ".pag");
-#else
- file = strcat(dbm, ".db");
#endif
printf("You are about to destroy the Kerberos database ");
@@ -43,10 +47,10 @@ main()
fgets(answer, sizeof(answer), stdin);
if (answer[0] == 'y' || answer[0] == 'Y') {
-#ifndef __FreeBSD__
- if (unlink(file1) == 0 && unlink(file2) == 0)
-#else
+#ifdef DB
if (unlink(file) == 0)
+#else
+ if (unlink(file1) == 0 && unlink(file2) == 0)
#endif
fprintf(stderr, "Database deleted at %s\n", DBM_FILE);
else
OpenPOWER on IntegriCloud