summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-09-16 09:31:10 +0200
committerVolker Lendecke <vl@samba.org>2010-09-16 12:02:57 -0700
commit0858b7546eebf9e853e4e7288b50edbcdcdc5826 (patch)
tree8056f9a7a0722c3de748d9414da5b083018fa35e
parent547b268cfaa2e791bf92e8804bfa504c4e37050b (diff)
downloadsamba-0858b7546eebf9e853e4e7288b50edbcdcdc5826.tar.gz
samba-0858b7546eebf9e853e4e7288b50edbcdcdc5826.tar.bz2
samba-0858b7546eebf9e853e4e7288b50edbcdcdc5826.zip
s3: Add the PAC info3 struct to the netsamlogon_cache in ntlm_auth
-rw-r--r--source3/Makefile.in1
-rw-r--r--source3/utils/ntlm_auth.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 64d0a6a4df..d712df6040 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -1430,6 +1430,7 @@ NTLM_AUTH_OBJ1 = utils/ntlm_auth.o utils/ntlm_auth_diagnostics.o
NTLM_AUTH_OBJ = ${NTLM_AUTH_OBJ1} $(LIBSAMBA_OBJ) $(POPT_LIB_OBJ) \
../lib/util/asn1.o ../libcli/auth/spnego_parse.o libsmb/clikrb5.o libads/kerberos.o \
+ libsmb/samlogon_cache.o \
$(LIBADS_SERVER_OBJ) \
$(PASSDB_OBJ) $(LIBTSOCKET_OBJ) $(GROUPDB_OBJ) \
$(SMBLDAP_OBJ) $(LIBNMB_OBJ) \
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index e2f9c60deb..f8145b4a6d 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -34,6 +34,7 @@
#include "../lib/crypto/arcfour.h"
#include "libads/kerberos_proto.h"
#include "nsswitch/winbind_client.h"
+#include "librpc/gen_ndr/krb5pac.h"
#ifndef PAM_WINBIND_CONFIG_FILE
#define PAM_WINBIND_CONFIG_FILE "/etc/security/pam_winbind.conf"
@@ -1456,6 +1457,9 @@ static void manage_gss_spnego_request(struct ntlm_auth_state *state,
domain = SMB_STRDUP(domain);
user = SMB_STRDUP(principal);
+ netsamlogon_cache_store(
+ user, &logon_info->info3);
+
data_blob_free(&ap_rep);
}