summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/files.c3
-rw-r--r--source3/smbd/server_exit.c9
2 files changed, 6 insertions, 6 deletions
diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index a50bd950a5..5293529411 100644
--- a/source3/smbd/files.c
+++ b/source3/smbd/files.c
@@ -226,13 +226,14 @@ void file_close_user(struct smbd_server_connection *sconn, int vuid)
*/
struct files_struct *files_forall(
+ struct smbd_server_connection *sconn,
struct files_struct *(*fn)(struct files_struct *fsp,
void *private_data),
void *private_data)
{
struct files_struct *fsp, *next;
- for (fsp = smbd_server_conn->files; fsp; fsp = next) {
+ for (fsp = sconn->files; fsp; fsp = next) {
struct files_struct *ret;
next = fsp->next;
ret = fn(fsp, private_data);
diff --git a/source3/smbd/server_exit.c b/source3/smbd/server_exit.c
index 1a330994b8..9f2d6b3e9a 100644
--- a/source3/smbd/server_exit.c
+++ b/source3/smbd/server_exit.c
@@ -78,12 +78,11 @@ static void exit_server_common(enum server_exit_reason how,
TALLOC_FREE(sconn->smb1.negprot.auth_context);
}
- if (lp_log_writeable_files_on_exit()) {
- bool found = false;
- files_forall(log_writeable_file_fn, &found);
- }
-
if (sconn) {
+ if (lp_log_writeable_files_on_exit()) {
+ bool found = false;
+ files_forall(sconn, log_writeable_file_fn, &found);
+ }
had_open_conn = conn_close_all(sconn);
invalidate_all_vuids(sconn);
}