From 3e25c12701d4001612e8f4148166a0e1590dd9d9 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Wed, 29 Jul 2009 17:23:14 -0400 Subject: [PATCH] macos 10.6 pam support Make pam module compile on 10.6. Not tested yet. Reviewed-on: http://gerrit.openafs.org/249 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 5593ff360c7a8f9f69cebda0cb2e2909ff2f31b4) Reviewed-on: http://gerrit.openafs.org/357 --- Makefile.in | 4 ++-- src/auth/ktc.c | 9 ++++++++- src/cf/osconf.m4 | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index 4dc9649ae..1b7a4e838 100644 --- a/Makefile.in +++ b/Makefile.in @@ -514,7 +514,7 @@ shlibafsrpc: rx rxkad des case ${SYS_NAME} in \ amd64_linux24) \ echo Skipping shlibafsrpc for amd64_linux24 ;; \ - alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \ + alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*_darwin_1*) \ ${COMPILE_PART1} shlibafsrpc ${COMPILE_PART2} ;; \ *) \ echo Not building shared libafsrpc for ${SYS_NAME} ;; \ @@ -524,7 +524,7 @@ shlibafsauthent: ubik auth kauth shlibafsrpc case ${SYS_NAME} in \ amd64_linux24) \ echo Skipping shlibafsauthent for amd64_linux24 ;; \ - alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \ + alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*_darwin_1*) \ ${COMPILE_PART1} shlibafsauthent ${COMPILE_PART2} ;; \ *) \ echo Not building shared libafsauthent for ${SYS_NAME} ;; \ diff --git a/src/auth/ktc.c b/src/auth/ktc.c index 6722f33b1..7dc571ac7 100644 --- a/src/auth/ktc.c +++ b/src/auth/ktc.c @@ -59,6 +59,9 @@ #endif #endif #endif +#ifdef AFS_DARWIN100_ENV +#include +#endif #ifdef HAVE_UNISTD_H #include #endif @@ -1665,7 +1668,11 @@ afs_tf_dest_tkt(void) int ktc_newpag(void) { - extern char **environ; +#ifdef AFS_DARWIN100_ENV +#define environ (*_NSGetEnviron()) +#else +extern char **environ; +#endif afs_uint32 pag; struct stat sbuf; diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index 96b81e5fb..ac9b3f148 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -552,12 +552,14 @@ case $AFS_SYSNAME in AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation" LEX="lex -l" MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} ${ARCHFLAGS}' + MT_LIBS="-lresolv" KROOT= KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers' LD="cc" KERN_OPTMZ="-Os" LWP_OPTMZ="-Os" OPTMZ="-Os" + PAM_LIBS="-lpam" REGEX_OBJ="regex.o" TXLIBS="-lncurses" EXTRA_VLIBOBJS="fstab.o" -- 2.39.5