summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2005-10-19 14:34:17 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:06 -0500
commitad93243f2399c2f349434dbbb33ed3766a817a8d (patch)
tree797f4ad12bc8515d91e1297c56a432c34f6e0abb /source3
parent39be2680e008931ff8372a978ac2d8d705c5e03a (diff)
downloadsamba-ad93243f2399c2f349434dbbb33ed3766a817a8d.tar.gz
samba-ad93243f2399c2f349434dbbb33ed3766a817a8d.tar.bz2
samba-ad93243f2399c2f349434dbbb33ed3766a817a8d.zip
r11183: add small helper function to return a PAC_LOGON_INFO.
Guenther (This used to be commit a8d5d6b845efb62e73e281549528376f3ee74211)
Diffstat (limited to 'source3')
-rw-r--r--source3/libads/authdata.c16
-rw-r--r--source3/smbd/sesssetup.c11
2 files changed, 17 insertions, 10 deletions
diff --git a/source3/libads/authdata.c b/source3/libads/authdata.c
index 9fd30e9dfb..55e736ce6a 100644
--- a/source3/libads/authdata.c
+++ b/source3/libads/authdata.c
@@ -924,4 +924,20 @@ out:
return nt_status;
}
+ PAC_LOGON_INFO *get_logon_info_from_pac(PAC_DATA *pac_data)
+{
+ PAC_LOGON_INFO *logon_info = NULL;
+ int i;
+
+ for (i=0; i < pac_data->num_buffers; i++) {
+
+ if (pac_data->pac_buffer[i].type != PAC_TYPE_LOGON_INFO)
+ continue;
+
+ logon_info = pac_data->pac_buffer[i].ctr->pac.logon_info;
+ break;
+ }
+ return logon_info;
+}
+
#endif
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index fc2d8b4abb..c875e08b24 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -182,16 +182,7 @@ static int reply_spnego_kerberos(connection_struct *conn,
}
if (pac_data) {
-
- /* get the logon_info */
- for (i=0; i < pac_data->num_buffers; i++) {
-
- if (pac_data->pac_buffer[i].type != PAC_TYPE_LOGON_INFO)
- continue;
-
- logon_info = pac_data->pac_buffer[i].ctr->pac.logon_info;
- break;
- }
+ logon_info = get_logon_info_from_pac(pac_data);
}
DEBUG(3,("Ticket name is [%s]\n", client));