* Sebastian Dransfeld ([EMAIL PROTECTED]) wrote: > Sebastian Dransfeld wrote: > >Sebastian Dransfeld wrote: > > > >>Corey Donohoe wrote: > >> > >>>I'll see about tending to this when I get home this evening. Someone > >>>recently mentioned that the pam_close_session is being called to > >>>early, and should be called from entrance_login(which isn't possible). > >> I wasn't aware you could open up a session in another process, and close the previously opened session. I figured we'd need to use the same pam handle pointer to do the opening and closing, but I was obviously wrong. I know my docs are pretty outdated but
"It should be possible for the Linux-PAM library to open a session and close the same session from different applications." should... :) > >> > >>Why isn't this possible? The documentation says that it should be > >>possible to run pam_open_session and pam_close_session from two > >>different processes. > >> > >>Sebastian > > > > > >Seems to work here. See the applied patch. pam_console expects PAM_USER > >and PAM_TTY to be set. > > > >Sebastian > > Seems to be another issue to take care of. By using "service dm restart" > in Mandrake, the script kills entranced which again kills entrance_login > somehow. When this happends, the session isn't closed properly. Maybe > "end_user_session" should be called regardless of the returnvalue from > waitpid? We probably just need a signal handler in entrance_login to close it properly if it's sent a SIGTERM or whatever entranced sends when it's killed. The patch looked good for the most part, but the following caught my eye + case PAM_PROMPT_ECHO_ON: + reply[replies].resp_retcode = PAM_SUCCESS; + reply[replies].resp = (char *) strdup(e->user); + break; + case PAM_PROMPT_ECHO_OFF: + reply[replies].resp_retcode = PAM_SUCCESS; + reply[replies].resp = (char *) strdup(e->pass); + break; e is going to be NULL in these cases(right?), will those cases ever be reached, or are they simply copy & paste from the other code(which they appear to be) If they are copy & paste i say we create a pam.[ch] and just keep the functions there, entrance and entrance_login can just link off of them in one place. Lemme know what you think. > > Sebastian __ Corey Donohoe http://www.atmos.org ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel