Hi all,
the attached fix is required to allow using e.g. pam_ssh with entrance.
Currently a PAM module can not add environmental variables (in this case
the pid of the agent).

Joerg
$NetBSD$

--- src/client/entrance_session.c.orig  2007-08-04 04:42:05.000000000 +0200
+++ src/client/entrance_session.c
@@ -447,6 +447,8 @@ entrance_session_start_user_session(Entr
 #ifdef HAVE_PAM
    if (e->config->auth == ENTRANCE_USE_PAM)
    {
+      char **pamenv, **envitem;
+
       /* Tell PAM that session has begun */
       if (pam_open_session(e->auth->pam.handle, 0) != PAM_SUCCESS)
       {
@@ -458,6 +460,18 @@ entrance_session_start_user_session(Entr
             return;
          }
       }
+
+      if ((pamenv = pam_getenvlist(e->auth->pam.handle)) != NULL)
+      {
+       for (envitem = pamenv; *envitem; envitem++)
+       {
+         putenv(*envitem);
+         free(*envitem);
+       }
+
+       free(pamenv);
+     }
+
       syslog(LOG_INFO, "Opened PAM session. %s : %s.", e->auth->pw->pw_name,
              e->display);
    }
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to