]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
4 years agobuild-sys: release++ (v2.35-rc2) v2.35-rc2
Karel Zak [Wed, 8 Jan 2020 09:28:29 +0000 (10:28 +0100)] 
build-sys: release++ (v2.35-rc2)

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agodocs: update v2.35-ReleaseNotes
Karel Zak [Wed, 8 Jan 2020 09:26:12 +0000 (10:26 +0100)] 
docs: update v2.35-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agodocs: update AUTHORS file
Karel Zak [Wed, 8 Jan 2020 09:22:55 +0000 (10:22 +0100)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agopo: merge changes
Karel Zak [Wed, 8 Jan 2020 09:16:57 +0000 (10:16 +0100)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoMerge branch 'fix-xfs-external-log' of https://github.com/mfoliveira/util-linux
Karel Zak [Wed, 8 Jan 2020 08:53:32 +0000 (09:53 +0100)] 
Merge branch 'fix-xfs-external-log' of https://github.com/mfoliveira/util-linux

4 years agolibblkid: check status for the current CDROM slot
Karel Zak [Wed, 8 Jan 2020 08:23:04 +0000 (09:23 +0100)] 
libblkid: check status for the current CDROM slot

It's probably more safer.

Reported-by: Michal Suchánek <msuchanek@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolibblkid: (xfs) external log: check for regular xfs on more sectors
Mauricio Faria de Oliveira [Tue, 7 Jan 2020 21:53:51 +0000 (18:53 -0300)] 
libblkid: (xfs) external log: check for regular xfs on more sectors

The xfs external log probe only checks for regular xfs on sector zero,
but then checks for valid log record headers on all first 512 sectors.

This can incorrectly detect an xfs external log if a regular xfs (i.e.
with internal log) is shifted by up to 512 sectors; it may happen with
bcache and LVM1 for example, as the regular xfs is found later in disk.

This results in ambivalent filesystem detection, thus no UUID for udev.

Fix this problem by checking for regular xfs on all sectors considered
by the xfs external log probe.

Test-case with bcache:
---

    $ IMG=bcache-backing-device.img
    $ dd if=/dev/zero of=$IMG bs=1G count=0 seek=1
    $ DEV=$(sudo losetup --find --show $IMG)

    $ sudo make-bcache -B $DEV

    $ sudo mkfs.xfs -d agsize=16m -l agnum=0 -f /dev/bcache0

    $ sudo LD_LIBRARY_PATH=./.libs ./wipefs /dev/bcache0
    DEVICE  OFFSET TYPE UUID                                 LABEL
    bcache0 0x0    xfs  9f6dfa9d-4488-46f7-906b-dcfc96027cfe

    $ echo 1 | sudo tee /sys/block/bcache0/bcache/stop

    $ sudo hexdump -C $DEV | grep -m2 -e XFSB -e 'fe ed ba be'
    00002000  58 46 53 42 00 00 10 00  00 00 00 00 00 03 f0 00  |XFSB............|
    00007000  fe ed ba be 00 00 00 01  00 00 00 02 00 00 00 14  |................|

  Without patch:

    $ sudo LD_LIBRARY_PATH=./.libs ./wipefs $DEV
    DEVICE OFFSET TYPE             UUID                                 LABEL
    loop0  0x1018 bcache           23da3ba9-2467-453d-b020-06f02c947190
    loop0  0x7000 xfs_external_log

  With patch:

    $ sudo LD_LIBRARY_PATH=./.libs ./wipefs $DEV
    DEVICE OFFSET TYPE             UUID                                 LABEL
    loop0  0x1018 bcache           23da3ba9-2467-453d-b020-06f02c947190

Test-case with LVM1:
---

    $ IMG=lvm-backing-device.img
    $ dd if=/dev/zero of=$IMG bs=1G count=0 seek=1
    $ DEV=$(sudo losetup --find --show $IMG)

    $ sudo lvm pvcreate -M1 $DEV
    $ sudo lvm vgcreate -M1 lvm-vg-test $DEV
    $ sudo lvm lvcreate  lvm-vg-test --name lvm-lv-test --extents 100%VG

    $ sudo mkfs.xfs -d agsize=16m -l agnum=0 -f /dev/mapper/lvm--vg--test-lvm--lv--test

    $ sudo LD_LIBRARY_PATH=./.libs ./wipefs /dev/mapper/lvm--vg--test-lvm--lv--test
    DEVICE                      OFFSET TYPE UUID                                 LABEL
    lvm--vg--test-lvm--lv--test 0x0    xfs  451ba725-8394-4ebe-9b49-fc5f4a99667f

    $ sudo lvchange -an lvm-vg-test

    $ sudo hexdump -C $DEV | grep -m2 -e XFSB -e 'fe ed ba be'
    00020000  58 46 53 42 00 00 10 00  00 00 00 00 00 03 f0 00  |XFSB............|
    00025000  fe ed ba be 00 00 00 01  00 00 00 02 00 00 00 14  |................|

  Without patch:

    $ sudo LD_LIBRARY_PATH=./.libs ./wipefs $DEV
    DEVICE OFFSET  TYPE             UUID                                   LABEL
    loop0  0x0     LVM1_member      agUhNT-9f42-Z30B-Z4Ew-skWd-3h3a-tWMY0A
    loop0  0x25000 xfs_external_log

  With patch:

    $ sudo LD_LIBRARY_PATH=./.libs ./wipefs $DEV
    DEVICE OFFSET TYPE        UUID                                   LABEL
    loop0  0x0    LVM1_member agUhNT-9f42-Z30B-Z4Ew-skWd-3h3a-tWMY0A

Signed-off-by: Mauricio Faria de Oliveira <mfo@canonical.com>
4 years agolibblkid: check for medium on CDMROMs probing
Karel Zak [Tue, 7 Jan 2020 15:48:34 +0000 (16:48 +0100)] 
libblkid: check for medium on CDMROMs probing

The commit 39f5af25982d8b0244000e92a9d0e0e6557d0e17 introduces
O_NONBLOCK to avoid the tray close on open(). The side effect is that
open() is successful when there is no medium.

This is usually no problem for standard tools because the next read()
will fail. Unfortunately, libblkid ignores I/O errors for (and only
for) CDROMs to support some crazy hybrid data+audio disks. The final
result is many I/O errors in system log when O_NONBLOCK is enabled.

This patch add CDROM_DRIVE_STATUS to stop probing when there is no
disk or when the tray is open.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1787973
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agotests: mark mdadm tests as TS_KNOWN_FAIL
Karel Zak [Tue, 7 Jan 2020 10:40:17 +0000 (11:40 +0100)] 
tests: mark mdadm tests as TS_KNOWN_FAIL

It seems recent changes in mdadm make things a little bit unstable for
some users. Let's mark the tests temporary as TS_KNOWN_FAIL until we
get more information.

Addresses: https://github.com/karelzak/util-linux/issues/906
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agopo: merge changes
Karel Zak [Mon, 6 Jan 2020 13:21:12 +0000 (14:21 +0100)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agodocs: update year in libs docs
Karel Zak [Mon, 6 Jan 2020 11:59:45 +0000 (12:59 +0100)] 
docs: update year in libs docs

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agocal: (man) make -w, -m and --iso relation more obvious
Karel Zak [Fri, 3 Jan 2020 11:04:00 +0000 (12:04 +0100)] 
cal: (man) make -w, -m and --iso relation more obvious

Reported-by: Leah Neukirchen <leah@vuxu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agodocs: add irqtop to TODO
Karel Zak [Fri, 3 Jan 2020 10:12:19 +0000 (11:12 +0100)] 
docs: add irqtop to TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolibmount: improve X-mount.mkdir for non-root users
Karel Zak [Fri, 3 Jan 2020 09:48:09 +0000 (10:48 +0100)] 
libmount: improve X-mount.mkdir for non-root users

Since v2.35 mount(8) drops suid on -EPERM and repeat necessary actions
before mount(2) syscall. This patch also improves this behavior for
X-mount.mkdir too.

mount(8):
 * return -EPERM on sanitize_paths() rather than call err()
 * call suid_drop() on failed sanitize_paths()
 * update man page

libmount:
 * mnt_context_prepare_target() refactoring
 * return -EPERM when in restricted mode for X-mount.mkdir

Fixed version:
 /home/kzak/mnt-foo   sr.net.home:/home/kzak   fuse.sshfs noauto,X-mount.mkdir

 $ mount /home/kzak/mnt-foo
 kzak@sr.net.home's password:

 $ /home/projects/util-linux/util-linux  findmnt /home/kzak/mnt-foo
 TARGET             SOURCE                 FSTYPE     OPTIONS
 /home/kzak/mnt-foo sr.net.home:/home/kzak fuse.sshfs rw,nosuid,nodev,relatime,user_id=1000,group_id=1000

Addresses: https://github.com/systemd/systemd/issues/14418
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolibfdisk: (MBR) use 0xEA partition type by BootLoaderSpecification
Karel Zak [Thu, 2 Jan 2020 14:16:54 +0000 (15:16 +0100)] 
libfdisk: (MBR) use 0xEA partition type by BootLoaderSpecification

Let's use 0xEA for "Linux extended boot" rather than for "Rufus alignment".

References: https://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agodocs: add non-signalfd PTY request to TODO
Karel Zak [Thu, 2 Jan 2020 13:48:23 +0000 (14:48 +0100)] 
docs: add non-signalfd PTY request to TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoMerge branch 'fix-map-current-user-shortopt' of https://github.com/mat8913/util-linux
Karel Zak [Thu, 2 Jan 2020 13:16:04 +0000 (14:16 +0100)] 
Merge branch 'fix-map-current-user-shortopt' of https://github.com/mat8913/util-linux

* 'fix-map-current-user-shortopt' of https://github.com/mat8913/util-linux:
  unshare: fix --map-current-user short option (-c)

4 years agodocs: add bjd-pfq to AUTHORS (rev.c co-author)
Karel Zak [Thu, 2 Jan 2020 11:53:01 +0000 (12:53 +0100)] 
docs: add bjd-pfq to AUTHORS (rev.c co-author)

Addresses: https://github.com/karelzak/util-linux/issues/803
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agounshare: fix --map-current-user short option (-c)
Matthew Harm Bekkema [Wed, 1 Jan 2020 13:15:11 +0000 (00:15 +1100)] 
unshare: fix --map-current-user short option (-c)

'c' was missing from the optstring, causing the error:

    $ unshare --user -c
    unshare: invalid option -- 'c'
    Try 'unshare --help' for more information.

Fixes: 4175f29e62 ("unshare: add --map-current-user option")
Signed-off-by: Matthew Harm Bekkema <id@mbekkema.name>
4 years agoagetty: keep freed issue file pointer zeroized
Karel Zak [Fri, 20 Dec 2019 14:05:33 +0000 (15:05 +0100)] 
agetty: keep freed issue file pointer zeroized

References: https://bugzilla.redhat.com/show_bug.cgi?id=1784536
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoMerge branch 'master' of https://github.com/dsd/util-linux
Karel Zak [Fri, 20 Dec 2019 11:55:49 +0000 (12:55 +0100)] 
Merge branch 'master' of https://github.com/dsd/util-linux

* 'master' of https://github.com/dsd/util-linux:
  libblkid: improve identification of ISO9660 partition
  isosize: move ISO size functions into a shared header

4 years agotests: (fdisk) make sure we use the same sizes for MD devices
Karel Zak [Tue, 17 Dec 2019 17:10:31 +0000 (18:10 +0100)] 
tests: (fdisk) make sure we use the same sizes for MD devices

It seems on some kernels MD can return error if the devices in RAID
have different size

 # mdadm -q --create /dev/md8 --chunk=64 --level=0 --raid-devices=2 /dev/sda1 /dev/sda2
 mdadm: RUN_ARRAY failed: Unknown error 524

 # dmesg
 ...
 [ 1485.148435] md/raid0:md8: cannot assemble multi-zone RAID0 with default_layout setting
 [ 1485.152306] md/raid0: please set raid.default_layout to 1 or 2
 [ 1485.154050] md: pers->run() failed ...
 [ 1485.154104] md: md8 stopped.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoMerge branch 'master' of https://github.com/pali/util-linux
Karel Zak [Tue, 17 Dec 2019 11:34:18 +0000 (12:34 +0100)] 
Merge branch 'master' of https://github.com/pali/util-linux

* 'master' of https://github.com/pali/util-linux:
  libblkid: udf: Fix reporting UDF 2.60 revision for Mac OS X disks

4 years agodoc: howto-man-page.txt: Use font macros instead of font escapes
Bjarni Ingi Gislason [Mon, 16 Dec 2019 22:20:32 +0000 (22:20 +0000)] 
doc: howto-man-page.txt: Use font macros instead of font escapes

  Use font macros instead of font escapes (\f[BIPR]).

  The escape '\c' ("connect to next input text")
is used to join the output of two macros without a space character.
This is similar to the '\' escape at the end of a line.

  Font escapes make the text more difficult to read.

###
  Changes based on:

  Use a macro to change to the italic font,
instead of \fI [1], if possible.
  The macros have the italic corrections,
but "\c" removes the "\/" part.

  Or

add the italic corrections.
[1] man-pages(7) [Debian package "manpages"]

###

Change a HYPHEN-MINUS (code 0x55, 2D) to a minus (\-), if in front of a

1) name for an option

2) negative number to be printed.

###

Wrong distance between sentences or protect the indicator.

a) Separate the sentences and subordinate clauses;
each begins on a new line.
See man-pages(7) [package "manpages"] and "info groff".

