sbackupd lock file generation is not atomic
Bug #312945 reported by
Helmut Raiger
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.