summaryrefslogtreecommitdiffstats
path: root/security/wpa_supplicant
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2005-02-16 07:03:32 +0000
committerbrooks <brooks@FreeBSD.org>2005-02-16 07:03:32 +0000
commit97c523ff8db932660fe36cbd6c2792dbbd08fc09 (patch)
tree526b92bd4a76ce7142525cf585e08c937cd43206 /security/wpa_supplicant
parentc3ca19614f9bd03e2bd4b0dd19c139a3bac8c63d (diff)
downloadFreeBSD-ports-97c523ff8db932660fe36cbd6c2792dbbd08fc09.zip
FreeBSD-ports-97c523ff8db932660fe36cbd6c2792dbbd08fc09.tar.gz
- Update to 0.3.8. See ChangeLog for details.
- Install sample config file in etc/wpa_supplication.conf.sample instead of DOCSDIR. - Obey PREFIX. - Follow move of binaries from bin to sbin. Committed from a laptop running this version against an AP with WPA-PSK and AES encription. Submitted by: Yamamoto Shigeru <shigeru at iij dot ad dot jp> PR: 75609 (by Rong-En Fan <rafan at infor dot org>)
Diffstat (limited to 'security/wpa_supplicant')
-rw-r--r--security/wpa_supplicant/Makefile21
-rw-r--r--security/wpa_supplicant/distinfo4
-rw-r--r--security/wpa_supplicant/files/config.bsd5
-rw-r--r--security/wpa_supplicant/files/patch-grp.h130
-rw-r--r--security/wpa_supplicant/files/patch-pidfile86
-rw-r--r--security/wpa_supplicant/files/patch-type11
6 files changed, 104 insertions, 153 deletions
diff --git a/security/wpa_supplicant/Makefile b/security/wpa_supplicant/Makefile
index 6b64ba48..141e86a 100644
--- a/security/wpa_supplicant/Makefile
+++ b/security/wpa_supplicant/Makefile
@@ -6,24 +6,26 @@
#
PORTNAME= wpa_supplicant
-PORTVERSION= 0.3.0
-PORTREVISION= 1
+PORTVERSION= 0.3.8
CATEGORIES= security net
MASTER_SITES= http://hostap.epitest.fi/releases/
MAINTAINER= ports@FreeBSD.org
COMMENT= Supplicant (client) for WPA/802.1x protocols
+USE_REINPLACE= yes
+
BUILD_DEPENDS= ${LOCALBASE}/lib/libdnet.a:${PORTSDIR}/net/libdnet
-PLIST_FILES= bin/wpa_supplicant \
- bin/wpa_passphrase \
- bin/wpa_cli
+PLIST_FILES= sbin/wpa_supplicant \
+ sbin/wpa_passphrase \
+ sbin/wpa_cli
+
+PLIST_FILES+= etc/${PORTNAME}.conf.sample
.if !defined(NOPORTDOCS)
DOCFILES= README \
- ChangeLog \
- wpa_supplicant.conf
+ ChangeLog
PLIST_FILES+= ${DOCFILES:S,^,%%DOCSDIR%%/,}
PLIST_DIRS+= %%DOCSDIR%%
.endif
@@ -31,14 +33,17 @@ PLIST_DIRS+= %%DOCSDIR%%
WRKSRC= ${WRKDIR}/${DISTNAME}
USE_GMAKE= yes
-post-extract:
+post-patch:
@${CP} ${FILESDIR}/config.bsd ${WRKSRC}/.config
+ @${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/.config
+ @${REINPLACE_CMD} 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/Makefile
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@${INSTALL_DATA} ${DOCFILES:S|^|${WRKSRC}/|} ${DOCSDIR}
.endif
+ @${INSTALL_DATA} ${WRKSRC}/wpa_supplicant.conf ${PREFIX}/etc/wpa_supplicant.conf.sample
.include <bsd.port.pre.mk>
diff --git a/security/wpa_supplicant/distinfo b/security/wpa_supplicant/distinfo
index f93a795..7fbe4e7 100644
--- a/security/wpa_supplicant/distinfo
+++ b/security/wpa_supplicant/distinfo
@@ -1,2 +1,2 @@
-MD5 (wpa_supplicant-0.3.0.tar.gz) = 579e663120882835b5b2484ccfa60548
-SIZE (wpa_supplicant-0.3.0.tar.gz) = 253706
+MD5 (wpa_supplicant-0.3.8.tar.gz) = c9ced104f0322f834a84336c293b4b57
+SIZE (wpa_supplicant-0.3.8.tar.gz) = 301163
diff --git a/security/wpa_supplicant/files/config.bsd b/security/wpa_supplicant/files/config.bsd
index 6e96461..c6fb06d 100644
--- a/security/wpa_supplicant/files/config.bsd
+++ b/security/wpa_supplicant/files/config.bsd
@@ -1,4 +1,5 @@
CONFIG_DRIVER_BSD=y
+CONFIG_CTRL_IFACE=y
CONFIG_IEEE8021X_EAPOL=y
CONFIG_EAP_MD5=y
CONFIG_EAP_MSCHAPV2=y
@@ -11,5 +12,5 @@ CONFIG_EAP_SIM=y
CONFIG_EAP_AKA=y
CONFIG_EAP_PSK=y
CONFIG_EAP_LEAP=y
-CFLAGS += -I/usr/local/include
-LIBS += -L/usr/local/lib
+CFLAGS += -I%%LOCALBASE%%/include
+LIBS += -L%%LOCALBASE%%/lib
diff --git a/security/wpa_supplicant/files/patch-grp.h b/security/wpa_supplicant/files/patch-grp.h
deleted file mode 100644
index cdb758f..0000000
--- a/security/wpa_supplicant/files/patch-grp.h
+++ /dev/null
@@ -1,130 +0,0 @@
---- eap.c Sun Dec 5 16:28:25 2004
-+++ eap.c Sun Dec 12 15:53:27 2004
-@@ -16,6 +16,7 @@
- #include <stdio.h>
- #include <string.h>
- #include <netinet/in.h>
-+#include <grp.h>
-
- #include "common.h"
- #include "eap_i.h"
---- eap_aka.c Sat Nov 27 10:29:04 2004
-+++ eap_aka.c Sun Dec 12 15:51:53 2004
-@@ -16,6 +16,7 @@
- #include <stdio.h>
- #include <string.h>
- #include <netinet/in.h>
-+#include <grp.h>
-
- #include "common.h"
- #include "eap_i.h"
---- eap_gtc.c Sat Nov 27 10:29:04 2004
-+++ eap_gtc.c Sun Dec 12 15:50:50 2004
-@@ -16,6 +16,7 @@
- #include <stdio.h>
- #include <netinet/in.h>
- #include <string.h>
-+#include <grp.h>
-
- #include "common.h"
- #include "eap_i.h"
---- eap_leap.c Sat Nov 27 10:29:04 2004
-+++ eap_leap.c Sun Dec 12 15:51:40 2004
-@@ -16,6 +16,7 @@
- #include <stdio.h>
- #include <string.h>
- #include <netinet/in.h>
-+#include <grp.h>
-
- #include "common.h"
- #include "eap_i.h"
---- eap_md5.c Sat Dec 4 08:53:24 2004
-+++ eap_md5.c Sun Dec 12 15:50:32 2004
-@@ -15,6 +15,7 @@
- #include <stdlib.h>
- #include <stdio.h>
- #include <netinet/in.h>
-+#include <grp.h>
-
- #include "common.h"
- #include "eap_i.h"
---- eap_mschapv2.c Sun Dec 5 16:28:25 2004
-+++ eap_mschapv2.c Sun Dec 12 15:50:42 2004
-@@ -16,6 +16,7 @@
- #include <stdio.h>
- #include <string.h>
- #include <netinet/in.h>
-+#include <grp.h>
-
- #include "common.h"
- #include "eap_i.h"
---- eap_otp.c Sat Nov 27 10:29:04 2004
-+++ eap_otp.c Sun Dec 12 15:51:01 2004
-@@ -16,6 +16,7 @@
- #include <stdio.h>
- #include <netinet/in.h>
- #include <string.h>
-+#include <grp.h>
-
- #include "common.h"
- #include "eap_i.h"
---- eap_peap.c Sun Dec 5 16:28:25 2004
-+++ eap_peap.c Sun Dec 12 15:50:15 2004
-@@ -16,6 +16,7 @@
- #include <stdio.h>
- #include <string.h>
- #include <netinet/in.h>
-+#include <grp.h>
-
- #include "common.h"
- #include "eap_i.h"
---- eap_psk.c Sat Nov 27 10:29:04 2004
-+++ eap_psk.c Sun Dec 12 15:51:47 2004
-@@ -16,6 +16,7 @@
- #include <stdio.h>
- #include <string.h>
- #include <netinet/in.h>
-+#include <grp.h>
-
- #include "common.h"
- #include "eap_i.h"
---- eap_sim.c Sat Nov 27 10:29:04 2004
-+++ eap_sim.c Sun Dec 12 15:51:08 2004
-@@ -16,6 +16,7 @@
- #include <stdio.h>
- #include <string.h>
- #include <netinet/in.h>
-+#include <grp.h>
-
- #include "common.h"
- #include "eap_i.h"
---- eap_tls.c Sat Nov 27 10:29:04 2004
-+++ eap_tls.c Sun Dec 12 15:49:28 2004
-@@ -16,6 +16,7 @@
- #include <stdio.h>
- #include <string.h>
- #include <netinet/in.h>
-+#include <grp.h>
-
- #include "common.h"
- #include "eap_i.h"
---- eap_tls_common.c Wed Oct 6 21:25:17 2004
-+++ eap_tls_common.c Sun Dec 12 15:53:38 2004
-@@ -16,6 +16,7 @@
- #include <stdio.h>
- #include <string.h>
- #include <netinet/in.h>
-+#include <grp.h>
-
- #include "common.h"
- #include "eap_i.h"
---- eap_ttls.c Sat Nov 27 10:29:04 2004
-+++ eap_ttls.c Sun Dec 12 15:50:25 2004
-@@ -16,6 +16,7 @@
- #include <stdio.h>
- #include <string.h>
- #include <netinet/in.h>
-+#include <grp.h>
-
- #include "common.h"
- #include "eap_i.h"
diff --git a/security/wpa_supplicant/files/patch-pidfile b/security/wpa_supplicant/files/patch-pidfile
new file mode 100644
index 0000000..5311984
--- /dev/null
+++ b/security/wpa_supplicant/files/patch-pidfile
@@ -0,0 +1,86 @@
+--- wpa_supplicant.c.orig Sat Feb 5 15:51:25 2005
++++ wpa_supplicant.c Wed Feb 16 01:16:55 2005
+@@ -32,6 +32,9 @@
+ #endif /* CONFIG_NATIVE_WINDOWS */
+ #include <fcntl.h>
+
++#include <sys/param.h>
++#include <paths.h>
++
+ #define OPENSSL_DISABLE_OLD_DES_SUPPORT
+ #include "common.h"
+ #include "eapol_sm.h"
+@@ -2285,12 +2288,43 @@
+ wpa_supplicant_cleanup(wpa_s);
+ }
+
++static const char* pid_filename = _PATH_VARRUN "wpa_supplicant.pid";
++
++static
++void
++remove_pid_file(void) {
++ unlink(pid_filename);
++}
++
++static
++void
++create_pidfile(const char* path_pid_file) {
++ FILE* fd;
++
++ if (path_pid_file) {
++ pid_filename = path_pid_file;
++ }
++
++ fd = fopen(pid_filename, "w");
++ if (fd) {
++ pid_t pid;
++
++ pid = getpid();
++
++ fprintf(fd, "%ld\n", pid);
++ fclose(fd);
++
++ atexit(remove_pid_file);
++ }
++}
++
+
+ int main(int argc, char *argv[])
+ {
+ struct wpa_supplicant *head, *wpa_s;
+ int c;
+ const char *confname, *driver, *ifname;
++ const char *path_pid_file = NULL;
+ int daemonize = 0, wait_for_interface = 0, disable_eapol = 0, exitcode;
+
+ #ifdef CONFIG_NATIVE_WINDOWS
+@@ -2312,7 +2346,7 @@
+ ifname = confname = driver = NULL;
+
+ for (;;) {
+- c = getopt(argc, argv, "Bc:D:dehi:KLNqtvw");
++ c = getopt(argc, argv, "Bc:D:dehi:KLNp:qtvw");
+ if (c < 0)
+ break;
+ switch (c) {
+@@ -2347,6 +2381,9 @@
+ case 'L':
+ license();
+ return -1;
++ case 'p':
++ path_pid_file = optarg;
++ break;
+ case 'q':
+ wpa_debug_level++;
+ break;
+@@ -2405,6 +2442,10 @@
+ exitcode = -1;
+ goto cleanup;
+ }
++ }
++
++ if (daemonize) {
++ create_pidfile(path_pid_file);
+ }
+
+ eloop_register_signal(SIGINT, wpa_supplicant_terminate, NULL);
diff --git a/security/wpa_supplicant/files/patch-type b/security/wpa_supplicant/files/patch-type
deleted file mode 100644
index fc18a7b..0000000
--- a/security/wpa_supplicant/files/patch-type
+++ /dev/null
@@ -1,11 +0,0 @@
---- eapol_sm.c Sun Dec 5 16:28:25 2004
-+++ eapol_sm.c Sun Dec 12 15:53:17 2004
-@@ -1371,7 +1371,7 @@
- }
-
-
--static unsigned int eapol_sm_get_int(void *ctx, enum eapol_int_var variable)
-+static unsigned int eapol_sm_get_int(void *ctx, enum eapol_bool_var variable)
- {
- struct eapol_sm *sm = ctx;
- if (sm == NULL)
OpenPOWER on IntegriCloud