Or

b) Adjust space between sentences (two spaces),

c) or protect the indicator by adding "\&" after it.

The "indicator" is an "end-of-sentence character" (.!?).

  The amount of space between sentences in the output can then be
controlled with the ".ss" request.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
4 years agoman pages: Change a HYPHEN-MINUS (-) to a minus (\-) for options and numbers
Bjarni Ingi Gislason [Mon, 16 Dec 2019 00:51:57 +0000 (00:51 +0000)] 
man pages: Change a HYPHEN-MINUS (-) to a minus (\-) for options and numbers

  Change a HYPHEN-MINUS (code 0x55, 2D) to a minus (\-), if in front of

1) a name of an option

2) a negative number to be printed.

  See man-pages(7) [Debian package "manpages"].

  The output from "nroff" is unchanged.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
4 years agoman pages: Add a comma after "e.g." and "i.e."
Bjarni Ingi Gislason [Sat, 14 Dec 2019 22:42:47 +0000 (22:42 +0000)] 
man pages: Add a comma after "e.g." and "i.e."

  Add a comma (,) after "e.g." and "i.e.", or use English words
(man-pages(7) [package "manpages"]).

  Abbreviation points should be protected (usually with the
non-printing, zero width character '\&') from being interpreted as an
end of sentence, if they are not, and that independent of their current
place on the line.

  This is important when typing, as one does not usually know in
