[Patch] Stop smbprofile.tdb from growing when level is set to 0

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Jan 10 07:44:11 UTC 2019


On Wed, Jan 09, 2019 at 06:24:51PM +0000, Dylan Stephano-Shachter via samba-technical wrote:
> I believe we still need the change in smbprofile_cleanup. The
> problem is whenever a new connection is created it creates a new
> process. Thus a new unique key for tdb_store and so it will continue
> to grow.

smbprofile_dump is the routine to create the per-smbd records. With
the early return those records are not created.

smbprofile_cleanup looks at possibly existing records and deletes
them if they exist. This might happen if a worker-smbd has changed the
profile level throughout its existence, making it different from
cleanupd. The subtle aspect of smbprofile_cleanup() is the little
"pid=dst;" line. The tdb_store is done on the "dst" process' record.
If you look at the caller of smbprofile_cleanup, this is always the
parent smbd, and that never changes while smbd is running. And I would
argue that we want this one and only record to exist, this is nothing
that should cause space problems with the tdb file.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: 0551-370000-0, mailto:kontakt at sernet.de
Gesch.F.: Dr. Johannes Loxen und Reinhild Jung
AG Göttingen: HR-B 2816 - http://www.sernet.de



More information about the samba-technical mailing list