From 7d91ffc6fdc3b371564e14f09822a96264ea372a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 30 Aug 2013 12:49:43 +0000 Subject: smbd: Fix flawed share_mode_stale_pid API The comment for this routine said: > Modifies d->num_share_modes, watch out in routines iterating over > that array. Well, it turns out that *every* caller of this API got it wrong. So I think it's better to change the routine. This leaves the array untouched while iterating but filters out the deleted ones while saving them back to disk. Signed-off-by: Volker Lendecke Reviewed-by: Michael Adam --- source3/librpc/idl/open_files.idl | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/librpc') diff --git a/source3/librpc/idl/open_files.idl b/source3/librpc/idl/open_files.idl index a2e386f68c..686bc02548 100644 --- a/source3/librpc/idl/open_files.idl +++ b/source3/librpc/idl/open_files.idl @@ -23,6 +23,12 @@ interface open_files uint32 uid; uint16 flags; uint32 name_hash; + + /* + * In-memory flag indicating a non-existing pid. We don't want + * to store this share_mode_entry on disk. + */ + [skip] boolean8 stale; } share_mode_entry; typedef [public] struct { -- cgit