advance when the editor jumps to a new line.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
4 years agoman pages: Fix misuse of two-fonts macros
Bjarni Ingi Gislason [Sat, 14 Dec 2019 00:14:40 +0000 (00:14 +0000)] 
man pages: Fix misuse of two-fonts macros

  Two-fonts macros are made for two or more arguments.

  Remove space at end of lines in the files "term-utils/{script.1,
scriptlive.1, scriptreplay.1}".

  Put "\-\-summary" to the correct indent in the file
"term-utils/script.1"

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
4 years agoman pages: Make the number of .RS/.RE equal
Bjarni Ingi Gislason [Sat, 14 Dec 2019 00:12:30 +0000 (00:12 +0000)] 
man pages: Make the number of .RS/.RE equal

  Add or remove one of the pairs .RS/.RE to make their number equal.

  The output from "nroff" and "groff" is unchanged.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
4 years agotests: (chfn) force to bash
Karel Zak [Mon, 16 Dec 2019 14:27:45 +0000 (15:27 +0100)] 
tests: (chfn) force to bash

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agotravis: fix sudo command line
Karel Zak [Mon, 16 Dec 2019 13:29:33 +0000 (14:29 +0100)] 
travis: fix sudo command line

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agotests: add new test for chfn gecos
Radka Skvarilova [Mon, 16 Dec 2019 09:57:32 +0000 (10:57 +0100)] 
tests: add new test for chfn gecos

Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=1743555
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolibblkid: improve identification of ISO9660 partition
Daniel Drake [Mon, 16 Dec 2019 06:16:48 +0000 (14:16 +0800)] 
libblkid: improve identification of ISO9660 partition

