Wednesday, January 25. 2006mod_auth_krb and apache 2.2.0
I had some troubles compiling mod_auth_kerb-5.0-rc6 with Apache 2.2.0. After running make I would get:
# make /path_to_apache2.2.0_installation/bin/apxs -c -I. -Ispnegokrb5 -I/include -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv -lresolv src/mod_auth_kerb.c spnegokrb5/ asn1_MechType.c spnegokrb5/asn1_MechTypeList.c spnegokrb5/asn1_ContextFlags.c spnegokrb5/asn1_NegTok enInit.c spnegokrb5/asn1_NegTokenTarg.c spnegokrb5/der_get.c spnegokrb5/der_put.c spnegokrb5/der_free.c spnegokrb5/der_length.c spnegokrb5/der_copy.c s pnegokrb5/timegm.c spnegokrb5/init_sec_context.c spnegokrb5/accept_sec_context.c spnegokrb5/e ncapsulate.c spnegokrb5/decapsulate.c spnegokrb5/external.c /path_to_apache2.2.0_installation/build/libtool --silent --mode=compile gcc -prefer-pic -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -O2 -pthread -I/path_to_apache2.2.0_installation/include -I/path_to_apache2.2.0_installation/include -I/path_to_apache2.2.0_installation/include -I. -Ispnegokrb5 -I/include -c -o src/mod_auth_kerb.lo src/mod_auth_kerb.c && touch src/mod_au
th_kerb.slo src/mod_auth_kerb.c:155: warning: initialization from incompatible pointer type src/mod_auth_kerb.c:155: error: syntax error before "kerb_auth_config" src/mod_auth_kerb.c:155: error: initializer element is not constant src/mod_auth_kerb.c:155: error: (near initialization for `kerb_auth_cmds[0].cmd_data') src/mod_auth_kerb.c:155: error: initializer element is not constant src/mod_auth_kerb.c:155: error: (near initialization for `kerb_auth_cmds[0]') src/mod_auth_kerb.c:158: warning: initialization from incompatible pointer type src/mod_auth_kerb.c:158: error: initializer element is not constant src/mod_auth_kerb.c:158: error: (near initialization for `kerb_auth_cmds[1].func') src/mod_auth_kerb.c:158: error: syntax error before "kerb_auth_config" src/mod_auth_kerb.c:158: error: initializer element is not constant src/mod_auth_kerb.c:158: error: (near initialization for `kerb_auth_cmds[1].cmd_data') src/mod_auth_kerb.c:158: error: initializer element is not constant src/mod_auth_kerb.c:158: error: (near initialization for `kerb_auth_cmds[1]') src/mod_auth_kerb.c:161: error: initializer element is not constant src/mod_auth_kerb.c:161: error: (near initialization for `kerb_auth_cmds[2].func') src/mod_auth_kerb.c:161: error: syntax error before "kerb_auth_config" src/mod_auth_kerb.c:161: error: initializer element is not constant src/mod_auth_kerb.c:161: error: (near initialization for `kerb_auth_cmds[2].cmd_data') src/mod_auth_kerb.c:161: error: initializer element is not constant src/mod_auth_kerb.c:161: error: (near initialization for `kerb_auth_cmds[2]') src/mod_auth_kerb.c:164: error: initializer element is not constant src/mod_auth_kerb.c:164: error: (near initialization for `kerb_auth_cmds[3].func') src/mod_auth_kerb.c:164: error: syntax error before "kerb_auth_config" src/mod_auth_kerb.c:164: error: initializer element is not constant src/mod_auth_kerb.c:164: error: (near initialization for `kerb_auth_cmds[3].cmd_data') src/mod_auth_kerb.c:164: error: initializer element is not constant src/mod_auth_kerb.c:164: error: (near initialization for `kerb_auth_cmds[3]') src/mod_auth_kerb.c:167: error: initializer element is not constant src/mod_auth_kerb.c:167: error: (near initialization for `kerb_auth_cmds[4].func') src/mod_auth_kerb.c:167: error: syntax error before "kerb_auth_config" src/mod_auth_kerb.c:167: error: initializer element is not constant src/mod_auth_kerb.c:167: error: (near initialization for `kerb_auth_cmds[4].cmd_data') src/mod_auth_kerb.c:167: error: initializer element is not constant src/mod_auth_kerb.c:167: error: (near initialization for `kerb_auth_cmds[4]') src/mod_auth_kerb.c:170: error: initializer element is not constant src/mod_auth_kerb.c:170: error: (near initialization for `kerb_auth_cmds[5].func') src/mod_auth_kerb.c:170: error: syntax error before "kerb_auth_config" src/mod_auth_kerb.c:170: error: initializer element is not constant src/mod_auth_kerb.c:170: error: (near initialization for `kerb_auth_cmds[5].cmd_data') src/mod_auth_kerb.c:170: error: initializer element is not constant src/mod_auth_kerb.c:170: error: (near initialization for `kerb_auth_cmds[5]') src/mod_auth_kerb.c:173: error: initializer element is not constant src/mod_auth_kerb.c:173: error: (near initialization for `kerb_auth_cmds[6].func') src/mod_auth_kerb.c:173: error: syntax error before "kerb_auth_config" src/mod_auth_kerb.c:173: error: initializer element is not constant src/mod_auth_kerb.c:173: error: (near initialization for `kerb_auth_cmds[6].cmd_data') src/mod_auth_kerb.c:173: error: initializer element is not constant src/mod_auth_kerb.c:173: error: (near initialization for `kerb_auth_cmds[6]') src/mod_auth_kerb.c:177: error: initializer element is not constant src/mod_auth_kerb.c:177: error: (near initialization for `kerb_auth_cmds[7].func') src/mod_auth_kerb.c:177: error: syntax error before "kerb_auth_config" src/mod_auth_kerb.c:177: error: initializer element is not constant src/mod_auth_kerb.c:177: error: (near initialization for `kerb_auth_cmds[7].cmd_data') src/mod_auth_kerb.c:177: error: initializer element is not constant src/mod_auth_kerb.c:177: error: (near initialization for `kerb_auth_cmds[7]') src/mod_auth_kerb.c:180: error: initializer element is not constant src/mod_auth_kerb.c:180: error: (near initialization for `kerb_auth_cmds[8].func') src/mod_auth_kerb.c:180: error: syntax error before "kerb_auth_config" src/mod_auth_kerb.c:180: error: initializer element is not constant src/mod_auth_kerb.c:180: error: (near initialization for `kerb_auth_cmds[8].cmd_data') src/mod_auth_kerb.c:180: error: initializer element is not constant src/mod_auth_kerb.c:180: error: (near initialization for `kerb_auth_cmds[8]') src/mod_auth_kerb.c:183: error: initializer element is not constant src/mod_auth_kerb.c:183: error: (near initialization for `kerb_auth_cmds[9].func') src/mod_auth_kerb.c:183: error: syntax error before "kerb_auth_config" src/mod_auth_kerb.c:183: error: initializer element is not constant src/mod_auth_kerb.c:183: error: (near initialization for `kerb_auth_cmds[9].cmd_data') src/mod_auth_kerb.c:183: error: initializer element is not constant src/mod_auth_kerb.c:183: error: (near initialization for `kerb_auth_cmds[9]') src/mod_auth_kerb.c:195: error: initializer element is not constant src/mod_auth_kerb.c:195: error: (near initialization for `kerb_auth_cmds[10]') src/mod_auth_kerb.c: In function `krb5_save_realms': src/mod_auth_kerb.c:252: warning: assignment makes pointer from integer without a cast src/mod_auth_kerb.c: In function `create_krb5_ccache': src/mod_auth_kerb.c:680: warning: assignment makes pointer from integer without a cast src/mod_auth_kerb.c:711: error: `ap_null_cleanup' undeclared (first use in this function) src/mod_auth_kerb.c:711: error: (Each undeclared identifier is reported only once src/mod_auth_kerb.c:711: error: for each function it appears in.) src/mod_auth_kerb.c: In function `authenticate_user_krb5pwd': src/mod_auth_kerb.c:869: warning: assignment makes pointer from integer without a cast src/mod_auth_kerb.c: In function `get_gss_error': src/mod_auth_kerb.c:905: warning: assignment makes pointer from integer without a cast src/mod_auth_kerb.c:915: warning: assignment makes pointer from integer without a cast src/mod_auth_kerb.c:926: warning: assignment makes pointer from integer without a cast src/mod_auth_kerb.c: In function `authenticate_user_gss': src/mod_auth_kerb.c:1139: warning: assignment makes pointer from integer without a cast src/mod_auth_kerb.c:1175: warning: assignment makes pointer from integer without a cast src/mod_auth_kerb.c:1227: warning: assignment makes pointer from integer without a cast src/mod_auth_kerb.c: In function `set_kerb_auth_headers': src/mod_auth_kerb.c:1288: warning: pointer/integer type mismatch in conditional expression apxs:Error: Command failed with rc=65536 . gmake: [src/mod_auth_kerb.so] Error 1 It took me a long time once I figured out what the problem was. There are actually two problems with mod_auth_kerb.c file. 1. it was including ap_compat.h, which in turn would include apu_compat.h, which in turn would include apr_compat.h. Both apu_compat.h and apr_compat.h contained all the defines for deprecated functions. That was working ok for Apache versions 2.0.x, but in 2.2.0 ap_compat.h doesn't include any other header files and there are no apu_compat.h and apr_compat.h with a ton of deprecated functions. 2. APR_XtOffsetOf function was renamed into APR_OFFSETOF. Here is a related entry in srclib/apr/CHANGES that's shipped with Apache 2.2.0: *) Renamed APR_XtOffset -> APR_OFFSET and APR_XtOffsetOf -> APR_OFFSETOF. [Cliff Woolley] Solutions to these problems were quite simple after I identified what they were: 1. I extracted an Apache 2.0.55 tarball to get apu_compat.h and apr_compat.h and dumped them into src directory where mod_auth_kerb.c file was. I added the following two lines to mod_auth_kerb.c file on line 60: #include "apr_compat.h" #include "apu_compat.h" 2. in src/mod_auth_kerb.c I replaced APR_XtOffsetOf with APR_OFFSETOF. I re-ran make and it all compiled successfully. Hopefully mod_auth_kerb developers will have a new version ready soon. Although, since rc6 was released about year and a half ago(August 9, 2004), I wouldn't expect them to. |
QuicksearchCategoriesBlog Administration |
After I got mod_auth_kerb compiled, I had issues with Apache 2.2.0 and it's new authentication scheme. Any configuration I tried would result in: configuration error: couldn't check access. No groups file?: / After spending some time trying to fi
Tracked: Jan 27, 20:43
I was just checking if there was an update for mod_auth_kerb after I wrote my article about problems compiling it with apache 2.2, I found out that there is a new version available (5.0-rc7). This new version fixes the problems I was having with compiling
Tracked: May 18, 23:31