-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
keepassxc only relies on inotify to handle external changes #1799
Description
Expected Behavior
If the password database file is on a shared filesystem (for example webdav, sshfs or nfs), the file should be regularly checked for changes, as inotify does not work on these filesystems with changes by other clients.
Current Behavior
If another program changes the password database, it is only detected if the filesystem is supported by inotify. So if the file is on a webdav, sshfs, nfs or other network filesystem, the changes are not detected. When another client changes and saves the database and (for example) several hours later, we change and save the database, the changes by the other client are lost.
Also, if another client changes and saves the password database, the only way to use the changes is to close and re-open the file.
Possible Solution
"Regular checking" should be done before saving (to prevent overwriting changes by other clients) and can be done on focus gain and several other actions done on the database.
If the file has changed, then it can be handled just like when a change was detected by the QFileSystemWatcher.
If keepassxc should do the regular checking, can be defined by a setting, because it is probably not possible to detect reliably if the file is on a shared filesystem.
Steps to Reproduce (for bugs)
- open the password database file from another computer using sshfs
- change and save the file on the other computer
- change and save the file on the computer where you mounted the directory with sshfs
- changes done in 2. are lost without notice
Context
We share the same password database files over nfs (and sshfs) as this is our default filesystem to share files between several users.
It is useful to always have the latest version available, but now we only have the latest version after closing and re-opening. On top of that, it is a dangerous situation to loose changes.
Debug Info
KeePassXC - 2.3.1
Operating system: Linux
CPU architecture: x64
Kernel: 4.4.120