diff options
-rw-r--r-- | source3/libads/authdata.c | 16 | ||||
-rw-r--r-- | source3/smbd/sesssetup.c | 11 |
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)); |