[PATCH] use tdbbackup, not shutil.copy, skip 'upgrade' of privileges.ldb

Matthieu Patou mat at samba.org
Mon Feb 18 21:43:54 MST 2013

On 02/17/2013 12:41 AM, Michael Wood wrote:
> On 17 February 2013 10:39, Michael Wood <esiotrot at gmail.com> wrote:
>> Hi
>> On 17 February 2013 10:09, Andrew Bartlett <abartlet at samba.org> wrote:
>>> This series of patches (in on and top of my upgradeprovision branch)
>>> makes an important fix to the upgrade code, because calling shutil.copy
>>> is NOT A SAFE WAY to deal with tdb (indeed any) databases.
>> I thought shutil.copy would be perfectly safe as long as Samba was
>> shut down at the time.  Is this not the case?
> Never mind.  I've just realised that upgradeprovision would be
> accessing tdb files, so shutil.copy does seem suspect, unless it does
> the copies in such a way that there's no chance that any tdb files are
> open at the time.
Normally upgradeprovision has no transaction on ldb/tdb when doing the 
copy, might not be the case for the priviledge.ldb though.


Matthieu Patou
Samba Team

More information about the samba-technical mailing list