These options allow to specify alternative groups. The command
su(1) has to be executed by root. The implementation is based on
Fedora runuser(1) command.
For example:
# su --group=kzak --supp-group=uuidd -
# id
uid=0(root) gid=1000(kzak) groups=0(root),985(uuidd),1000(kzak)
non-root user:
$ su --group=kzak -
su: only root can specify alternative groups
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/fsck.cramfs.c: In function ‘test_crc’:
disk-utils/fsck.cramfs.c:231:32: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
disk-utils/fsck.cramfs.c:233:24: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisks/utils.c: s/firts/first/: found by misspellings.
s/Zero's/Zeros/: denoted by Pdraig Brady <P@draigBrady.com>.
Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
This matches more closely with what 'df -h' reports as space available.
Any remaining discrepancy between these 2 tools is a result of precision
and choices in rounding.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
# mount -n -o ro /dev/sda1 /
# mount -o remount,rw /dev/sda1 /
For the backward compatibility the command mount(8) should to add a
new entry to the file /etc/mtab on remount if the original entry not
found (because previous mount has been called with -n).
Reported-by: <frinnst> on IRC
Signed-off-by: Karel Zak <kzak@redhat.com>
- use regular NTFS bios parameters block
- don't care about mirror cluster location
- remove unnecessary macros
- add more checks (based on Linux kernel code)
Signed-off-by: Karel Zak <kzak@redhat.com>
We should not care about mountpoints in fsck if a device name
specified on command line, just check if the device is used somewhere
in /proc/self/mountinfo file.
Crazy people who use
fsck /mountpoint
have to specify the mountpoint by the same format as in their fstab --
symlinks canonicalization is not supported.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=850965
Signed-off-by: Karel Zak <kzak@redhat.com>
The old implementation always canonicalizes target (mountpoint) path.
It's better to postpone this operation until the path is really
necessary (usually it's unnecessary), because readlink() on mountpoint
may trigger automounts.
Signed-off-by: Karel Zak <kzak@redhat.com>
autoconf docs about *dir variables (e.g bindir):
... A corollary is that you should not use these variables except in
makefiles...
...you should not rely on AC_CONFIG_FILES to replace bindir and friends
in your shell scripts and other files; instead, let make manage their
replacement.
Signed-off-by: Karel Zak <kzak@redhat.com>
The --separator and --columns long options in util-linux-2.21.2 and in
a git clone from 5 minutes ago, don't work:
$ echo foobar | column -s x
foobar
$ echo foobar | column -c 10
foobar
$ echo foobar | column --separator=x
column: option '--separator' doesn't allow an argument
$ echo foobar | column --separator x
Segmentation fault
$ echo foobar | column --columns 10
column: bad columns width value: '(null)': Invalid argument
$ echo foobar | column --columns=10
column: option '--columns' doesn't allow an argument
Looks like a simple case of missing has_arg flag in the "struct
option" initialization for these two options. The patch just adds the
flag. I haven't done thorough testing of the patched code, but it
seems to work OK and it no longer segfaults or tries to dereference a
null pointer.
Signed-off-by: Karel Zak <kzak@redhat.com>
* read WWN from udev DB
* use *_ENC properties from udev DB to get original unmodified
strings (otherwise for example blank space is replaced with '_' in
ID_FS_LABEL)
* always read from udev, libblkid is fallback solution only
Signed-off-by: Karel Zak <kzak@redhat.com>
This is a simple wrapper for BLKPG_RESIZE_PARTITION (since kernel 3.6).
Co-Author: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
... so for example lsblk(8) will see partitioned loop devices
loop0 7:0 0 80G 0 loop
├─loop0p1 259:0 0 100M 0 loop
└─loop0p2 259:1 0 79.9G 0 loop
Signed-off-by: Karel Zak <kzak@redhat.com>
The /dev/kmsg can return EPIPE if current record has beed modified
while reading.
For init_kmsg, it cause switch to DMESG_METHOD_SYSLOG
(which is not expected) and later it can truncate output.
Signed-off-by: Milan Broz <mbroz@redhat.com>
main() expects this method to return 0 for failure and 1 for success, as
the other eject_*() methods do. Add the missing comparison of ioctl() >= 0
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
loopdev.c, test_pager, and get_max_number_of_cpus() are linux-specific.
get_linux_version will only work on Linux, let's introduce
system_supports_ext4_ext2() which assumes that mounting ext2 with ext4
is not supported on non-Linux systems.
[kzak@redhat.com: - use #ifdef SYS_sched_getaffinity rather than __linux__]
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Karel Zak <kzak@redhat.com>