[OpenAFS] afs-krb5 problems

Steve Devine sdevine@msu.edu
Tue, 12 Apr 2005 11:11:38 -0400


Florian Flachmeier wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
> 
>Hi,
>
>I'm trying to migrate my fresh AFS Server from kaserver to mit kerberos
>v5. I'm using - or at least trying to use - the toolkit by Ken Hornstein.
>I'm not sure whether this is the right place to complain about errors
>concerning that, but i don't see another way.
>
>I have already looked around at google and found somewhere a
>documentation, where the version numbers were mentioned they were
>using. As the current versions didn't work, I got these versions,
>compiled them and tried it with them. It didn't work either. The
>versions, I'm currently using are:
>
>afs-krb5-2.0
>krb5-1.3.3
>openafs-1.2.11
>
>The problem is, that the compile process of afs-krb5 exits with an
>error right
>after begin. I'm not very familiar with c source code, but what i
>could see was correct.
>
>This is the way, i configure it:
>
>vic src # ./configure
>- --with-krb5-config=/root/testing/krb5-1.3.3/src/krb5-config
>- --with-afs=/root/testing/krb5-1.3.3/src
>- --with-krb5-obj=/root/testing/krb5-1.3.3/src
>checking for gcc... gcc
>checking for C compiler default output... a.out
>checking whether the C compiler works... yes
>checking whether we are cross compiling... no
>checking for suffix of executables...
>checking for suffix of object files... o
>checking whether we are using the GNU C compiler... yes
>checking whether gcc accepts -g... yes
>checking for gcc option to accept ANSI C... none needed
>checking for prefix by checking for kinit... /usr/bin/kinit
>checking for a BSD-compatible install... /bin/install -c
>Adding -I/usr/local/include to CFLAGS
>Adding -L/usr/local/lib -lkrb5 -lk5crypto -lcom_err -lresolv to LIBS
>Setting KADM_CFLAGS to -I/usr/local/include
>Setting KADM_LIBS to -L/usr/local/lib -lkadm5srv -lkdb5 -lgssrpc
>- -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv
>checking for socket... yes
>checking for gethostbyname... yes
>checking for res_search... yes
>checking for getDirPath in
>/root/testing/krb5-1.3.3/src/lib/afs/util.a... no
>Setting compilation parameters for pre-AFS 3.5
>checking how to run the C preprocessor... gcc -E
>checking for egrep... grep -E
>checking for daemon... yes
>checking for ANSI C header files... yes
>checking for sys/types.h... yes
>checking for sys/stat.h... yes
>checking for stdlib.h... yes
>checking for string.h... yes
>checking for memory.h... yes
>checking for strings.h... yes
>checking for inttypes.h... yes
>checking for stdint.h... yes
>checking for unistd.h... yes
>checking for unistd.h... (cached) yes
>checking for stdlib.h... (cached) yes
>checking for memory.h... (cached) yes
>checking paths.h usability... yes
>checking paths.h presence... yes
>checking for paths.h... yes
>checking malloc.h usability... yes
>checking malloc.h presence... yes
>checking for malloc.h... yes
>checking for strerror... yes
>checking for an ANSI C-conforming const... yes
>checking return type of signal handlers... void
>checking for pid_t... yes
>configure: creating ./config.status
>config.status: creating Makefile
>vic src #
>
>When I do "make" after that, I get this:
>
>vic src # make
>gcc -c -g -O2 -I/usr/local/include
>- -I/root/testing/krb5-1.3.3/src/include -DPACKAGE_NAME=\"afs-krb5\"
>- -DPACKAGE_TARNAME=\"afs-krb5\" -DPACKAGE_VERSION=\"1.4\"
>- -DPACKAGE_STRING=\"afs-krb5\ 1.4\"
>- -DPACKAGE_BUGREPORT=\"kenh@cmf.nrl.navy.mil\" -DAFS=1 -DPRE_AFS35=1
>- -DAFS_TRY_FULL_PRINC=1 -DHAVE_DAEMON=1 -DSTDC_HEADERS=1
>- -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
>- -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
>- -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
>- -DHAVE_UNISTD_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_PATHS_H=1
>- -DHAVE_MALLOC_H=1 -DHAVE_STRERROR=1 -DRETSIGTYPE=void
>- -DALLOW_REGISTER -I/root/testing/krb5-1.3.3/src/include
>- -I/root/testing/krb5-1.3.3/src/include/krb5 afs2k5db.c
>In file included from /root/testing/krb5-1.3.3/src/include/k5-int.h:125,
>                 from afs2k5db.c:35:
>/root/testing/krb5-1.3.3/src/include/krb5/autoconf.h:167:1: warning:
>"KRB5_DEPRECATED" redefined
>In file included from afs2k5db.c:32:
>/root/testing/krb5-1.3.3/src/include/krb5.h:65:1: warning: this is the
>location of the previous definition
>In file included from /root/testing/krb5-1.3.3/src/include/k5-int.h:125,
>                 from afs2k5db.c:35:
>/root/testing/krb5-1.3.3/src/include/krb5/autoconf.h:182:1: warning:
>"KRB5_PRIVATE" redefined
>In file included from afs2k5db.c:32:
>/root/testing/krb5-1.3.3/src/include/krb5.h:69:1: warning: this is the
>location of the previous definition
>In file included from /root/testing/krb5-1.3.3/src/include/k5-int.h:125,
>                 from afs2k5db.c:35:
>/root/testing/krb5-1.3.3/src/include/krb5/autoconf.h:195:1: warning:
>"PACKAGE_BUGREPORT" redefined
><command line>:8:1: warning: this is the location of the previous
>definition
>/root/testing/krb5-1.3.3/src/include/krb5/autoconf.h:198:1: warning:
>"PACKAGE_NAME" redefined
><command line>:4:1: warning: this is the location of the previous
>definition
>/root/testing/krb5-1.3.3/src/include/krb5/autoconf.h:201:1: warning:
>"PACKAGE_STRING" redefined
><command line>:7:1: warning: this is the location of the previous
>definition
>/root/testing/krb5-1.3.3/src/include/krb5/autoconf.h:204:1: warning:
>"PACKAGE_TARNAME" redefined
><command line>:5:1: warning: this is the location of the previous
>definition
>/root/testing/krb5-1.3.3/src/include/krb5/autoconf.h:207:1: warning:
>"PACKAGE_VERSION" redefined
><command line>:6:1: warning: this is the location of the previous
>definition
>In file included from afs2k5db.c:35:
>/root/testing/krb5-1.3.3/src/include/k5-int.h:1816: error: syntax
>error before "krb5_donot_replay"
>afs2k5db.c:39:23: afs/param.h: No such file or directory
>afs2k5db.c:40:28: afs/cellconfig.h: No such file or directory
>afs2k5db.c:41:22: afs/auth.h: No such file or directory
>afs2k5db.c:42:23: afs/kauth.h: No such file or directory
>afs2k5db.c:43:18: ubik.h: No such file or directory
>afs2k5db.c:63: error: field `stats' has incomplete type
>afs2k5db.c:83: error: syntax error before "Date"
>afs2k5db.c:83: warning: no semicolon at end of struct or union
>afs2k5db.c:84: warning: data definition has no type or storage class
>afs2k5db.c:86: error: syntax error before "change_password_time"
>afs2k5db.c:86: warning: data definition has no type or storage class
>afs2k5db.c:106: error: `kaident' undeclared here (not in a function)
>afs2k5db.c:106: error: invalid application of `sizeof' to an
>incomplete type
>afs2k5db.c:107: error: syntax error before '}' token
>afs2k5db.c:128: error: syntax error before "Date"
>afs2k5db.c: In function `main':
>afs2k5db.c:152: error: storage size of `uheader' isn't known
>afs2k5db.c:154: error: storage size of `dbentry' isn't known
>afs2k5db.c:280: error: invalid application of `sizeof' to an
>incomplete type
>afs2k5db.c:282: error: invalid application of `sizeof' to an
>incomplete type
>afs2k5db.c:286: error: invalid application of `sizeof' to an
>incomplete type
>afs2k5db.c:331: error: invalid application of `sizeof' to an
>incomplete type
>afs2k5db.c:334: error: invalid application of `sizeof' to an
>incomplete type
>afs2k5db.c: At top level:
>afs2k5db.c:104: error: storage size of `userID' isn't known
>afs2k5db.c:105: error: storage size of `key' isn't known
>make: *** [afs2k5db.o] Error 1
>vic src #
>
>After i googled i little bit, I found out, that I need afs2k5db only
>when I want to migrate an existing database to a K5 Database. Because
>I have a new one, i obviously don't need that, I read. So I changed
>the "PROGS" Variable in the Makefile to this: PROGS=asetkey aklog
>fakeka ka-forwarder keyfile_dump. When I do make then, i get this:
>
>vic src # make
>gcc -g -O2 -I/usr/local/include -I/root/testing/krb5-1.3.3/src/include
>- -DPACKAGE_NAME=\"afs-krb5\" -DPACKAGE_TARNAME=\"afs-krb5\"
>- -DPACKAGE_VERSION=\"1.4\" -DPACKAGE_STRING=\"afs-krb5\ 1.4\"
>- -DPACKAGE_BUGREPORT=\"kenh@cmf.nrl.navy.mil\" -DAFS=1 -DPRE_AFS35=1
>- -DAFS_TRY_FULL_PRINC=1 -DHAVE_DAEMON=1 -DSTDC_HEADERS=1
>- -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
>- -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
>- -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
>- -DHAVE_UNISTD_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_PATHS_H=1
>- -DHAVE_MALLOC_H=1 -DHAVE_STRERROR=1 -DRETSIGTYPE=void
>- -DALLOW_REGISTER   -c -o asetkey.o asetkey.c
>asetkey.c:14:22: afs/stds.h: No such file or directory
>asetkey.c:15:28: afs/cellconfig.h: No such file or directory
>asetkey.c:16:22: afs/keys.h: No such file or directory
>asetkey.c: In function `main':
>asetkey.c:37: error: `AFSCONF_SERVERNAME' undeclared (first use in
>this function)
>asetkey.c:37: error: (Each undeclared identifier is reported only once
>asetkey.c:37: error: for each function it appears in.)
>asetkey.c:42: warning: assignment makes pointer from integer without a
>cast
>asetkey.c:102: error: storage size of `tkeys' isn't known
>make: *** [asetkey.o] Error 1
>
>So I looked around a bit at my include paths and found out, that the
>mentioned files are really not there. So I have no clue at the moment
>what to do now, because I think, that the failure comes from a changed
>version.
>
>At a mailing list archive I found at google, I read that you have only
>to change something around in that file, but as i'm not familiar with
>C as I mentioned already, I do not really know, what to change there.
>
>As I really need a working solution for that, I have to do something.
>
>Any hints?
>
>flow
>- --
>Florian Flachmeier        Diepholz,
>florianflachmeier@gmx.de    Germany
>- --
>My GnuPG Key:
>http://ffla.dyndns.org/~florian/public-key.asc
>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.2.3-nr1 (Windows XP)
>Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> 
>iD8DBQFCW9WTq0IILoh1gTsRAkq+AJ0RgMQxQcZwMw1bNPNXScq79Kl5HQCeKmEW
>zAymlYewKBAVvrQbOteWf4g=
>=pS7y
>-----END PGP SIGNATURE-----
>
>
>_______________________________________________
>OpenAFS-info mailing list
>OpenAFS-info@openafs.org
>https://lists.openafs.org/mailman/listinfo/openafs-info
>  
>
Notice the make errors ..
=========================

afs2k5db.c:39:23: afs/param.h: No such file or directory
afs2k5db.c:40:28: afs/cellconfig.h: No such file or directory
afs2k5db.c:41:22: afs/auth.h: No such file or directory
afs2k5db.c:42:23: afs/kauth.h: No such file or directory
afs2k5db.c:43:18: ubik.h: No such file or directory

=========================
You need the afslibs and the kdc libs

Here is my configure script for building afs-krb5
Your mileage may vary.
#####################
#!/bin/sh
env CPPFLAGS='-I/usr/build_src/dest/include 
-I/usr/build_src/dest/include/afs' \
LDFLAGS='-L/usr/build_src/dest/lib -L/usr/build_src/dest/lib/afs' \

#THIS is what did it.
#And hacking k5-int.h line 1815

./configure --with-krb5-src=/usr/build_src/krb5-1.3.4/src 
--with-krb5-config=/usr/local/krb5/bin/krb5-config
##############################

/sd
-- 
Steve Devine
Storage Systems
Academic Computing & Network Services
Michigan State University

301 Computer Center
East Lansing, MI 48824-1042
1-517-432-7327

Baseball is ninety percent mental; the other half is physical.
- Yogi Berra