macos 10.6 pam support
authorDerrick Brashear <shadow@dementia.org>
Wed, 29 Jul 2009 21:23:14 +0000 (17:23 -0400)
committerDerrick Brashear <shadow@dementia.org>
Thu, 30 Jul 2009 03:44:32 +0000 (20:44 -0700)
Make pam module compile on 10.6. Not tested yet.

Reviewed-on: http://gerrit.openafs.org/249
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

Makefile.in
src/auth/ktc.c
src/cf/osconf.m4

index 08c7f21..6f3da12 100644 (file)
@@ -560,7 +560,7 @@ libafsauthent: ubik auth kauth libafsrpc
 # pthread based user space RX library
 shlibafsrpc: rx rxkad des
        +case ${SYS_NAME} in \
-       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} ;; \
@@ -568,7 +568,7 @@ shlibafsrpc: rx rxkad des
 
 shlibafsauthent: ubik auth kauth shlibafsrpc
        +case ${SYS_NAME} in \
-       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} ;; \
index 0804939..3cba192 100644 (file)
@@ -60,6 +60,9 @@
 #endif
 #endif
 #endif
+#ifdef AFS_DARWIN100_ENV
+#include <crt_externs.h>
+#endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
@@ -1667,7 +1670,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;
index a5fbbbe..4a4e69a 100644 (file)
@@ -570,12 +570,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"