Recent changes to the iso9660 handler attempt to better handle the case
where the media has both an ordinary ISO9660 filesystem, and a partition
table with a partition entry pointing at the ISO9660 filesystem.

Rather than assuming the presence of a partition table means that there
is an ISO9660 partition, check that such a partition exists before
deciding upon which device the metadata should be presented. One real
world example of this is the grub-mkrescue image format; add a unit test
to cover that.

Secondly, even if we find an appropriate entry in the partition table,
verify that we actually have a device that corresponds to the partition
where we would then proceed to expose this metadata. In the case of a
CD/DVD (i.e. /dev/sr0) we would not normally expect to see devices
corresponding to the partitions, in that case the ISO metadata should be
presented on the whole disk (/dev/sr0).

Fixes: 7ef86a0891 ("libblkid: improve handling of ISO files with partition tables")
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1783066
Signed-off-by: Daniel Drake <drake@endlessm.com>
4 years agoisosize: move ISO size functions into a shared header
Daniel Drake [Mon, 16 Dec 2019 05:48:56 +0000 (13:48 +0800)] 
isosize: move ISO size functions into a shared header

Move the helper functions that parse ISO data & sector size info into
a separate, shared header.

These will addtionally be used by libblkid's iso9660 parser.

Signed-off-by: Daniel Drake <drake@endlessm.com>
4 years agolibblkid: udf: Fix reporting UDF 2.60 revision for Mac OS X disks
Pali Rohár [Sun, 15 Dec 2019 11:55:41 +0000 (12:55 +0100)] 
libblkid: udf: Fix reporting UDF 2.60 revision for Mac OS X disks

Apple's newfs_udf, when creating UDF 2.60 disks, sets value 2.50 into
both Minimum UDF Read Revision and Minimum UDF Write Revision fields in
LVIDIU. And sets 2.60 value into UDF revision field in LVD descriptor.

So to correctly parse and set blkid ID_FS_VERSION field, use maximum value
from Minimum UDF Read Revision in LVIDIU, Minimum UDF Write Revision in
LVDIU and UDF revision in LVD descriptor.

This commit also adds a testing UDF 2.60 disk image with 4K sectors created
by Apple's newfs_udf to verify that ID_FS_VERSION is set correctly to 2.60.

