Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 588998 - net-analyzer/wireshark-2.1.1 USE=kerberos with app-crypt/heimdal-1.5.3-r2 - In file included from ./asn1/kerberos/packet-kerberos-template.c:68:0: ./asn1/kerberos/packet-kerberos-template.h:104:28: error: expected identifier before numeric constant
Summary: net-analyzer/wireshark-2.1.1 USE=kerberos with app-crypt/heimdal-1.5.3-r2 - I...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-17 16:13 UTC by Martin von Gagern
Modified: 2017-01-22 12:44 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
net-analyzer:wireshark-2.1.1:20160716-184220.log.bz2 (net-analyzer:wireshark-2.1.1:20160716-184220.log.bz2,31.41 KB, application/x-bzip)
2016-07-17 16:13 UTC, Martin von Gagern
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2016-07-17 16:13:21 UTC
Created attachment 440946 [details]
net-analyzer:wireshark-2.1.1:20160716-184220.log.bz2

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -
I../../epan -DG_DISABLE_SINGLE_INCLUDES -DG_DISABLE_DEPRECATED -pthread -isystem
/usr/include/glib-2.0 -isystem/usr/lib64/glib-2.0/include -Wall -Wextra -Wendif-
labels -Wpointer-arith -Wformat-security -fwrapv -fno-strict-overflow -fno-delet
e-null-pointer-checks -Wvla -Waddress -Wattributes -Wdiv-by-zero -Wignored-quali
fiers -Wpragmas -Wno-overlength-strings -Wno-long-long -Wc++-compat -Wdeclaratio
n-after-statement -Wshadow -Wno-pointer-sign -Wold-style-definition -Wstrict-pro
totypes -Wlogical-op -Wjump-misses-init -fexcess-precision=fast -fvisibility=hid
den -march=amdfam10 -O2 -ggdb -pipe -c packet-kerberos.c  -fPIC -DPIC -o .libs/p
acket-kerberos.o
In file included from ./asn1/kerberos/packet-kerberos-template.c:68:0:
./asn1/kerberos/packet-kerberos-template.h:104:28: error: expected identifier before numeric constant
 #define KRB5_ENCTYPE_NULL  0
                            ^
In file included from ./asn1/kerberos/packet-kerberos-template.c:267:0:
/usr/include/krb5.h:125:28: error: ‘KRB5_ENCTYPE_DES3_CBC_MD5’ undeclared here (not in a function)
     ENCTYPE_DES3_CBC_MD5 = KRB5_ENCTYPE_DES3_CBC_MD5,
                            ^

Followed by many more errors like that second one.

Apparently there is a conflict here between the wireshark dissector on the one hand, which has this in ./asn1/kerberos/packet-kerberos-template.c:

/* encryption type constants */
#define KRB5_ENCTYPE_NULL               0
#define KRB5_ENCTYPE_DES_CBC_CRC        1
#define KRB5_ENCTYPE_DES_CBC_MD4        2
#define KRB5_ENCTYPE_DES_CBC_MD5        3
#define KRB5_ENCTYPE_DES_CBC_RAW        4
⋮

And on the other hand, heimdal itself has the following in /usr/include/x86_64-pc-linux-gnu/krb5_asn1.h:

typedef enum ENCTYPE {
  KRB5_ENCTYPE_NULL = 0,
  KRB5_ENCTYPE_DES_CBC_CRC = 1,
  KRB5_ENCTYPE_DES_CBC_MD4 = 2,
  KRB5_ENCTYPE_DES_CBC_MD5 = 3,
  KRB5_ENCTYPE_DES3_CBC_MD5 = 5,
  ⋮

Combined these give an invalid enum like this:

typedef enum ENCTYPE {
  0 = 0,
  1 = 1,
  2 = 2,
  3 = 3,
  KRB5_ENCTYPE_DES3_CBC_MD5 = 5,
  ⋮

Personally I'd say packet-kerberos-template.c shouldn't define these names, but instead either use a different naming scheme or rely on the constants provided in the headers. Surprisingly, the file does have some preprocessor case distinctions aimed at supporting heimdal, so it looks as though heimdal support were at least a goal in that codebase. So perhaps it's worth reporting this upstream?
Comment 1 Martin von Gagern 2016-09-04 19:47:16 UTC
wireshark-2.2.0_rc2 is still affected.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2016-09-05 04:09:39 UTC
(In reply to Martin von Gagern from comment #1)
> wireshark-2.2.0_rc2 is still affected.

Because you didn't report this upstream.
Comment 3 Martin von Gagern 2016-09-06 20:55:15 UTC
Reported upstream at https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=12831
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2016-09-08 11:06:21 UTC
(In reply to Martin von Gagern from comment #3)
> https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=12831

Great. Too late for 2.2.0, though.