diff options
author | Karel Zak | 2015-06-19 12:17:45 +0200 |
---|---|---|
committer | Karel Zak | 2015-06-19 12:30:40 +0200 |
commit | 7dc0f5c90ee9899a1d92de77ad3d8af998198379 (patch) | |
tree | f5dde135d91100e511de6890b6067f23f678d113 /libmount/src/tab_update.c | |
parent | libuuid: return correct value for uuid_generate_time_safe (diff) | |
download | kernel-qcow2-util-linux-7dc0f5c90ee9899a1d92de77ad3d8af998198379.tar.gz kernel-qcow2-util-linux-7dc0f5c90ee9899a1d92de77ad3d8af998198379.tar.xz kernel-qcow2-util-linux-7dc0f5c90ee9899a1d92de77ad3d8af998198379.zip |
libmount: improve monitor to be usable for non-root users
The current implementation calls mkdir and open(O_CREATE) to
initialize /run/mount/utab.lock before it starts to monitor the file.
Unfortunately it makes the monitor useless for non-root processes
(e.g. systemd --user).
The new implementation adds inotify watch for the last existing
component in the path (/run/mount/utab.lock) and re-initialize
after a change. It makes the monitor robust enough for mkdir/rmdir
when monitor is already active.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/tab_update.c')
0 files changed, 0 insertions, 0 deletions