pam_winbind: Create and use a wbclient context
authorAndreas Schneider <asn@samba.org>
Thu, 24 Mar 2016 08:38:56 +0000 (09:38 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 25 Mar 2016 16:45:24 +0000 (17:45 +0100)
commit94464ed82c93094a972984ac1828f0bcc256f13c
treeed8af137c03ad4038322a730781c32ceca7436df
parent4c139e23e918c7a378953a3f9fc6ec7c927cf6f5
pam_winbind: Create and use a wbclient context

PAM sessions are long running. If we create a pam session a connection
to winbind is established and only closed by the destructor of the
libwbclient library. If we create a wbcContext, we will free it in the
end of the PAM function being called and the socket will be closed. This
decreases the amount of allocated 'winbindd_cli_state' structures in
winbind for every logged in user.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Mar 25 17:45:24 CET 2016 on sn-devel-144
nsswitch/pam_winbind.c
nsswitch/pam_winbind.h