From: Dmitry V. L. <ld...@us...> - 2010-10-12 23:32:18
|
On Fri, Oct 08, 2010 at 01:03:29AM +0400, Dmitry V. Levin wrote: > On Thu, Oct 07, 2010 at 09:21:10PM +0200, Tomas Mraz wrote: [...] > > Perhaps it would be better to store the user context somewhere when > > restore is called and then reuse it from this storage? > > Yes, it would be better, I'll try to reimplement it. I started to update the module to use pam_get_data/pam_set_data to manage this internal store instead of currently used static variables, and ended up with a rewrite of that part of pam_selinux.c: http://git.altlinux.org/people/ldv/packages/?p=pam.git;a=shortlog;h=pam_selinux Dmitry V. Levin (6): pam_selinux.c: remove redundant verbose_message() pam_selinux.c: strip trailing whitespaces pam_selinux.c: reindent pam_selinux.c: rewrite using pam_get_data/pam_set_data pam_selinux.c: add "restore" option pam_selinux.8.xml: update modules/pam_selinux/pam_selinux.8.xml | 111 ++- modules/pam_selinux/pam_selinux.c | 1079 ++++++++++++----------- 2 files changed, 653 insertions(+), 537 deletions(-) The most invasive commit is "rewrite using pam_get_data/pam_set_data". Of course I've tested these changes, but please have a look anyway. -- ldv |