summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-05-05 15:06:39 +0200
committerVolker Lendecke <vl@samba.org>2008-05-05 15:07:01 +0200
commit1a3f50559e06c9dc45556c2c52d68a23c05d7e41 (patch)
tree5416ffa46aee229cbcdcbd47090bdfc32bfc1590 /source3
parent58c54eb91f0490096c980a4f7aec323953813d64 (diff)
downloadsamba-1a3f50559e06c9dc45556c2c52d68a23c05d7e41.tar.gz
samba-1a3f50559e06c9dc45556c2c52d68a23c05d7e41.tar.bz2
samba-1a3f50559e06c9dc45556c2c52d68a23c05d7e41.zip
Revert "Fix allocation of conn->vuid_cache entries"
This reverts commit 50c891d3dfb75c9f607f7ad2a578aa3ba5d91988. There's more to this code -- sorry for the spam (This used to be commit 6e0e0cb8dd6f57de36c041e2ba4b82feeb357ce8)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/uid.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c
index 343a0cf490..ffa643a8f5 100644
--- a/source3/smbd/uid.c
+++ b/source3/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;
- conn->vuid_cache.entries =
- (conn->vuid_cache.entries + 1) % VUID_CACHE_SIZE;
+ i = conn->vuid_cache.entries % VUID_CACHE_SIZE;
+ if (conn->vuid_cache.entries < VUID_CACHE_SIZE)
+ conn->vuid_cache.entries++;
ent = &conn->vuid_cache.array[i];
ent->vuid = vuser->vuid;