Android : How to Port Linux-PAM on Android

on Friday, October 31, 2014


I am trying to port Linux-PAM module from http://www.linux-pam.org/library/Linux-PAM-1.1.8.tar.gz to Android Jellybean 4.2.2 platform version.


I've tried one solution from post Linux Pam creates static library instead of shared library, but didnt work, not sure why.


Facing following error "may be due to some changes still required" in configure and makefile as per Android install directories:


Failure log....


------------------------------------------------------------------------------------------------Making install in libpam


make[1]: Entering directory `/home/ravi/workspace/vendor/external/Linux-PAM-1.1.8/libpam'


/bin/bash ../libtool --tag=CC --mode=compile arm-linux-androideabi-gcc --sysroot=/home/ravi/workspace/prebuilts/ndk/current/platforms/android-9/arch-arm -DHAVE_CONFIG_H -I. -I.. -DDEFAULT_MODULE_PATH=\"/home/ravi/workspace/vendor/external/Linux-PAM-1.1.8/out/lib/security/\" -DLIBPAM_COMPILE -I./include -DPAM_VERSION=\"1.1.8\" -g -O2 -MT pam_audit.lo -MD -MP -MF .deps/pam_audit.Tpo -c -o pam_audit.lo pam_audit.c


libtool: compile: arm-linux-androideabi-gcc --sysroot=/home/ravi/workspace/prebuilts/ndk/current/platforms/android-9/arch-arm -DHAVE_CONFIG_H -I. -I.. -DDEFAULT_MODULE_PATH=\"/home/ravi/workspace/vendor/external/Linux-PAM-1.1.8/out/lib/security/\" -DLIBPAM_COMPILE -I./include -DPAM_VERSION=\"1.1.8\" -g -O2 -MT pam_audit.lo -MD -MP -MF .deps/pam_audit.Tpo -c pam_audit.c -o pam_audit.o


In file included from pam_modutil_private.h:14:0,


from pam_audit.c:12:


./include/security/pam_modutil.h:53:20: fatal error: shadow.h: No such file or directory


compilation terminated.


make[1]: *** [pam_audit.lo] Error 1


make[1]: Leaving directory `/home/ravi/workspace/vendor/external/Linux-PAM-1.1.8/libpam'


make: *** [install-recursive] Error 1


sravisss@buildlsp002:~/workspace/vendor/external/Linux-PAM-1.1.8$




Looks like some more modification need within configure file (something like adding host=eabi), but not sure how and where ?


Anyone succeeded to port Linux-PAM on Android or shall i use some other module for Pluggable Authentication Module to integrated with Secure Shell (OpenSSH) in Android ?


0 comments:

Post a Comment