[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[no subject]



The way I see it, we could evolve to something like this:

#A

time_to_close_session = 0;
session_state = PAM_SESSION_UNSTARTED;

[establishes credentials]

do {

    if (session_state == PAM_SESSION_NEW) {
	fork()
        {CHILD: execs the user-application (a shell), eventually shell
exits}
        /* PARENT */
        pam_register_event(pamh, /* register child-exit watch-event info
*/);
    }

    session_state = pam_wait_for_event(pamh, /* blah .. */);

    switch (session_state) {
    case PAM_SESSION_EXIT:
        time_to_close_session = 1;
        break;
    case PAM_SESSION_REFRESH:
        pam_setcred(pamh, PAM_REFRESH_CRED);
        break;
    default:
        ???
    }

} while (! time_to_close_session)

[delete the credentials]

#B

Its a straw man, feel free to burn it/build on it...

Is there a finite number of events we'd need? Is there a finite class of
ways to register(notice) an event?

Cheers

Andrew



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []