head	1.4;
access;
symbols
	RELEASE_6_1_0:1.3
	RELEASE_5_5_0:1.3
	RELEASE_6_0_0:1.3
	RELEASE_5_4_0:1.3
	RELEASE_4_11_0:1.3
	RELEASE_5_3_0:1.3
	RELEASE_4_10_0:1.3
	RELEASE_5_2_1:1.3
	RELEASE_5_2_0:1.3
	RELEASE_4_9_0:1.3
	RELEASE_5_1_0:1.3
	RELEASE_4_8_0:1.3
	RELEASE_5_0_0:1.3
	RELEASE_4_7_0:1.3
	RELEASE_4_6_2:1.3
	RELEASE_4_6_1:1.3
	RELEASE_4_6_0:1.3
	RELEASE_5_0_DP1:1.3
	RELEASE_4_5_0:1.3
	RELEASE_4_4_0:1.3
	RELEASE_4_3_0:1.3
	RELEASE_4_2_0:1.3
	RELEASE_4_1_1:1.3
	RELEASE_4_1_0:1.3
	RELEASE_3_5_0:1.3
	RELEASE_4_0_0:1.3
	RELEASE_3_4_0:1.2
	RELEASE_3_3_0:1.2
	RELEASE_3_2_0:1.2
	RELEASE_3_1_0:1.1
	RELEASE_2_2_8:1.1
	RELEASE_3_0_0:1.1
	RELEASE_2_2_7:1.1;
locks; strict;
comment	@# @;


1.4
date	2006.04.06.13.54.44;	author archie;	state dead;
branches;
next	1.3;

1.3
date	2000.01.26.01.55.21;	author archie;	state Exp;
branches;
next	1.2;

1.2
date	99.03.10.22.27.54;	author archie;	state Exp;
branches;
next	1.1;

1.1
date	98.04.13.00.17.45;	author julian;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Remove the skip port. Created before there was an IPSec implementation on
FreeBSD, it is now extremely obsolete. In any case it doesn't compile. Earlier
version of this port can still be used on older versions of FreeBSD of course.
@
text
@diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/keymgrd/skipd.C work.new/skip/keymgrd/skipd.C
--- skipsrc-1.0.orig/skip/keymgrd/skipd.C	Fri Oct 25 13:12:54 1996
+++ work.new/skip/keymgrd/skipd.C	Mon Jan 24 12:35:40 2000
@@@@ -48,6 +48,7 @@@@
  * System includes
  */
 #include <skip_os.h>
+#include <err.h>
 
 /*
  * SKIP includes
@@@@ -84,8 +85,9 @@@@
 {
 	int c;
 	int errflag = 0;
+	int noFork = 0;
 
-	while ((c = getopt(argc, argv, "vV?")) != EOF) {
+	while ((c = getopt(argc, argv, "nvV?")) != EOF) {
 		switch(c) {
 		case 'v':
 			verbose = 1;
@@@@ -95,6 +97,9 @@@@
 			verbose = 2;
 			break;
 
+		case 'n':
+			noFork = 1;
+			break;
 		case '?':
 		default:
 			errflag++;
@@@@ -106,34 +111,18 @@@@
 		exit(1);
 	}
 
+	if (!noFork)
 	{
-		extern FILE *skip_log_fp;
-
-		skip_log_fp = fopen("/var/log/skipd.log", "w+");
+		extern int skip_log_syslog;
 
-		// if open fails, skip_log will default to stdout/stderr
+		/* output to syslog */
+		openlog("skipd", 0, LOG_DAEMON);
+		skip_log_syslog = 1;
+
+		/* become a background daemon */
+		if (daemon(0, 0))
+			err(1, "daemon");
 	}
-
-
-//  put ourselves into the background
-
-	switch (fork()) {
-	case -1:
-		skip_log(SKIP_ERROR, "fork failed");
-		exit(1);
-
-	case 0:
-		break;
-
-	default:
-		exit(0);
-	}
-
-	setsid();
-
-	freopen("/dev/null", "r", stdin);
-	freopen("/dev/null", "w", stdout);
-	freopen("/dev/null", "w", stderr);
 
 	skip_init();
 	skipd_loop();
@


