svn commit: samba r8252 - in branches/SAMBA_4_0/source:
auth/kerberos librpc/idl torture/auth
abartlet at samba.org
abartlet at samba.org
Sat Jul 9 04:58:16 GMT 2005
Author: abartlet
Date: 2005-07-09 04:58:15 +0000 (Sat, 09 Jul 2005)
New Revision: 8252
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8252
Log:
Steal metze's thunder, and prove that with a few small tweaks, we can
now push/pull a sample PAC, and still have the same byte buffer.
(Metze set up the string code, and probably already has a similar
patch).
Unfortunetly win2k3 still doesn't like what we provide, but every step helps.
Also use data_blob_const() when we are just wrapping data for API
reasons.
Andrew Bartlett
Modified:
branches/SAMBA_4_0/source/auth/kerberos/kerberos_pac.c
branches/SAMBA_4_0/source/librpc/idl/netlogon.idl
branches/SAMBA_4_0/source/torture/auth/pac.c
Changeset:
Modified: branches/SAMBA_4_0/source/auth/kerberos/kerberos_pac.c
===================================================================
--- branches/SAMBA_4_0/source/auth/kerberos/kerberos_pac.c 2005-07-09 02:03:34 UTC (rev 8251)
+++ branches/SAMBA_4_0/source/auth/kerberos/kerberos_pac.c 2005-07-09 04:58:15 UTC (rev 8252)
@@ -170,7 +170,7 @@
if (krbtgt_keyblock) {
DATA_BLOB service_checksum_blob
- = data_blob(srv_sig_ptr->signature, sizeof(srv_sig_ptr->signature));
+ = data_blob_const(srv_sig_ptr->signature, sizeof(srv_sig_ptr->signature));
status = check_pac_checksum(mem_ctx,
service_checksum_blob, &kdc_sig,
@@ -377,7 +377,7 @@
context, service_keyblock);
service_checksum_blob
- = data_blob(SRV_CHECKSUM->signature, sizeof(SRV_CHECKSUM->signature));
+ = data_blob_const(SRV_CHECKSUM->signature, sizeof(SRV_CHECKSUM->signature));
/* Then sign Server checksum */
ret = make_pac_checksum(mem_ctx, service_checksum_blob, KDC_CHECKSUM, context, krbtgt_keyblock);
Modified: branches/SAMBA_4_0/source/librpc/idl/netlogon.idl
===================================================================
--- branches/SAMBA_4_0/source/librpc/idl/netlogon.idl 2005-07-09 02:03:34 UTC (rev 8251)
+++ branches/SAMBA_4_0/source/librpc/idl/netlogon.idl 2005-07-09 04:58:15 UTC (rev 8252)
@@ -19,6 +19,12 @@
{
declare bitmap samr_AcctFlags;
+ typedef struct {
+ [value(2*strlen_m(string))] uint16 length;
+ [value(2*(strlen_m(string)+1))] uint16 size;
+ [flag(STR_NOTERM|STR_SIZE4|STR_LEN4|STR_LARGE_SIZE)] string *string;
+ } netr_StringLarge;
+
/*****************/
/* Function 0x00 */
@@ -158,8 +164,8 @@
samr_RidWithAttributeArray groups;
uint32 user_flags;
netr_UserSessionKey key;
- lsa_String logon_server;
- lsa_String domain;
+ netr_StringLarge logon_server;
+ netr_StringLarge domain;
dom_sid2 *domain_sid;
netr_LMSessionKey LMSessKey;
samr_AcctFlags acct_flags;
Modified: branches/SAMBA_4_0/source/torture/auth/pac.c
===================================================================
--- branches/SAMBA_4_0/source/torture/auth/pac.c 2005-07-09 02:03:34 UTC (rev 8251)
+++ branches/SAMBA_4_0/source/torture/auth/pac.c 2005-07-09 04:58:15 UTC (rev 8252)
@@ -302,12 +302,19 @@
* to create the pointer values
*/
if (tmp_blob.length != validate_blob.length) {
- DEBUG(0, ("PAC push failed orignial buffer length[%u] != created buffer length[%u]\n",
+ DEBUG(0, ("PAC push failed: orignial buffer length[%u] != created buffer length[%u]\n",
tmp_blob.length, validate_blob.length));
talloc_free(mem_ctx);
return False;
}
+ if (memcmp(tmp_blob.data, validate_blob.data, tmp_blob.length) != 0) {
+ DEBUG(0, ("PAC push failed: length[%u] matches, but data does not\n",
+ tmp_blob.length));
+ talloc_free(mem_ctx);
+ return False;
+ }
+
talloc_free(mem_ctx);
return True;
}
More information about the samba-cvs
mailing list