svn commit: samba r2081 - in trunk/source/smbd: .

jra at samba.org jra at samba.org
Thu Aug 26 21:38:51 GMT 2004


Author: jra
Date: 2004-08-26 21:38:50 +0000 (Thu, 26 Aug 2004)
New Revision: 2081

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/trunk/source/smbd&rev=2081&nolog=1

Log:
lp_path should be lp_pathname.
Paranoia fix on mangle prefix.
Jeremy.

Modified:
   trunk/source/smbd/mangle_hash2.c
   trunk/source/smbd/password.c


Changeset:
Modified: trunk/source/smbd/mangle_hash2.c
===================================================================
--- trunk/source/smbd/mangle_hash2.c	2004-08-26 21:37:20 UTC (rev 2080)
+++ trunk/source/smbd/mangle_hash2.c	2004-08-26 21:38:50 UTC (rev 2081)
@@ -119,7 +119,7 @@
 
    this hash needs to be fast with a low collision rate (what hash doesn't?)
 */
-static u32 mangle_hash(const char *key, unsigned length)
+static u32 mangle_hash(const char *key, unsigned int length)
 {
 	u32 value;
 	u32   i;
@@ -129,6 +129,7 @@
 	   doesn't depend on the case of the long name. Note that this
 	   is the only place where we need to use a multi-byte string
 	   function */
+	length = MIN(length,sizeof(fstring)-1);
 	strncpy(str, key, length);
 	str[length] = 0;
 	strupper_m(str);

Modified: trunk/source/smbd/password.c
===================================================================
--- trunk/source/smbd/password.c	2004-08-26 21:37:20 UTC (rev 2080)
+++ trunk/source/smbd/password.c	2004-08-26 21:38:50 UTC (rev 2081)
@@ -278,7 +278,7 @@
 						vuser->user.unix_name, vuser->unix_homedir);
 		} else {
 			DEBUG(3, ("Using static (or previously created) service for user '%s'; path = '%s'\n", 
-				vuser->user.unix_name, lp_path(servicenumber) ));
+				vuser->user.unix_name, lp_pathname(servicenumber) ));
 			vuser->homes_snum = servicenumber;
 		}
 	} 



More information about the samba-cvs mailing list