[PF]STRING_LEN

Harald Koenig koenig at science-computing.de
Mon Feb 11 06:51:10 GMT 2002


Hi,

first: I'm not subscribed to the samba-technical list, so please
send answers/comments directly to me too as Cc:.  thanks!


a)
for some setups with very long file/path names we need 
the following patch to avoid buffer overflows.  it would be
nice if those values could be increased in future samba releases.

-------------------------------------------------------------------------------
--- orig/samba-2.2.3a/source/include/smb.h      Sun Feb  3 01:46:40 2002
+++ samba-2.2.3a/source/include/smb.h   Fri Feb  8 14:49:21 2002
@@ -157,8 +157,8 @@
 
 #ifndef _PSTRING
 
-#define PSTRING_LEN 1024
-#define FSTRING_LEN 256
+#define PSTRING_LEN (2*1024)
+#define FSTRING_LEN (2*256)
 
 typedef char pstring[PSTRING_LEN];
 typedef char fstring[FSTRING_LEN];
-------------------------------------------------------------------------------



b)
starting with samba 2.2.3 a new problem popped up: 
winbindd doesn't work for us.  some tracing/debugging showed, 
that this results of those values being defined again in 

	nsswitch/winbind_nss_config.h

saying

	#ifndef _SMB_MACROS_H
	/* I'm trying really hard not to include anything from smb.h with the
	   result of some silly looking redeclaration of structures. */


this redeclaration is really ugly and caused us some headache,
esp. since there seem to be no checks or length bytes in the protocol
which may catch/report such problems!

please please, clean up this PSTRING mess...



Harald Koenig
-- 
"I hope to die                                      ___       _____
before I *have* to use Microsoft Word.",           0--,|    /OOOOOOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen.        <_/  /  /OOOOOOOOOOO\
                                                    \  \/OOOOOOOOOOOOOOO\
                                                      \ OOOOOOOOOOOOOOOOO|//
Harald Koenig                                          \/\/\/\/\/\/\/\/\/
science+computing ag                                    //  /     \\  \
koenig at science-computing.de                            ^^^^^       ^^^^^




More information about the samba-technical mailing list