From owner-freebsd-security@FreeBSD.ORG Sun Dec 11 17:08:09 2005 Return-Path: X-Original-To: freebsd-security@freebsd.org Delivered-To: freebsd-security@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C00EF16A41F; Sun, 11 Dec 2005 17:08:09 +0000 (GMT) (envelope-from Gabor@Zahemszky.HU) Received: from fuz.mail.t-online.hu (fuz.mail.t-online.hu [195.228.240.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id F0F1543D46; Sun, 11 Dec 2005 17:08:08 +0000 (GMT) (envelope-from Gabor@Zahemszky.HU) Received: from [192.168.1.3] (dsl51B68256.pool.t-online.hu [81.182.130.86]) by fuz.mail.t-online.hu (8.13.4/8.12.11) with ESMTP id jBBH80DT037249; Sun, 11 Dec 2005 18:08:04 +0100 (CET) Message-ID: <439C5E30.9090605@Zahemszky.HU> Date: Sun, 11 Dec 2005 18:13:20 +0100 From: =?ISO-8859-2?Q?Zahemszky_G=E1bor?= User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051208) X-Accept-Language: en-us, en MIME-Version: 1.0 To: simon@freebsd.org, freebsd-security@freebsd.org Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-vbmsrv: scanned Cc: Subject: bug? in making security/isakmpd X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Dec 2005 17:08:10 -0000 Hi! There is a little problem in the security/isakmpd port. There are some gen*.sh scripts in it, which generate some C header (and src) files. These scripts are using awk, tr, etc - some generic UNIX tools. One of the tools has problems with some localisations, so these scripts generate incorrect C-code. Eg, I have Hungarian localisation set, so I have the following in my environ: LANG=hu_HU.ISO8859-2 But with it, I get so many errors, like this: $ cd /usr/ports/security/isakmpd $ make So many lines deleted .... cc -O2 -fno-strict-aliasing -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -DNEED_SYSDEP_APP -I/usr/ports/security/isakmpd/work/isakmpd -I/usr/ports/security/isakmpd/work/isakmpd/sysdep/freebsd -I. -DHAVE_GETIFADDRS -DHAVE_PCAP -I/usr/ports/security/isakmpd/work/isakmpd/sysdep/common -I/usr/include -I/usr/include/openssl -I/usr/local/include -I/usr/local/include/openssl -DUSE_TRIPLEDES -DUSE_DES -DUSE_BLOWFISH -DUSE_CAST -DUSE_X509 -DUSE_EC -DUSE_AGGRESSIVE -DUSE_DEBUG -DUSE_RAWKEY -DMP_FLAVOUR=MP_FLAVOUR_OPENSSL -DUSE_LIBCRYPTO -DUSE_PF_KEY_V2 -c attribute.c In file included from isakmp.h:36, from attribute.c:40: isakmp_fld.h:28: error: stray '\223' in program isakmp_fld.h:28: error: syntax error before "_paxload_maps" isakmp_fld.h:37: error: stray '\223' in program isakmp_fld.h:37: error: syntax error before "xpe_maps" isakmp_fld.h:59: error: stray '\223' in program isakmp_fld.h:59: error: syntax error before "_paxload_maps" isakmp_fld.h:72: error: stray '\223' in program isakmp_fld.h:72: error: stray '\223' in program isakmp_fld.h:72: error: syntax error before "r_fld" isakmp_fld.h:76: error: stray '\223' in program isakmp_fld.h:76: error: stray '\223' in program isakmp_fld.h:76: error: syntax error before "r_" isakmp_fld.h:76: error: stray '\223' in program isakmp_fld.h:108: error: stray '\223' in program isakmp_fld.h:108: error: syntax error before "o_maps" isakmp_fld.h:124: error: stray '\223' in program isakmp_fld.h:124: error: syntax error before "ransform_fld" isakmp_fld.h:165: error: stray '\223' in program isakmp_fld.h:165: error: syntax error before "_fld" isakmp_fld.h:169: error: stray '\223' in program isakmp_fld.h:169: error: syntax error before "_encoding_maps" isakmp_fld.h:177: error: stray '\223' in program isakmp_fld.h:177: error: syntax error before "req_fld" isakmp_fld.h:181: error: stray '\223' in program isakmp_fld.h:181: error: syntax error before "req_" isakmp_fld.h:181: error: stray '\223' in program isakmp_fld.h:210: error: stray '\223' in program isakmp_fld.h:210: error: syntax error before "ifx_fld" isakmp_fld.h:214: error: stray '\223' in program isakmp_fld.h:214: error: syntax error before "ifx_doi_maps" isakmp_fld.h:219: error: stray '\223' in program isakmp_fld.h:219: error: syntax error before "ifx_pro" isakmp_fld.h:219: error: stray '\223' in program isakmp_fld.h:228: error: stray '\223' in program isakmp_fld.h:228: error: syntax error before "ifx_msg_" isakmp_fld.h:228: error: stray '\223' in program isakmp_fld.h:236: error: stray '\223' in program isakmp_fld.h:236: error: syntax error before "e_fld" isakmp_fld.h:240: error: stray '\223' in program isakmp_fld.h:240: error: syntax error before "e_doi_maps" isakmp_fld.h:245: error: stray '\223' in program isakmp_fld.h:245: error: syntax error before "e_pro" isakmp_fld.h:245: error: stray '\223' in program isakmp_fld.h:261: error: stray '\251' in program isakmp_fld.h:261: error: syntax error before "endor_fld" isakmp_fld.h:268: error: stray '\223' in program isakmp_fld.h:268: error: stray '\223' in program isakmp_fld.h:268: error: syntax error before "rib" isakmp_fld.h:268: error: stray '\254' in program isakmp_fld.h:268: error: stray '\223' in program isakmp_fld.h:272: error: stray '\223' in program isakmp_fld.h:272: error: stray '\223' in program isakmp_fld.h:272: error: syntax error before "rib" isakmp_fld.h:272: error: stray '\254' in program isakmp_fld.h:272: error: stray '\223' in program isakmp_fld.h:272: error: stray '\223' in program isakmp_fld.h:288: error: stray '\223' in program isakmp_fld.h:288: error: syntax error before "_d_fld" isakmp_fld.h:295: error: stray '\223' in program isakmp_fld.h:295: error: syntax error before "_oa_fld" In file included from isakmp.h:37, from attribute.c:40: isakmp_num.h:3:18: warning: extra tokens at end of #ifndef directive isakmp_num.h:4:18: warning: ISO C requires whitespace after the macro name In file included from isakmp.h:37, from attribute.c:40: isakmp_num.h:63: error: stray '\223' in program isakmp_num.h:63: error: syntax error before "enc_cst" isakmp_num.h:82: error: stray '\223' in program isakmp_num.h:82: error: syntax error before "ifx_cst" isakmp_num.h:130: error: stray '\251' in program isakmp_num.h:130:36: invalid suffix "_no" on integer constant isakmp_num.h:130: error: syntax error before numeric constant isakmp_num.h:130: error: stray '\223' in program isakmp_num.h:169: error: stray '\223' in program isakmp_num.h:169: error: syntax error before "o_cst" isakmp_num.h:184: error: stray '\223' in program isakmp_num.h:184: error: stray '\223' in program isakmp_num.h:184: error: syntax error before "r_cst" isakmp_num.h:213: error: stray '\223' in program isakmp_num.h:213: error: syntax error before "xpe_cst" attribute.c: In function `attribute_set_basic': attribute.c:46: error: stray '\223' in program attribute.c:46: error: stray '\223' in program attribute.c:46: error: `isakmp_a' undeclared (first use in this function) attribute.c:46: error: (Each undeclared identifier is reported only once attribute.c:46: error: for each function it appears in.) attribute.c:46: error: syntax error before "r_fld" attribute.c:47: error: stray '\223' in program attribute.c:47: error: stray '\223' in program attribute.c:47: error: syntax error before "r_fld" attribute.c: In function `attribute_set_var': attribute.c:55: error: stray '\223' in program attribute.c:55: error: stray '\223' in program attribute.c:55: error: `isakmp_a' undeclared (first use in this function) attribute.c:55: error: syntax error before "r_fld" attribute.c:56: error: stray '\223' in program attribute.c:56: error: stray '\223' in program attribute.c:56: error: syntax error before "r_fld" attribute.c: In function `attribute_map': attribute.c:80: error: stray '\223' in program attribute.c:80: error: stray '\223' in program attribute.c:80: error: `isakmp_a' undeclared (first use in this function) attribute.c:80: error: syntax error before "r_fld" attribute.c:86: error: stray '\223' in program attribute.c:86: error: stray '\223' in program attribute.c:86: error: syntax error before "r_fld" *** Error code 1 Stop in /usr/ports/security/isakmpd/work/isakmpd. *** Error code 1 Stop in /usr/ports/security/isakmpd. $ If I correct this file, I get another problem with another file - all of the files (6 or 7) generated with these scripts - has errors. (But with LANG=C - or without any LANG - I can compile isakmpd.) I think the real problem is the bug in tr/awk - maybe somebody has to look at it, too. By, Gabor < Gabor at Zahemszky dot HU > -- #!/bin/ksh Z='21N16I25C25E30, 40M30E33E25T15U!';IFS=' ABCDEFGHIJKLMNOPQRSTUVWXYZ ';set -- $Z;for i;{ [[ $i = ? ]]&&print $i&&break;[[ $i = ??? ]]&&j=$i&&i=${i%?};typeset -i40 i=8#$i;print -n ${i#???};[[ "$j" = ??? ]]&&print -n "${j#??} "&&j=;typeset +i i;};IFS=' 0123456789 ';set -- $Z;for i;{ [[ $i = , ]]&&i=2;[[ $i = ?? ]]||typeset -l i;j="$j $i";typeset +l i;};print "$j"