sbackupd lock file generation is not atomic

Bug #312945 reported by Helmut Raiger
2
Affects Status Importance Assigned to Milestone
sbackup (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: sbackup

The lock file generation in sbackupd.py is not atomic as it tries to open the lockfile for read and if this fails it creates it by opening it for write.

Something like:

try:
            fd = os.open(path, os.O_CREAT | os.O_EXCL | os.O_RDWR)
except OSError, e:
            if e.errno != errno.EEXIST:

should fix the issue.

Changed in sbackup (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.