diff options
author | Flávio Leitner | 2007-07-31 12:42:14 +0200 |
---|---|---|
committer | Karel Zak | 2007-07-31 12:44:31 +0200 |
commit | 1002156a0667a9c907465db39e758f74152e73e4 (patch) | |
tree | 26ccb8853e13c7ad8ce58a4c54c6ed886439791e /disk-utils/blockdev.c | |
parent | disk-utils: let mkfs tools open with O_EXCL (diff) | |
download | kernel-qcow2-util-linux-1002156a0667a9c907465db39e758f74152e73e4.tar.gz kernel-qcow2-util-linux-1002156a0667a9c907465db39e758f74152e73e4.tar.xz kernel-qcow2-util-linux-1002156a0667a9c907465db39e758f74152e73e4.zip |
mount: should set proper permissions on locktime
When creating the "/etc/mtab~" lockfile (specifically 'linktargetfile' in the
lock_mtab function), the file is created with incorrect permissions ('000')
which necessitates root to leverage CAP_DAC_OVERRIDE. If proper file modes (it
would appear 0600 would be sufficient) were used in the open this would
function properly with CAP_DAC_OVERRIDE revoked.
$ sysctl -w kernel.cap-bound=0xf7fd7df5
$ mount -t tmpfs /dev/swap /mnt
can't open lock file /etc/mtab~: Permission denied (use -n flag to override)
Signed-off-by: Flávio Leitner <fleitner@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/blockdev.c')
0 files changed, 0 insertions, 0 deletions