PDC with 2.0.3

Jeremy Allison jallison at cthulhu.engr.sgi.com
Tue Mar 9 17:54:26 GMT 1999


Hi all,

	Now I *know* we say we're not supporting PDC with
2.0.3 and I'm not trying to change that, but... :-).

I know that 2.0.3 broke people who were using 2.0.2 as
a PDC, and I'm really sorry about that.

I'm so sorry, in fact, that here is a patch for 2.0.3
that will restore the (unsupported) PDC authentication
functionality to 2.0.3. This code will be in 2.0.4 and
I'll try not to break this again.

The actual problem was the ignoring of our standard
little-endian functions in the 'hack' unicode module
(I'm not naming names here :-) with the result that
it would only work on little-endian machines.

Hope this helps,

	Jeremy Allison,
	Samba Team.

Patch follows :

Index: lib/util_unistr.c
===================================================================
RCS file: /data/cvs/samba/source/lib/util_unistr.c,v
retrieving revision 1.3.2.1
diff -u -r1.3.2.1 util_unistr.c
--- util_unistr.c	1999/02/08 21:09:18	1.3.2.1
+++ util_unistr.c	1999/03/09 17:43:40
@@ -73,7 +73,7 @@
 
 	for (p = lbuf; *src && p-lbuf < MAXUNI-2 && len > 0; len--, src++)
 	{
-		*p++ = (*src & 0xff);
+		*p++ = (SVAL(src,0) & 0xff);
 	}
 
 	*p = 0;
@@ -97,7 +97,7 @@
 
 	for (p = lbuf; *src && p-lbuf < MAXUNI-2; p++, src++)
 	{
-		*p = (*src & 0xff);
+		*p = (SVAL(src,0) & 0xff);
 	}
 
 	*p = 0;
@@ -119,7 +119,7 @@
 
 	for (p = lbuf; *src && p-lbuf < max_size; p++, src++)
 	{
-		*p = (*src & 0xff);
+		*p = (SVAL(src,0) & 0xff);
 	}
 
 	*p = 0;
@@ -157,7 +157,7 @@
 
 	for (p = lbuf; *src && p-lbuf < max_size; p++, src++)
 	{
-		*p = (*src & 0xff);
+		*p = (SVAL(src,0) & 0xff);
 	}
 
 	*p = 0;
@@ -185,7 +185,7 @@
 		}
 		else
 		{
-			*p = (*src & 0xff);
+			*p = (SVAL(src,0) & 0xff);
 		}
 	}
 
@@ -234,7 +234,7 @@
 
 	for (p = lbuf; *buf && p-lbuf < MAXUNI-2; p++, buf += 2)
 	{
-		*p = *buf;
+		*p = (SVAL(buf,0) & 0xff);
 	}
 	*p = 0;
 	return lbuf;
-----------------------------end patch------------------------


-- 
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------


More information about the samba-ntdom mailing list