[SCM] Samba Shared Repository - branch v3-3-test updated -
release-3-2-0pre2-2278-g6e0e0cb
Volker Lendecke
vlendec at samba.org
Mon May 5 13:06:17 GMT 2008
The branch, v3-3-test has been updated
via 6e0e0cb8dd6f57de36c041e2ba4b82feeb357ce8 (commit)
via fa39f47f5fc2df0f1a59705e30a799518c353b45 (commit)
from 0aea404b0a83736ba2884cc7cf00cd797aab1f56 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test
- Log -----------------------------------------------------------------
commit 6e0e0cb8dd6f57de36c041e2ba4b82feeb357ce8
Author: Volker Lendecke <vl at samba.org>
Date: Mon May 5 15:06:39 2008 +0200
Revert "Fix allocation of conn->vuid_cache entries"
This reverts commit 50c891d3dfb75c9f607f7ad2a578aa3ba5d91988.
There's more to this code -- sorry for the spam
commit fa39f47f5fc2df0f1a59705e30a799518c353b45
Author: Volker Lendecke <vl at samba.org>
Date: Mon May 5 15:06:30 2008 +0200
Revert "Second half of 50c891d3: Correctly clear the vuid cache"
This reverts commit 0aea404b0a83736ba2884cc7cf00cd797aab1f56.
-----------------------------------------------------------------------
Summary of changes:
source/smbd/conn.c | 2 +-
source/smbd/uid.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/smbd/conn.c b/source/smbd/conn.c
index ce07053..af18e90 100644
--- a/source/smbd/conn.c
+++ b/source/smbd/conn.c
@@ -237,7 +237,7 @@ void conn_clear_vuid_cache(uint16 vuid)
conn->vuid = UID_FIELD_INVALID;
}
- for (i=0; i<VUID_CACHE_SIZE; i++) {
+ for (i=0;i<conn->vuid_cache.entries && i< VUID_CACHE_SIZE;i++) {
if (conn->vuid_cache.array[i].vuid == vuid) {
struct vuid_cache_entry *ent = &conn->vuid_cache.array[i];
ent->vuid = UID_FIELD_INVALID;
diff --git a/source/smbd/uid.c b/source/smbd/uid.c
index 343a0cf..ffa643a 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;
- 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;
--
Samba Shared Repository
More information about the samba-cvs
mailing list