From 74a80557f6d9b7a85656ec701ab70eb091fe2e11 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 29 Jun 2014 08:56:03 +0000 Subject: [PATCH] smbstatus: Fix an uninitialized variable We only print valid share mode entries, stale ones don't count. In traverse, let the callback decide about staleness. https://bugzilla.samba.org/show_bug.cgi?id=10680 Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison (cherry picked from commit 9f2e90754bcb7bf5f7159d07f0bc5fe754e71bf5) --- source3/locking/share_mode_lock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source3/locking/share_mode_lock.c b/source3/locking/share_mode_lock.c index 342f9108d6a..4f049bd68a9 100644 --- a/source3/locking/share_mode_lock.c +++ b/source3/locking/share_mode_lock.c @@ -495,6 +495,7 @@ static int traverse_fn(struct db_record *rec, void *_state) NDR_PRINT_DEBUG(share_mode_data, d); } for (i=0; inum_share_modes; i++) { + d->share_modes[i].stale = false; /* [skip] in idl */ state->fn(&d->share_modes[i], d->servicepath, d->base_name, state->private_data); -- 2.11.4.GIT