diff options
author | Emanuel Haupt <ehaupt@FreeBSD.org> | 2008-03-06 19:11:59 +0000 |
---|---|---|
committer | Emanuel Haupt <ehaupt@FreeBSD.org> | 2008-03-06 19:11:59 +0000 |
commit | 3f09051360caa7c723bc7271bf8eb7075a8b638f (patch) | |
tree | 2b0bc03dd82a97457d32187c974693105c73c265 /security/vpnc | |
parent | 7dfd3bf07bd6594a606e44d27364fb7e73cdc52d (diff) | |
download | ports-3f09051360caa7c723bc7271bf8eb7075a8b638f.tar.gz ports-3f09051360caa7c723bc7271bf8eb7075a8b638f.zip |
Notes
Diffstat (limited to 'security/vpnc')
-rw-r--r-- | security/vpnc/Makefile | 9 | ||||
-rw-r--r-- | security/vpnc/files/patch-config.c | 50 |
2 files changed, 46 insertions, 13 deletions
diff --git a/security/vpnc/Makefile b/security/vpnc/Makefile index 822102fb901f..7d805b8bc5d5 100644 --- a/security/vpnc/Makefile +++ b/security/vpnc/Makefile @@ -27,8 +27,9 @@ ALL_TARGET= all PORTDOCS= README TODO MAN8= vpnc.8 -OPTIONS+= DECRYPT "cisco-decypt password decrypt utility" on -OPTIONS+= SSL "OpenSSL certificate support (hybrid only)" off +OPTIONS+= DECRYPT "cisco-decypt password decrypt utility" on +OPTIONS+= SSL "OpenSSL certificate support (hybrid only)" off +OPTIONS+= CISCOVERSION "Mask linux presentation string" off MAKE_ENV+= LDFLAGS="${LDFLAGS}" CFLAGS="${CFLAGS}" CC="${CC}" \ BINS="${EXTRABUILDS}" @@ -49,6 +50,10 @@ CFLAGS+= -DOPENSSL_GPL_VIOLATION LDFLAGS+= -lcrypto .endif +.if defined(WITH_CISCOVERSION) +CFLAGS+= -DCISCO_PATCH_VERSION +.endif + post-patch: @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/config.c @${REINPLACE_CMD} -e 's|\(/etc/vpnc\)|${PREFIX}\1|' \ diff --git a/security/vpnc/files/patch-config.c b/security/vpnc/files/patch-config.c index ad7e848fd562..890536b9b17c 100644 --- a/security/vpnc/files/patch-config.c +++ b/security/vpnc/files/patch-config.c @@ -1,6 +1,40 @@ ---- config.c.orig 2007-09-10 22:39:48.000000000 +0200 -+++ config.c 2008-02-26 11:33:02.000000000 +0100 -@@ -267,12 +267,12 @@ +--- config.c.orig 2008-03-06 17:03:57.000000000 +0100 ++++ config.c 2008-03-06 17:14:29.000000000 +0100 +@@ -257,17 +257,36 @@ + + static const char *config_def_app_version(void) + { +- struct utsname uts; +- char *version; ++ char *version; ++#ifndef CISCO_PATCH_VERSION ++ struct utsname uts; + +- uname(&uts); +- asprintf(&version, "Cisco Systems VPN Client %s:%s", VERSION, uts.sysname); +- return version; ++ uname(&uts); ++#endif ++ ++#ifdef CISCO_PATCH_VERSION ++ /* ++ * Raffaele De Lorenzo March 2008 ++ * Some Cisco Concentrator refuse connection if the Presentation Version ++ * String is not the same like Official "Cisco VPN Client". This patch ++ * masked the version to "Cisco Systems VPN Client 4.8.00 (0490):Linux", ++ */ ++#define CISCO_CONC_PRESENT_VERSION "Cisco Systems VPN Client 4.8.00 (0490):Linux" ++#endif ++ ++ asprintf(&version, ++#ifdef CISCO_PATCH_VERSION ++ CISCO_CONC_PRESENT_VERSION ++#else ++ "Cisco Systems VPN Client %s:%s", VERSION, uts.sysname ++#endif ++ ); ++ return version; + } static const char *config_def_script(void) { @@ -9,13 +43,7 @@ } static const char *config_def_pid_file(void) - { -- return "/var/run/vpnc/pid"; -+ return "/var/run/vpnc.pid"; - } - - static const char *config_def_vendor(void) -@@ -538,7 +538,7 @@ +@@ -538,7 +557,7 @@ { char *realname; @@ -24,7 +52,7 @@ return realname; } -@@ -757,8 +757,8 @@ +@@ -757,8 +776,8 @@ } if (!got_conffile) { |