summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>2001-11-30 20:32:26 +0000
committerNiels Provos <provos@cvs.openbsd.org>2001-11-30 20:32:26 +0000
commitdf7b7851409d1065df9f641cfa6003dc1001b71e (patch)
tree094cc5d15912e0df050da26af751bd0ba2fb8e87 /sbin
parent2248ef8cd3acc2cae765062db59010ba7843f027 (diff)
startkey goes away; okay deraadt@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/Makefile4
-rw-r--r--sbin/startkey/Makefile9
-rw-r--r--sbin/startkey/startkey.1139
-rw-r--r--sbin/startkey/startkey.c127
4 files changed, 2 insertions, 277 deletions
diff --git a/sbin/Makefile b/sbin/Makefile
index 9cc773d607c..574ff1f24bc 100644
--- a/sbin/Makefile
+++ b/sbin/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.62 2001/08/21 22:29:14 deraadt Exp $
+# $OpenBSD: Makefile,v 1.63 2001/11/30 20:32:25 provos Exp $
# Not ported: XNSrouted enpload scsiformat startslip
# Missing: icheck
@@ -8,7 +8,7 @@ SUBDIR= atactl badsect brconfig ccdconfig disklabel dmesg fsck ifconfig init \
modunload mount mountd ncheck_ffs nfsd nologin pfctl pflogd \
photurisd ping \
quotacheck raidctl reboot route routed savecore scan_ffs scsi \
- shutdown slattach startkey swapctl sysctl ttyflags umount
+ shutdown slattach swapctl sysctl ttyflags umount
# support for various file systems
SUBDIR+= mount_ados
diff --git a/sbin/startkey/Makefile b/sbin/startkey/Makefile
deleted file mode 100644
index 0729d72cd05..00000000000
--- a/sbin/startkey/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $OpenBSD: Makefile,v 1.2 2001/01/28 22:45:19 niklas Exp $
-
-PROG= startkey
-SRCS= startkey.c
-
-CFLAGS+= -I${.CURDIR}/../photurisd
-MAN= startkey.1
-
-.include <bsd.prog.mk>
diff --git a/sbin/startkey/startkey.1 b/sbin/startkey/startkey.1
deleted file mode 100644
index a06e7d56ed0..00000000000
--- a/sbin/startkey/startkey.1
+++ /dev/null
@@ -1,139 +0,0 @@
-.\" $OpenBSD: startkey.1,v 1.8 2000/12/15 14:31:18 aaron Exp $
-.\"
-.\" Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by Niels Provos.
-.\" 4. The name of the author may not be used to endorse or promote products
-.\" derived from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" Manual page, using -mandoc macros
-.\"
-.Dd July 18, 1997
-.Dt STARTKEY 1
-.Os
-.Sh NAME
-.Nm startkey
-.Nd start keying with photurisd
-.Sh SYNOPSIS
-.Nm startkey
-.Op Fl d Ar directory
-.Ar options ...
-.Sh DESCRIPTION
-The
-.Nm
-utility attempts to contact the
-.Xr photurisd 8
-daemon and initialize a key exchange.
-The flags are:
-.Bl -tag -width Ds
-.It Fl d Ar directory
-The
-.Fl d
-option specifies the directory in which
-.Xr photurisd
-looks for its startup files.
-The default is
-.Pa /etc/photuris/ .
-.El
-.Pp
-The options
-.Ic dst ,
-.Ic port ,
-.Ic options ,
-.Ic tsrc ,
-.Ic tdst ,
-.Ic exchange_lifetime ,
-.Ic spi_lifetime
-and
-.Ic user
-are understood by the daemon.
-The meanings are as follows:
-.Bl -tag -width options -offset indent
-.It Ic dst
-The destination IP address with which the exchange is to be established.
-.It Ic port
-The port number of the destination
-.Xr photuris
-daemon.
-.It Ic options
-The options to be used in the exchange.
-Possible values are
-.Dq enc
-and
-.Dq auth .
-.It Ic tsrc
-If both
-.Ic tsrc
-and
-.Ic tdst
-(see below) are specified, a tunnel (IP over IP) is setup.
-The
-.Ic tsrc
-option is a network address with netmask used for matching the source
-IP address of a packet.
-When both the source and the destination
-addresses match their respective options the packet will be routed into the
-tunnel.
-.It Ic tdst
-If both
-.Ic tsrc
-(see above) and
-.Ic tdst
-are specified, a tunnel (IP over IP) is setup.
-The
-.Ic tdst
-option is a network address with netmask used for matching the destination
-IP address of a packet.
-When both the source and the destination
-addresses match their respective options the packet will be routed into the
-tunnel.
-.It Ic exchange_lifetime
-Determines the lifetime of the exchange.
-After an exchange expires
-no new SPIs are created, which means the transport or tunnel is torn down
-as soon as the current SPI times out (see
-.Ic spi_lifetime
-below).
-The default value is gotten from the
-.Ic exchange_lifetime
-parameter given in
-.Pa photuris.conf .
-If it is not given there the default is 1800 seconds.
-.It Ic spi_lifetime
-Determines the lifetime of each created SPI in the exchange.
-.It Ic user
-The user name for whom the keying shall be done.
-Preconfigured secrets are taken from the users secret file.
-.El
-.Sh EXAMPLES
-startkey dst=169.200.12.23 options=auth
-.Sh FILES
-.Bl -tag -width /etc/photuris/photuris.pipe -compact
-.It Pa /etc/photuris/photuris.pipe
-FIFO in which keying requests are written
-.El
-.Sh SEE ALSO
-.Xr photurisd 8
-
diff --git a/sbin/startkey/startkey.c b/sbin/startkey/startkey.c
deleted file mode 100644
index 3e311693999..00000000000
--- a/sbin/startkey/startkey.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/* $OpenBSD: startkey.c,v 1.3 2001/03/08 21:41:51 deraadt Exp $ */
-
-/*
- * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
- * All rights reserved.
- *
- * This code is originally from Angelos D. Keromytis, kermit@forthnet.gr
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Niels Provos.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef lint
-static char rcsid[] = "$OpenBSD: startkey.c,v 1.3 2001/03/08 21:41:51 deraadt Exp $";
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <unistd.h>
-#include "photuris.h"
-
-void
-usage(char *name)
-{
- fprintf(stderr, "Usage: %s [-d dir] <options...>\n", name);
- exit(0);
-}
-
-
-/*
- * Just a program to start a key establishment session
- */
-
-int
-main(int argc, char **argv)
-{
- int fd, ch;
- int i, len;
-
- char *dir = PHOTURIS_DIR, *buffer;
-
- while ((ch = getopt(argc, argv, "d:")) != -1)
- switch((char)ch) {
- case 'd':
- dir = optarg;
- break;
- default:
- usage(argv[0]);
- }
-
- if (argc - optind < 1)
- usage(argv[0]);
-
- argc -= optind;
- argv += optind;
-
- for (len=0, i=0; i<argc; i++) {
- if (strchr(argv[i], '=') == NULL) {
- fprintf(stderr, "missing = in %s\n", argv[i]);
- exit(1);
- }
- len += strlen(argv[i])+1;
- }
-
- if (chdir(dir) == -1) {
- fprintf(stderr, "Can't change dir to %s\n", dir);
- exit(1);
- }
-
- fd = open(PHOTURIS_FIFO, O_WRONLY | O_NONBLOCK, 0);
-
- if (fd == -1)
- {
- perror("open()");
- exit(1);
- }
-
- if ((buffer = calloc(len, sizeof(char))) == NULL) {
- perror("calloc()");
- exit(1);
- }
-
- for (i=0; i<argc; i++) {
- strcpy(buffer+strlen(buffer), argv[i]);
- strcat(buffer, " ");
- }
-
- if (write(fd, buffer, strlen(buffer)) != strlen(buffer))
- {
- perror("write()");
- exit(1);
- }
-
- free(buffer);
-
- close(fd);
-
- exit(0);
-}