[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-2275-g50c891d

Volker Lendecke vlendec at samba.org
Mon May 5 12:45:47 GMT 2008


The branch, v3-3-test has been updated
       via  50c891d3dfb75c9f607f7ad2a578aa3ba5d91988 (commit)
      from  1b1614c3261e1e93a2cad1f1063e28cbbb13f434 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test


- Log -----------------------------------------------------------------
commit 50c891d3dfb75c9f607f7ad2a578aa3ba5d91988
Author: Volker Lendecke <vl at samba.org>
Date:   Mon May 5 14:43:57 2008 +0200

    Fix allocation of conn->vuid_cache entries
    
    With the old code, if more than VUID_CACHE_SIZE elements were used all new
    entries ended up in slot 0. With this checkin we do cycle.
    
    Jeremy, please revert if the old behaviour was intentional

-----------------------------------------------------------------------

Summary of changes:
 source/smbd/uid.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/uid.c b/source/smbd/uid.c
index ffa643a..343a0cf 100644
--- a/source/smbd/uid.c
+++ b/source/smbd/uid.c
@@ -123,9 +123,9 @@ static bool check_user_ok(connection_struct *conn, user_struct *vuser,int snum)
 		return False;
 	}
 
-	i = conn->vuid_cache.entries % VUID_CACHE_SIZE;
-	if (conn->vuid_cache.entries < VUID_CACHE_SIZE)
-		conn->vuid_cache.entries++;
+	i = conn->vuid_cache.entries;
+	conn->vuid_cache.entries =
+		(conn->vuid_cache.entries + 1) % VUID_CACHE_SIZE;
 
 	ent = &conn->vuid_cache.array[i];
 	ent->vuid = vuser->vuid;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list