[OpenAFS] pam_openafs_session source

Richard Wallace rwallace@a--i--m.com
09 Jun 2003 15:28:39 -0700


On Sun, 2003-06-08 at 07:35, Derrick J Brashear wrote:
> On Sun, 8 Jun 2003, Richard Wallace wrote:
> 
> > Sure.  I'm assuming you're referring to the pam_krb5 module on
> > sourceforge (http://sourceforge.net/projects/pam-krb5/).  How do you
> > build the pam_krb5afs module without the RPMs from RH?  To build it you
> > need libkrbafs (and not the one at http://web.mit.edu/openafs/krbafs/).
> > That's my problem with that solution.  I'm running on a Gentoo Linux
> > server and would rather not sully my system(s) with RH stuff.
> 
> kth krb4 from ftp://ftp.pdc.kth.se/pub/krb/src with some transforms
> applied to it is what redhat's krbafs is. interestingly so is what mit
> distributes (i put it together the same way, originally)
> 
> So, what's wrong with the one from MIT? Just out of date? Something else?

I couldn't get the stuff from MIT to compile.  The result of a
./configure and make is below.  I think the problem is in the configure
section here:
checking for des.h... no
checking for krb.h... no
checking for krb5.h... yes
checking for krb524.h... no
There are des.h and krb.h header files in /usr/include/kerberosIV, but
it's not looking in there, of course.  I tried linking to the files from
the /usr/include directory but then get this error when compiling:
gcc -c -I/usr/include  -DHAVE_CONFIG_H -DLIBDIR='"/usr/local/lib"' -I.
-I. -g -O2  lifetime.c
lifetime.c:120: conflicting types for `krb_life_to_time'
krbafs_locl.h:143: previous declaration of `krb_life_to_time'
lifetime.c:146: conflicting types for `krb_time_to_life'
krbafs_locl.h:135: previous declaration of `krb_time_to_life'
make: *** [lifetime.o] Error 1

I traded a few emails with the person referenced on the site (lxs@mit.edu),
but she said she wasn't aware of the pam_krb5afs module and that the lib
is for compiling arla.  That's when I decided to seek out the
pam_openafs_session module instead.

checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking whether make sets ${MAKE}... yes
checking for ln -s or something else... ln -s
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 executable suffix...
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for POSIXized ISC... no
checking for ranlib... ranlib
checking for a BSD compatible install... /bin/install -c
checking for Kerberos headers... no
checking whether byte ordering is bigendian... no
checking for gcc option to accept ANSI C... none needed
checking for inline... inline
checking for an ANSI C-conforming const... yes
checking for NEXTSTEP... no
checking for AIX... no
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 long... yes
checking size of long... 4
checking for int... yes
checking size of int... 4
checking for socket... yes
checking for gethostbyname... yes
checking for gethostname... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for memmove... yes
checking for putenv... yes
checking for setenv... yes
checking for unsetenv... yes
checking for strtok_r... yes
checking for strlcpy... no
checking for strdup... yes
checking for res_search... no
checking for dn_expand... no
checking for random... yes
checking for initstate... yes
checking for setstate... yes
checking for afs_string_to_key... no
checking for krb_time_to_life... no
checking for krb_life_to_time... no
checking for krb_atime_to_life... no
checking for krb_life_to_atime... no
checking for krb524_convert_creds_kdc_ccache... no
checking for krb524_convert_creds_kdc... no
checking for ANSI C header files... (cached) yes
checking for arpa/nameser.h... yes
checking for arpa/inet.h... yes
checking for crypt.h... yes
checking for netdb.h... yes
checking for netinet/in.h... yes
checking for resolv.h... yes
checking for sys/bitypes.h... yes
checking for sys/cdefs.h... yes
checking for sys/filio.h... no
checking for sys/ioccom.h... no
checking for sys/ioctl.h... yes
checking for afs/param.h... no
checking for sys/param.h... yes
checking for sys/socket.h... yes
checking for sys/syscall.h... yes
checking for sys/types.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys_siglist declaration in signal.h or unistd.h... yes
checking for des.h... no
checking for krb.h... no
checking for krb5.h... yes
checking for krb524.h... no
checking if optarg needs a declaration... yes
checking if optind needs a declaration... yes
checking if opterr needs a declaration... yes
checking if optopt needs a declaration... yes
checking for krb5_realm in krb5.h... no
checking for krb5_const_realm in krb5.h... no
checking for session.keytype in krb5_creds... no
checking for keyblock.enctype in krb5_creds... yes
checking return type of signal handlers... void
checking for pid_t... yes
checking for uid_t in sys/types.h... yes
checking for off_t... yes
checking for size_t... yes
checking for sa_len in struct sockaddr... no
checking for working getmsg... yes
checking if crypt needs a prototype... no
checking if strtok_r needs a prototype... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating krbafs.exp
config.status: creating krbafs.h
config.status: creating config.h
root@waiter krbafs-1.2 # make
gcc -c  -DHAVE_CONFIG_H -DLIBDIR='"/usr/local/lib"' -I. -I. -g -O2 
afskrb.c
In file included from afskrb.c:34:
krbafs_locl.h:131: parse error before "des_cblock"
krbafs_locl.h:158: parse error before "CREDENTIALS"
krbafs_locl.h:172: parse error before "CREDENTIALS"
afskrb.c:44: parse error before "CREDENTIALS"
afskrb.c: In function `get_cred':
afskrb.c:46: `KTEXT_ST' undeclared (first use in this function)
afskrb.c:46: (Each undeclared identifier is reported only once
afskrb.c:46: for each function it appears in.)
afskrb.c:46: parse error before "tkt"
afskrb.c:47: `name' undeclared (first use in this function)
afskrb.c:47: `inst' undeclared (first use in this function)
afskrb.c:47: `realm' undeclared (first use in this function)
afskrb.c:47: `c' undeclared (first use in this function)
afskrb.c:50: `tkt' undeclared (first use in this function)
afskrb.c:51: `KSUCCESS' undeclared (first use in this function)
afskrb.c: In function `afslog_uid_int':
afskrb.c:65: `CREDENTIALS' undeclared (first use in this function)
afskrb.c:65: parse error before "c"
afskrb.c:66: `ANAME_SZ' undeclared (first use in this function)
afskrb.c:67: `INST_SZ' undeclared (first use in this function)
afskrb.c:68: `REALM_SZ' undeclared (first use in this function)
afskrb.c:75: `KSUCCESS' undeclared (first use in this function)
afskrb.c:78: `c' undeclared (first use in this function)
afskrb.c: In function `get_realm':
afskrb.c:88: warning: initialization makes pointer from integer without
a cast
make: *** [afskrb.o] Error 1

-- 
Richard Wallace
AIM, Inc. (www.a--i--m.com)
Information Systems Consultants
                                                                                
"Providing New Technology,
     the Old-Fashioned Way"