1.3
log
@Bash this port until it compiles under -current again.
@
text
@@


1.2
log
@Build SKIP port as a KLD instead of an LKM.
@
text
@d1 76
a76 18
diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/man/skipdb.1m work.new/skip/man/skipdb.1m
--- skipsrc-1.0.orig/skip/man/skipdb.1m	Fri Oct 25 13:12:57 1996
+++ work.new/skip/man/skipdb.1m	Mon Mar  8 21:33:40 1999
@@@@ -79,13 +79,9 @@@@
 skipdb will always return 0 on Success and non-zero on error.  An appropriate
 error message will be written to standard error.
 .SH FILES
-.SS Solaris 1.x systems:
 .P
-/etc/skip/certdb
+@@@@PREFIX@@@@/etc/skip/certdb
 .br
-.SS Solaris 2.x systems:
-.P
-/etc/opt/SUNWicg/skip/certdb
 .P
 .SH SEE ALSO
 .BR skiplocal(1m)
@


1.1
log
@Submitted by:	archie Cobbs (archie@@whistle.com)
updates to make skip port work better, from the original porter.
@
text
@d1 18
a18 161
diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/tools/skiphost/skiphost.c skipsrc-1.0/skip/tools/skiphost/skiphost.c
--- skipsrc-1.0.orig/skip/tools/skiphost/skiphost.c	Fri Oct 25 13:13:03 1996
+++ skipsrc-1.0/skip/tools/skiphost/skiphost.c	Sun Apr 12 15:29:52 1998
@@@@ -76,6 +76,7 @@@@
 static char	*skip_version = NULL;
 static char	*skip_mode = NULL;
 static char	*tunnel = NULL;
+static char	*srcaddr = NULL;
 
 static int	opt, opt_cpt;
 static int	opt_action, opt_more;
@@@@ -89,11 +90,14 @@@@
 static int	opt_prt, opt_sh, opt_sel;
 static int	opt_trs, opt_tunnel;
 static int	opt_msk, opt_nomadic;
+static int	opt_source;
 
 boolean_t       on_boot = B_FALSE;
 
 #define		SKIP_HOST_MASK	"255.255.255.255"
 
+struct in_addr 	source_addr;
+
 static void	usage();
 
 /*
@@@@ -218,6 +222,11 @@@@
 	if (params->ip_addr.s_addr != params->tunnel_addr.s_addr) {
 		printf(" -A %s", inet_ntoa(params->tunnel_addr));
 	}
+	
+	if(params->source != 0) {
+		source_addr.s_addr = params->source;	
+		printf(" -f %s", inet_ntoa(source_addr));
+	}
 
 	switch (params->version) {
 
@@@@ -376,6 +385,11 @@@@
 		printf(" tunnel=%s", inet_ntoa(params->tunnel_addr));
 	}
 
+	if (params->source != 0) {
+		source_addr.s_addr = params->source;
+		printf(" source=%s", inet_ntoa(source_addr));
+	}
+
 	switch (params->version) {
 
 	case SKIP_NONE:
@@@@ -907,12 +921,18 @@@@
 		}
 	}
 
+	if(opt_source) {
+		parms.source = inet_addr(srcaddr);
+	} else {
+		parms.source = 0;
+	}
+
 	/*
 	 * Check if a cleartext host...
 	 */
 	opt_sel = opt_r_nsid + opt_s_nsid + opt_r_keyid;
 	opt_sel += opt_kij + opt_crypt + opt_mac + opt_comp;
