Bug 875 [was Re: BUG #281 / Only SIDs displayed on Win 2K]

Gerald (Jerry) Carter jerry at samba.org
Wed Dec 10 21:08:36 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gerald (Jerry) Carter wrote:
| Gerald (Jerry) Carter wrote:
| | Pierre Filippone wrote:
| |
| | | Attached is my ethereal trace.
| | | It starts with opening the share properties on win2k
| | | and ends when resolving the SIDs has failed.
| | |
| | | 10.0.12.86 is the win2k member
| | | 10.0.9.11 is the samba PDC
| |
| | Strange....Your traces show the exact same thing
| | as Aurélien's.  The client seems in a loop around
| | the LsaQuerryUInfoPolicy() call.
| |
| | Would you mind sending me a screen shot of the ACL
| | listing for the share (listing the SIDs)?  Thanks.
|
| Whoop!  I've reproduced it just like you both said.
| Still can't figure out why it was failing but this
| is some help at least.

w00T!  got it.  Here's the patch (going in to cvs now).
The bug was a UNISTR2 length bug in LsaQueryInfo(3)
introduced by some code cleanup immediately after the
3.0.0.

Thanks to you both for the traces.  This fix will be
in 3.0.1rc2.



- --
cheers, jerry
~ ----------------------------------------------------------------------
~ Hewlett-Packard            ------------------------- http://www.hp.com
~ SAMBA Team                 ---------------------- http://www.samba.org
~ GnuPG Key                  ---- http://www.plainjoe.org/gpg_public.asc
~ "If we're adding to the noise, turn off this song" --Switchfoot (2003)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/14tTIR7qMdg1EfYRAhHBAJ4mXvYrp8iijNe2cY7HxerEhn6EjACg54Nr
PUkrVTzJjvUxIo3RAaaTbCc=
=7Yfo
-----END PGP SIGNATURE-----
-------------- next part --------------
Index: include/rpc_misc.h
===================================================================
RCS file: /data/cvs/samba/source/include/rpc_misc.h,v
retrieving revision 1.33.2.6
diff -u -r1.33.2.6 rpc_misc.h
--- include/rpc_misc.h	25 Sep 2003 21:26:13 -0000	1.33.2.6
+++ include/rpc_misc.h	10 Dec 2003 21:03:53 -0000
@@ -403,5 +403,5 @@
 }
 BUFFER4;
 
-enum unistr2_term_codes { UNI_FLAGS_NONE = 0, UNI_STR_TERMINATE = 1, UNI_MAXLEN_TERMINATE = 2 };
+enum unistr2_term_codes { UNI_FLAGS_NONE = 0, UNI_STR_TERMINATE = 1, UNI_MAXLEN_TERMINATE = 2, UNI_BROKEN_NON_NULL = 3 };
 #endif /* _RPC_MISC_H */
Index: rpc_parse/parse_misc.c
===================================================================
RCS file: /data/cvs/samba/source/rpc_parse/parse_misc.c,v
retrieving revision 1.94.2.14
diff -u -r1.94.2.14 parse_misc.c
--- rpc_parse/parse_misc.c	17 Nov 2003 22:07:47 -0000	1.94.2.14
+++ rpc_parse/parse_misc.c	10 Dec 2003 21:03:56 -0000
@@ -914,7 +914,7 @@
 	str->uni_max_len = num_chars;
 	str->offset = 0;
 	str->uni_str_len = num_chars;
-	if (num_chars && (flags == UNI_MAXLEN_TERMINATE))
+	if ( num_chars && ((flags == UNI_MAXLEN_TERMINATE) || (flags == UNI_BROKEN_NON_NULL)) )
 		str->uni_max_len++;
 }
 
Index: rpc_server/srv_lsa_nt.c
===================================================================
RCS file: /data/cvs/samba/source/rpc_server/srv_lsa_nt.c,v
retrieving revision 1.52.2.17
diff -u -r1.52.2.17 srv_lsa_nt.c
--- rpc_server/srv_lsa_nt.c	24 Nov 2003 17:31:37 -0000	1.52.2.17
+++ rpc_server/srv_lsa_nt.c	10 Dec 2003 21:03:56 -0000
@@ -66,7 +66,7 @@
 
 	/* this string is supposed to be non-null terminated. */
 	/* But the maxlen in this UNISTR2 must include the terminating null. */
-	init_unistr2(&d_q->uni_domain_name, dom_name, UNI_MAXLEN_TERMINATE);
+	init_unistr2(&d_q->uni_domain_name, dom_name, UNI_BROKEN_NON_NULL);
 
 	/*
 	 * I'm not sure why this really odd combination of length


More information about the samba-technical mailing list