From 9f2e90754bcb7bf5f7159d07f0bc5fe754e71bf5 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 29 Jun 2014 08:56:03 +0000 Subject: 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 --- 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 5e25404426..12f499b1b9 100644 --- a/source3/locking/share_mode_lock.c +++ b/source3/locking/share_mode_lock.c @@ -484,6 +484,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); -- cgit