sync patch with upstream; drop check for config_arg being NULL,

since that's impossible now the getopt string is fixed.
This commit is contained in:
sthen 2012-08-31 13:41:28 +00:00
parent aa77be931f
commit a01f15a3eb
2 changed files with 6 additions and 13 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.11 2012/08/31 12:30:56 sthen Exp $
# $OpenBSD: Makefile,v 1.12 2012/08/31 13:41:28 sthen Exp $
COMMENT= client for Cisco AnyConnect SSL VPN
DISTNAME= openconnect-4.06
REVISION= 0
REVISION= 1
DIST_SUBDIR= openconnect
VPNC_SCRIPT= vpnc-script
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${VPNC_SCRIPT}:0

View File

@ -1,9 +1,9 @@
$OpenBSD: patch-main_c,v 1.1 2012/08/31 12:30:56 sthen Exp $
$OpenBSD: patch-main_c,v 1.2 2012/08/31 13:41:28 sthen Exp $
http://git.infradead.org/users/dwmw2/openconnect.git/commit/8e16a755388ffea541a4543e252ebbe297d2eee8
--- main.c.orig Thu Jul 12 13:57:30 2012
+++ main.c Wed Aug 29 21:06:56 2012
+++ main.c Fri Aug 31 14:39:34 2012
@@ -338,7 +338,7 @@ static int next_option(int argc, char **argv, char **c
next:
if (!config_file) {
@ -13,16 +13,9 @@ http://git.infradead.org/users/dwmw2/openconnect.git/commit/8e16a755388ffea541a4
long_options, NULL);
*config_arg = optarg;
@@ -596,9 +596,13 @@ int main(int argc, char **argv)
}
break;
@@ -598,7 +598,7 @@ int main(int argc, char **argv)
case 'p':
- vpninfo->cert_password = strdup(config_arg);
+ if(config_arg)
+ vpninfo->cert_password = strdup(config_arg);
+ else {
+ fprintf(stderr, _("-p specified but no password given.\n"));
+ }
vpninfo->cert_password = strdup(config_arg);
break;
- case 'P':
+ case 'P':