-	opt_sel += opt_vers + opt_nomadic + opt_tunnel;
+	opt_sel += opt_vers + opt_nomadic + opt_tunnel + opt_source;
 
 	if (!opt_sel) {
 		/*
@@@@ -1531,6 +1551,7 @@@@
 		"\t\t[-r <receiver NSID>] [-R <receiver key Id>]...\n"
 		"\t\t[-s <sender NSID>] [-S <sender key Id>]...\n"
 		"\t\t[-v <SKIP version>] [-A <tunnel address>] [-T]\n"
+		"\t\t[-f <source address>]\n"
 		"\t%s [-i <interface>] "
 			"-x <hostname|IP address|\"*\"> [-M <mask>]...\n"
 		"\t\t[-k <kij algorithm>] [-t <crypt algorithm>]...\n"
@@@@ -1592,6 +1613,7 @@@@
 	opt_trs = opt_msk = 0;
 	opt_prt = opt_sh = opt_mode = 0;
 	opt_nomadic = opt_tunnel = 0;
+	opt_source = 0;
 
 	ifname = skip_default_if();
 
@@@@ -1614,7 +1636,7 @@@@
 	 */
 	optind = 1;
 	while ((opt = getopt(argc, argv,
-			"phuPVTa:d:o:x:i:s:r:S:R:k:t:m:c:v:M:A:")) != -1) {
+			"phuPVTa:d:o:x:i:s:r:S:R:k:t:m:c:v:M:A:f:")) != -1) {
 
 		switch (opt) {
 	
@@@@ -1761,7 +1783,10 @@@@
 			SKIP_ONE(&opt_tunnel);
 			tunnel = optarg;
 			break;
-
+		case 'f':
+			SKIP_ONE(&opt_source);
+			srcaddr = optarg;
+			break;
 		case 'h':
 		default:
 			usage();
@@@@ -1890,7 +1915,7 @@@@
 		opt_sel = opt_r_nsid + opt_s_nsid + opt_r_keyid + opt_s_keyid;
 		opt_sel += opt_kij + opt_crypt + opt_mac + opt_comp;
 		opt_sel += opt_mode + opt_vers + opt_trs + opt_msk;
-		opt_sel += opt_tunnel;
+		opt_sel += opt_tunnel + opt_source;
 
 		if (opt_sel) {
 			fprintf(stderr, "%s -u does not take options\n",
@@@@ -1912,7 +1937,7 @@@@
 		opt_sel = opt_r_nsid + opt_s_nsid + opt_r_keyid + opt_s_keyid;
 		opt_sel += opt_kij + opt_crypt + opt_mac + opt_comp;
 		opt_sel += opt_mode + opt_vers + opt_trs + opt_msk;
-		opt_sel += opt_tunnel;
+		opt_sel += opt_tunnel + opt_source;
 
 		if (opt_sel) {
 			fprintf(stderr, "%s -p does not take options\n",
@@@@ -1941,7 +1966,7 @@@@
 		opt_sel = opt_r_nsid + opt_s_nsid + opt_r_keyid + opt_s_keyid;
 		opt_sel += opt_kij + opt_crypt + opt_mac + opt_comp;
 		opt_sel += opt_mode + opt_vers + opt_trs + opt_msk;
-		opt_sel += opt_tunnel;
+		opt_sel += opt_tunnel + opt_source;
 
 		if (opt_sel) {
 			fprintf(stderr, "%s -P does not take options\n",
@@@@ -1963,7 +1988,7 @@@@
 		opt_sel = opt_r_nsid + opt_s_nsid + opt_r_keyid + opt_s_keyid;
 		opt_sel += opt_kij + opt_crypt + opt_mac + opt_comp;
 		opt_sel += opt_mode + opt_vers + opt_trs + opt_msk;
-		opt_sel += opt_tunnel;
+		opt_sel += opt_tunnel + opt_source;
 
 		if (opt_sel) {
 			fprintf(stderr, "%s -V does not take options\n",
@@@@ -1985,7 +2010,7 @@@@
 		opt_sel = opt_r_nsid + opt_s_nsid + opt_r_keyid + opt_s_keyid;
 		opt_sel += opt_kij + opt_crypt + opt_mac + opt_comp;
 		opt_sel += opt_vers + opt_trs + opt_msk;
-		opt_sel += opt_tunnel;
+		opt_sel += opt_tunnel + opt_source;
 
 		if (opt_sel) {
 			usage();
@@@@ -2018,7 +2043,7 @@@@
 		 */
 		opt_sel = opt_s_nsid + opt_s_keyid;
 		opt_sel += opt_kij + opt_crypt + opt_mac + opt_comp;
-		opt_sel += opt_mode + opt_trs + opt_tunnel;
+		opt_sel += opt_mode + opt_trs + opt_tunnel + opt_source;
 
 		if (opt_sel) {
 			usage();
@