4 years agoMerge branch 'release-prep' of https://github.com/kerolasa/util-linux
Karel Zak [Thu, 12 Dec 2019 11:39:18 +0000 (12:39 +0100)] 
Merge branch 'release-prep' of https://github.com/kerolasa/util-linux

4 years agoagetty: return proper value if compiled without ISSUEDIR support
Patrick Steinhardt [Wed, 11 Dec 2019 13:44:22 +0000 (14:44 +0100)] 
agetty: return proper value if compiled without ISSUEDIR support

If agetty is compiled without support for ISSUEDIR, then it implements
a stub for `issuedir_read` that simply does nothing. In fact it does
too little, as it doesn't have a proper return statement even though the
function returns an integer.

Fix the issue by always returning `1` from `issuedir_read`. This
is the same error code that the real implementation of that function
returns in case it cannot open the directory and is thus a sensible
default to pretend that the directory doesn't exist.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
4 years agoscript: fix typos [codespell]
Sami Kerola [Wed, 11 Dec 2019 19:50:06 +0000 (19:50 +0000)] 
script: fix typos [codespell]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
4 years agoman: improve script and scriptreplay formatting style
Sami Kerola [Wed, 11 Dec 2019 19:36:26 +0000 (19:36 +0000)] 
man: improve script and scriptreplay formatting style

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
4 years agobash-completion: update script, scriptlive, and scriptreplay files
Sami Kerola [Wed, 11 Dec 2019 19:19:21 +0000 (19:19 +0000)] 
bash-completion: update script, scriptlive, and scriptreplay files

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
4 years agobuild-sys: make scriptlive optional
Samuel Thibault [Wed, 11 Dec 2019 12:24:25 +0000 (13:24 +0100)] 
build-sys: make scriptlive optional

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agobuild-sys: release++ (v2.35-rc1) v2.35-rc1
Karel Zak [Wed, 11 Dec 2019 09:55:14 +0000 (10:55 +0100)] 
build-sys: release++ (v2.35-rc1)

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agodocs: add v2.35-ReleaseNotes
Karel Zak [Wed, 11 Dec 2019 09:52:51 +0000 (10:52 +0100)] 
docs: add v2.35-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoMerge branch 'dmverity_options' of https://github.com/bluca/util-linux
Karel Zak [Tue, 10 Dec 2019 13:46:13 +0000 (14:46 +0100)] 
Merge branch 'dmverity_options' of https://github.com/bluca/util-linux

* 'dmverity_options' of https://github.com/bluca/util-linux:
  verity: add support for Forward Error Correction options
  verity: ensure that hash_device and root_hash[_file] are passed together or not at all
  verity: add new verity.roothashfile option

