[SCM] Samba Shared Repository - branch v3-5-test updated
Karolin Seeger
kseeger at samba.org
Thu Nov 11 04:11:31 MST 2010
The branch, v3-5-test has been updated
via 4784195 Fix bug #7744 - "dfree cache time" doesn't work.
from 6e9d95f Fix bug #7743 - Inconsistent use of system name lookup can cause a domain joined machine to fail to find users.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test
- Log -----------------------------------------------------------------
commit 47841952936e28916a738105194d662207477285
Author: Jeremy Allison <jra at samba.org>
Date: Wed Oct 20 13:58:15 2010 -0700
Fix bug #7744 - "dfree cache time" doesn't work.
There is a bug in processing the dfree cache time, which is associated with the
smbd idle timer. The idle timer call conn_idle_all(), which updates the
conn->lastused timestamp. The dfree cache time code in smbd/dfree.c depends on
conn->lastused being up to date to refresh the cached dfree value.
Unfortunately the conn_idle_all() returns early if any of the connection
structs is not idle, never updating any further conn->lastused timestamps. If
(as is common due to an IPC$ connection) there are more than one used
connection struct, then the conn->lastused timestamps after the IPC$ connection
in the connection list will never be updated.
Ensure we always update conn->lastused for all connections when calling
conn_idle_all().
Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/conn.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c
index 959fcd7..37c2311 100644
--- a/source3/smbd/conn.c
+++ b/source3/smbd/conn.c
@@ -197,6 +197,7 @@ bool conn_idle_all(struct smbd_server_connection *sconn,time_t t)
int deadtime = lp_deadtime()*60;
pipes_struct *plist = NULL;
connection_struct *conn;
+ bool ret = true;
if (deadtime <= 0)
deadtime = DEFAULT_SMBD_TIMEOUT;
@@ -209,6 +210,7 @@ bool conn_idle_all(struct smbd_server_connection *sconn,time_t t)
if (conn->lastused != conn->lastused_count) {
conn->lastused = t;
conn->lastused_count = t;
+ age = 0;
}
/* close dirptrs on connections that are idle */
@@ -217,7 +219,7 @@ bool conn_idle_all(struct smbd_server_connection *sconn,time_t t)
}
if (conn->num_files_open > 0 || age < deadtime) {
- return False;
+ ret = false;
}
}
@@ -229,11 +231,12 @@ bool conn_idle_all(struct smbd_server_connection *sconn,time_t t)
for (plist = get_first_internal_pipe(); plist;
plist = get_next_internal_pipe(plist)) {
if (num_pipe_handles(plist->pipe_handles) != 0) {
- return False;
+ ret = false;
+ break;
}
}
- return True;
+ return ret;
}
/****************************************************************************
--
Samba Shared Repository
More information about the samba-cvs
mailing list