[ConsoleKit] consolekit userid session counters
Martin Vogt
martin.vogt at itwm.fraunhofer.de
Wed Feb 24 03:53:53 PST 2010
Hello list,
is there a mechanism in consolekit which counts the number
of session for a user?
I like to run an action if the "user_sessioncounter" reaches zero.
Example:
I added to ssh:
>session optional pam_ck_connector.so
and if a user logs into the machine:
>if test "$reason" = "session_added"; then
> if [ -c /dev/nvidiactl ] ; then
> setfacl -m u:${CK_SESSION_USER_UID}:rw /dev/nvidia*
> fi
>else
> if [ -c /dev/nvidiactl ] ; then
> setfacl -x u:${CK_SESSION_USER_UID} /dev/nvidia*
> fi
>fi
I'm adding him to the nvidia device.
(this is for this project: http://www.virtualgl.org/)
But if the users login twice and then logouts
from one session all the permissions are revoked. :(
An environment variable like
${CK_SESSION_COUNTER_FOR_USER_UID}
would be helpful here.
Is there such a mechanism?
regards,
Martin
More information about the ConsoleKit
mailing list