4 years agodocs: update AUTHORS file
Karel Zak [Tue, 10 Dec 2019 13:08:26 +0000 (14:08 +0100)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agopo: merge changes
Karel Zak [Tue, 10 Dec 2019 13:04:50 +0000 (14:04 +0100)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agopo: add pt.po (from translationproject.org)
Pedro Albuquerque [Tue, 10 Dec 2019 12:57:19 +0000 (13:57 +0100)] 
po: add pt.po (from translationproject.org)

4 years agopo: update zh_CN.po (from translationproject.org)
Boyuan Yang [Tue, 10 Dec 2019 12:57:19 +0000 (13:57 +0100)] 
po: update zh_CN.po (from translationproject.org)

4 years agopo: update ja.po (from translationproject.org)
Takeshi Hamasaki [Tue, 10 Dec 2019 12:57:19 +0000 (13:57 +0100)] 
po: update ja.po (from translationproject.org)

4 years agopo: update de.po (from translationproject.org)
Mario Blättermann [Tue, 10 Dec 2019 12:57:19 +0000 (13:57 +0100)] 
po: update de.po (from translationproject.org)

4 years agoverity: add support for Forward Error Correction options
Luca Boccassi [Tue, 10 Dec 2019 12:26:07 +0000 (12:26 +0000)] 
verity: add support for Forward Error Correction options

Requires kernel built with CONFIG_DM_VERITY_FEC.

4 years agoverity: ensure that hash_device and root_hash[_file] are passed together or not at all
Luca Boccassi [Tue, 10 Dec 2019 11:21:43 +0000 (11:21 +0000)] 
verity: ensure that hash_device and root_hash[_file] are passed together or not at all

If a hash device or a roothash are passed for verity usage, both have to be present
or we cannot use them. Make it an error to pass only one of them.

4 years agoverity: add new verity.roothashfile option
Luca Boccassi [Tue, 10 Dec 2019 11:18:09 +0000 (11:18 +0000)] 
verity: add new verity.roothashfile option

Allow users to point mount to a file to read the roothash, in addition
to passing it inline.
Allows a volume managed by a systemd mount unit to be updated without
changing the mount unit content itself, for easier and more user friendly
servicing.

4 years agobuild-sys: remove duplicate includes
Karel Zak [Tue, 10 Dec 2019 12:50:18 +0000 (13:50 +0100)] 
build-sys: remove duplicate includes

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agobuild-sys: add missing header
Karel Zak [Tue, 10 Dec 2019 11:31:59 +0000 (12:31 +0100)] 
build-sys: add missing header

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agokill: add another ifdef
Karel Zak [Tue, 10 Dec 2019 10:07:30 +0000 (11:07 +0100)] 
kill: add another ifdef

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agokill: add missing ifdefs
Karel Zak [Mon, 9 Dec 2019 15:20:06 +0000 (16:20 +0100)] 
kill: add missing ifdefs

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoscript: document SIGUSR1
Karel Zak [Mon, 9 Dec 2019 15:10:02 +0000 (16:10 +0100)] 
script: document SIGUSR1

Based on pull request: https://github.com/karelzak/util-linux/pull/815

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoscript: listen to SIGUSR1, flush logs on the signal
Karel Zak [Mon, 9 Dec 2019 15:04:18 +0000 (16:04 +0100)] 
script: listen to SIGUSR1, flush logs on the signal

Based on pull request: https://github.com/karelzak/util-linux/pull/815

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agokill: deallocate follow_ups [assan]
Karel Zak [Mon, 9 Dec 2019 12:20:04 +0000 (13:20 +0100)] 
kill: deallocate follow_ups [assan]

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agokill: make man page more informative about --timeout
Karel Zak [Mon, 9 Dec 2019 12:11:16 +0000 (13:11 +0100)] 
kill: make man page more informative about --timeout

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agokill: report features on -V, add lish_header initialization
Karel Zak [Mon, 9 Dec 2019 11:40:53 +0000 (12:40 +0100)] 
kill: report features on -V, add lish_header initialization

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoinclude/pidfd-utils: small cleanup
Karel Zak [Mon, 9 Dec 2019 11:22:31 +0000 (12:22 +0100)] 
include/pidfd-utils: small cleanup

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoMerge branch 'kill-pidfd' of https://github.com/kerolasa/util-linux
Karel Zak [Mon, 9 Dec 2019 11:20:22 +0000 (12:20 +0100)] 
Merge branch 'kill-pidfd' of https://github.com/kerolasa/util-linux

* 'kill-pidfd' of https://github.com/kerolasa/util-linux:
  kill: use pidfd system calls to implement --timeout option
  build-sys: add missing NR underscore to UL_CHECK_SYSCALL()

4 years agoMerge branch 'make-manpage-of-su-clearer' of https://github.com/your-diary/util-linux
Karel Zak [Mon, 9 Dec 2019 11:18:38 +0000 (12:18 +0100)] 
Merge branch 'make-manpage-of-su-clearer' of https://github.com/your-diary/util-linux

* 'make-manpage-of-su-clearer' of https://github.com/your-diary/util-linux:
  Slight change in terms
  Make the manpage of su clearer

4 years agolib/randutils: re-licensing back to BSD
Karel Zak [Mon, 9 Dec 2019 10:30:55 +0000 (11:30 +0100)] 
lib/randutils: re-licensing back to BSD

The file is originally from libuuid, this library is under BSD
licence. Unfortunately, I have added LGPL header by accident to the
file (commit 0f23ee0c855d686b0c315af2c96b8835134cd9e3).

The file under LGPL was modified (in relevant way) by Sami,
Christopher and me. We all agree with re-licensing back to BSD.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Christopher James Halse Rogers <chris@cooperteam.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoSlight change in terms
Manatsu Takahashi [Sun, 8 Dec 2019 13:26:26 +0000 (22:26 +0900)] 
Slight change in terms

4 years agoMake the manpage of su clearer
Manatsu Takahashi [Sun, 8 Dec 2019 13:20:53 +0000 (22:20 +0900)] 
Make the manpage of su clearer

4 years agodocs: Fix adjtime documentation
Pierre Labastie [Fri, 6 Dec 2019 11:50:46 +0000 (12:50 +0100)] 
docs: Fix adjtime documentation

The first line of the adjtime file is made of three numbers (see=20
hwclock.c):
- a drift factor as a decimal float
- the time of last adjust as a decimal integer
- a zero (for compatibility) as a decimal float.

but both man pages (hwclock.8 and adj_time.5) tell that the third
number is a decimal integer.

Of course this is harmless if somebody edits the adjtime file with
"0"=20 as the third number: it will be correctly read by hwclock
anyway.  But if for some reason, a program reads the adjtime file and
expects an integer, it will fail, because hwclock writes O.OOOO0O as
the third=20 number.

Signed-off-by:: Pierre Labastie <pierre.labastie@neuf.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agosu: silence a useless warning
Jouke Witteveen [Fri, 6 Dec 2019 10:06:03 +0000 (11:06 +0100)] 
su: silence a useless warning

When the requested shell matches the restricted shell, there is no reason
to issue a warning, since we will be doing precisely as requested.

Signed-off-by: Jouke Witteveen <j.witteveen@gmail.com>
4 years agomount: add verity example to man page
Karel Zak [Thu, 5 Dec 2019 14:32:23 +0000 (15:32 +0100)] 
mount: add verity example to man page

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agobuild-sys: add --with-cryptsetup to config-gen.d/all.conf
Karel Zak [Thu, 5 Dec 2019 13:57:50 +0000 (14:57 +0100)] 
build-sys: add --with-cryptsetup to config-gen.d/all.conf

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolibmount: add verity to mount -V output
Karel Zak [Thu, 5 Dec 2019 13:57:29 +0000 (14:57 +0100)] 
libmount: add verity to mount -V output

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agomount: (dm-verity) update man page
Karel Zak [Thu, 5 Dec 2019 12:40:42 +0000 (13:40 +0100)] 
mount: (dm-verity) update man page

* move to separate section (like we use for LOOP DEVICE support)
* explain what dm-verity + mount(8) does

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoMerge branch 'dmverity' of https://github.com/bluca/util-linux
Karel Zak [Thu, 5 Dec 2019 12:23:46 +0000 (13:23 +0100)] 
Merge branch 'dmverity' of https://github.com/bluca/util-linux

* 'dmverity' of https://github.com/bluca/util-linux:
  libmount: add support for verity devices via libcryptsetup

4 years agolibmount: add support for verity devices via libcryptsetup
Luca Boccassi [Fri, 8 Nov 2019 17:02:09 +0000 (17:02 +0000)] 
libmount: add support for verity devices via libcryptsetup

The following new options are added:

verity.hashdevice
verity.roothash
verity.hashoffset

The source path will be used as a dm-verity object, and will be
opened using libcryptsetup APIs.

A new --with-cryptsetup build-time option is added, which adds a
dependency on libcryptsetup. To ease bootstrapping, given libcryptsetup
build-depends on util-linux for libuuid, if --with-cryptsetup=yes but
libcryptsetup is not installed only a warning will be printed at
configure time rather than an error. This way stage0/first stage/ring0
builds can use the same configure options but avoid installing
cryptsetup to get a working base set, and then rebuild util-linux in
the next step of the boostrapping process.

If verity options are selected but cannot be fullfilled due to lack of
dependencies, mounting a volume will fail even if using a loop device
would work as a fallback, to avoid silently skipping integrity checks.

4 years agolsblk: add PARTTYPENAME column
Karel Zak [Wed, 4 Dec 2019 11:38:57 +0000 (12:38 +0100)] 
lsblk: add PARTTYPENAME column

Print also partition type in human-readable way.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1777261
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolibfdisk: move GPT partition types to include/
Karel Zak [Wed, 4 Dec 2019 11:37:22 +0000 (12:37 +0100)] 
libfdisk: move GPT partition types to include/

We need the array use in another tools too. Let's follow the way we
use for MBR and keep it in include/.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoMerge branch 'mount-eperm'
Karel Zak [Tue, 3 Dec 2019 14:23:53 +0000 (15:23 +0100)] 
Merge branch 'mount-eperm'

* mount-eperm:
  mount: no exit on EPERM, continue without suid

4 years agounshare: cleanup capabilities code [lgtm scan]
Karel Zak [Tue, 3 Dec 2019 14:15:22 +0000 (15:15 +0100)] 
unshare: cleanup capabilities code [lgtm scan]

- remove C++isms
- remove unnecessary { }
- remove if-if
- remove unnecessary condition

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolibfdisk: improve Sun partitions calculation [lgtm scan]
Karel Zak [Tue, 3 Dec 2019 14:07:58 +0000 (15:07 +0100)] 
libfdisk: improve Sun partitions calculation [lgtm scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolibblkid: improve MD I/O size calculation [lgtm scan]
Karel Zak [Tue, 3 Dec 2019 13:51:31 +0000 (14:51 +0100)] 
libblkid: improve MD I/O size calculation [lgtm scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolibblkid: improve vfat entries calculation [lgtm scan]
Karel Zak [Tue, 3 Dec 2019 13:49:16 +0000 (14:49 +0100)] 
libblkid: improve vfat entries calculation [lgtm scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolscpu: make code more readable [lgtm scan]
Karel Zak [Tue, 3 Dec 2019 13:35:43 +0000 (14:35 +0100)] 
lscpu: make code more readable [lgtm scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolibmount: fix typo in mnt_context_prepare_helper() [lgtm scan]
Karel Zak [Tue, 3 Dec 2019 13:31:55 +0000 (14:31 +0100)] 
libmount: fix typo in mnt_context_prepare_helper() [lgtm scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agotests: mark scriptlive as KNOWN_FAILED
Karel Zak [Tue, 26 Nov 2019 08:56:24 +0000 (09:56 +0100)] 
tests: mark scriptlive as KNOWN_FAILED

Not sure why, but on travis-ci the shell output is little bit
different, probably depends on shell version, etc.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agokill: use pidfd system calls to implement --timeout option
Sami Kerola [Mon, 25 Nov 2019 20:31:20 +0000 (20:31 +0000)] 
kill: use pidfd system calls to implement --timeout option

At times there is need in scripts to send multiple signals to a process.
Often these cases require some amount of waiting before follow-up signal
should be sent.

One common case is process termination, where first script tries to kill
process gracefully but if that does not work SIGKILL is sent.  Functionality
like that is commonly done by periodically checking if signalled pid exist
or not, and if it does another signal is sent possibly to an unrelated
process that reused pid number.  That means polling a pid is prone to a data
race.  Also if the first signal immediately kills the process one polling
interval is lost in sleep.

Another example when multiple signal need to be sent is various daemon
process control situations, such as Upgrading Executable on the Fly (see
reference).  This happens to be the case that inspired change author to make
sequential signaling a little bit easier.

Reference: http://nginx.org/en/docs/control.html#upgrade
Pull-request: https://github.com/karelzak/util-linux/pull/902
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
4 years agobuild-sys: add missing NR underscore to UL_CHECK_SYSCALL()
Sami Kerola [Mon, 25 Nov 2019 20:33:05 +0000 (20:33 +0000)] 
build-sys: add missing NR underscore to UL_CHECK_SYSCALL()

The unistd.h defines system call numbers with two leading underscores.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
4 years agotests: another prompt fix
Karel Zak [Mon, 25 Nov 2019 13:09:38 +0000 (14:09 +0100)] 
tests: another prompt fix

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agobuild-sys: fix out-of-tree build for hwclock
Karel Zak [Mon, 25 Nov 2019 12:55:18 +0000 (13:55 +0100)] 
build-sys: fix out-of-tree build for hwclock

The file sys-utils/hwclock-parse-date.c is generated from .y and
stored in the build directory and "#include hwclock.h" is interpreted
relatively to the build tree rather than to source tree. We need
explicit -I compiler option to point to $srcdir for hwclock.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agobash-completion: update for new script tools
Karel Zak [Mon, 25 Nov 2019 11:49:48 +0000 (12:49 +0100)] 
bash-completion: update for new script tools

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoscriptreplay: fix typo
Karel Zak [Mon, 25 Nov 2019 11:49:41 +0000 (12:49 +0100)] 
scriptreplay: fix typo

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoscript: add --echo
Karel Zak [Mon, 25 Nov 2019 11:39:52 +0000 (12:39 +0100)] 
script: add --echo

It some cases it makes sense to disable ECHO flag also when script
used in pipe. This new option allows to keep full control in user's
hands.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agotests: remove option --posix
Karel Zak [Mon, 25 Nov 2019 09:45:38 +0000 (10:45 +0100)] 
tests: remove option --posix

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agotests: make scriptlive output more portable
Karel Zak [Fri, 22 Nov 2019 13:21:20 +0000 (14:21 +0100)] 
tests: make scriptlive output more portable

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoscriptlive: keep ECHO flag, improve welcome message
Karel Zak [Fri, 22 Nov 2019 13:04:21 +0000 (14:04 +0100)] 
scriptlive: keep ECHO flag, improve welcome message

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agotests: upadet scriptlive output
Karel Zak [Fri, 22 Nov 2019 13:04:11 +0000 (14:04 +0100)] 
tests: upadet scriptlive output

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agotests: add script and scriptlive replay
Karel Zak [Fri, 22 Nov 2019 12:48:54 +0000 (13:48 +0100)] 
tests: add script and scriptlive replay

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoscriptlive: add --command, cleanup shell exec
Karel Zak [Fri, 22 Nov 2019 12:48:29 +0000 (13:48 +0100)] 
scriptlive: add --command, cleanup shell exec

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoscriptlive: terminate session at end of the log
Karel Zak [Fri, 22 Nov 2019 11:34:45 +0000 (12:34 +0100)] 
scriptlive: terminate session at end of the log

We need a proper way how to inform child (shell) that the game is
over. It seems the best is to send EOF to child rather than
immediately break PTY mainloop where we have poll(), because shell can
still produce data etc.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agolib/pty: make sure we not use closed FD
Karel Zak [Fri, 22 Nov 2019 10:56:04 +0000 (11:56 +0100)] 
lib/pty: make sure we not use closed FD

Signed-off-by: Karel Zak <kzak@redhat.com>