smbstatus: Fix an uninitialized variable
authorVolker Lendecke <vl@samba.org>
Sun, 29 Jun 2014 08:56:03 +0000 (08:56 +0000)
committerJeremy Allison <jra@samba.org>
Mon, 30 Jun 2014 20:28:15 +0000 (22:28 +0200)
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 <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/locking/share_mode_lock.c

index 5e25404426f5ae31c10bdea6da45e69d07ef8cb1..12f499b1b97cdaf991bf4941e78d472ed8e8063c 100644 (file)
@@ -484,6 +484,7 @@ static int traverse_fn(struct db_record *rec, void *_state)
                NDR_PRINT_DEBUG(share_mode_data, d);
        }
        for (i=0; i<d->num_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);