r11183: add small helper function to return a PAC_LOGON_INFO.
authorGünther Deschner <gd@samba.org>
Wed, 19 Oct 2005 14:34:17 +0000 (14:34 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:05:06 +0000 (11:05 -0500)
Guenther
(This used to be commit a8d5d6b845efb62e73e281549528376f3ee74211)

source3/libads/authdata.c
source3/smbd/sesssetup.c

index 9fd30e9dfb1dee60ea55454dc4648349a8e036d3..55e736ce6aec058bad6c6a8a1c50edfc0493f607 100644 (file)
@@ -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
index fc2d8b4abb47952e528bbd4726935c75b1d63289..c875e08b2466986449186df86ec83d8bcc88c4f0 100644 (file)
@@ -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));