diff -urN enlightenment-0.17.1/config.h.in enlightenment-0.17.1.pam/config.h.in --- enlightenment-0.17.1/config.h.in 2013-02-12 12:28:43.000000000 +0200 +++ enlightenment-0.17.1.pam/config.h.in 2013-04-01 16:38:54.000000000 +0300 @@ -119,6 +119,9 @@ /* PAM Authentication Support */ #undef HAVE_PAM +/* PAM Authentication helper Support */ +#undef USE_PAM_HELPER + /* Define to 1 if you have the header file. */ #undef HAVE_SECURITY_PAM_APPL_H diff -urN enlightenment-0.17.1/configure.ac enlightenment-0.17.1.pam/configure.ac --- enlightenment-0.17.1/configure.ac 2013-02-12 12:28:43.000000000 +0200 +++ enlightenment-0.17.1.pam/configure.ac 2013-04-01 16:38:54.000000000 +0300 @@ -111,6 +111,16 @@ fi fi +use_pam_helper=no +AC_ARG_WITH(pam-helper, + AC_HELP_STRING([--with-pam-helper], [with PAM helper @<:@default=no@:>@]), + [use_pam_helper=$withval], + [use_pam_helper=no] +) +if test "x$use_pam_helper" != "xno" ; then + AC_DEFINE_UNQUOTED(USE_PAM_HELPER, "$use_pam_helper", [PAM Authentication helper path]) +fi + dnl AC_E_CHECK_PKG(VALGRIND, [valgrind >= 2.4.0], [], [:]) AC_SUBST(VALGRIND_CFLAGS) AC_SUBST(VALGRIND_LIBS) diff -urN enlightenment-0.17.1/src/bin/e_desklock.c enlightenment-0.17.1.pam/src/bin/e_desklock.c --- enlightenment-0.17.1/src/bin/e_desklock.c 2013-02-12 12:28:43.000000000 +0200 +++ enlightenment-0.17.1.pam/src/bin/e_desklock.c 2013-04-01 17:18:36.000000000 +0300 @@ -1005,6 +1005,22 @@ char *current_user, *p; struct sigaction action; +#ifdef USE_PAM_HELPER + if (!access(USE_PAM_HELPER, X_OK)) { + FILE *fp = popen(USE_PAM_HELPER, "w"); + + if (fp) + { + int status; + + fputs(passwd, fp); + status = pclose(fp); + if (WIFEXITED(status) && WEXITSTATUS(status) == 0) + exit(0); + } + exit(-1); + } +#endif action.sa_handler = SIG_DFL; action.sa_flags = SA_ONSTACK | SA_NODEFER | SA_RESETHAND | SA_SIGINFO; sigemptyset(&action.sa_mask);