]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
16 months agoMerge branch 'lsfd-const' of https://github.com/t-8ch/util-linux
Karel Zak [Mon, 23 Jan 2023 13:11:12 +0000 (14:11 +0100)] 
Merge branch 'lsfd-const' of https://github.com/t-8ch/util-linux

* 'lsfd-const' of https://github.com/t-8ch/util-linux:
  lsfd: make a few structs const

16 months agoMerge branch 'blkpr' of https://github.com/t-8ch/util-linux
Karel Zak [Mon, 23 Jan 2023 13:10:42 +0000 (14:10 +0100)] 
Merge branch 'blkpr' of https://github.com/t-8ch/util-linux

* 'blkpr' of https://github.com/t-8ch/util-linux:
  blkpr: mark data const
  meson: add blkpr

16 months agoMerge branch 'bcachefs-fuzz' of https://github.com/t-8ch/util-linux
Karel Zak [Mon, 23 Jan 2023 13:09:27 +0000 (14:09 +0100)] 
Merge branch 'bcachefs-fuzz' of https://github.com/t-8ch/util-linux

* 'bcachefs-fuzz' of https://github.com/t-8ch/util-linux:
  libblkid: bcachefs: limit maximum size of read superblock
  libblkid: iso9660: don't warn on isonum mismatch
  libblkid: bcachefs: fix member_field_end
  libblkid: bcachefs: validate size of member field
  libblkid: bcachefs: fix field type
  libblkid: bcachefs: add reproducer for oss-fuzz 55282
  libblkid: bcachefs: fix endless loop

16 months agoMerge branch 'sizeof-member' of https://github.com/t-8ch/util-linux
Karel Zak [Mon, 23 Jan 2023 13:08:33 +0000 (14:08 +0100)] 
Merge branch 'sizeof-member' of https://github.com/t-8ch/util-linux

* 'sizeof-member' of https://github.com/t-8ch/util-linux:
  uuidd: use sizeof_member
  last: use sizeof_member
  libblkid: iso9660: use sizeof_member

16 months agoMerge branch 'more_mempcpy' of https://github.com/crrodriguez/util-linux
Karel Zak [Mon, 23 Jan 2023 13:07:13 +0000 (14:07 +0100)] 
Merge branch 'more_mempcpy' of https://github.com/crrodriguez/util-linux

* 'more_mempcpy' of https://github.com/crrodriguez/util-linux:
  remove no longer needed braces
  replace open-coded instances of mempcpy

16 months agoMerge branch 'cramfs32' of https://github.com/ferivoz/util-linux
Karel Zak [Mon, 23 Jan 2023 13:05:59 +0000 (14:05 +0100)] 
Merge branch 'cramfs32' of https://github.com/ferivoz/util-linux

* 'cramfs32' of https://github.com/ferivoz/util-linux:
  fsck.cramfs: print correct error on 32-bit systems

16 months agolsfd: make a few structs const
Thomas Weißschuh [Sun, 22 Jan 2023 17:55:48 +0000 (17:55 +0000)] 
lsfd: make a few structs const

16 months agoblkpr: mark data const
Thomas Weißschuh [Sun, 22 Jan 2023 14:27:24 +0000 (14:27 +0000)] 
blkpr: mark data const

16 months agomeson: add blkpr
Thomas Weißschuh [Sun, 22 Jan 2023 14:27:12 +0000 (14:27 +0000)] 
meson: add blkpr

16 months agolibblkid: bcachefs: limit maximum size of read superblock
Thomas Weißschuh [Sun, 22 Jan 2023 17:40:15 +0000 (17:40 +0000)] 
libblkid: bcachefs: limit maximum size of read superblock

16 months agolibblkid: iso9660: don't warn on isonum mismatch
Thomas Weißschuh [Sat, 21 Jan 2023 05:43:40 +0000 (05:43 +0000)] 
libblkid: iso9660: don't warn on isonum mismatch

we are not doing anything about it anyways

16 months agolibblkid: bcachefs: fix member_field_end
Thomas Weißschuh [Sun, 22 Jan 2023 03:36:06 +0000 (03:36 +0000)] 
libblkid: bcachefs: fix member_field_end

The end of this member is the start of the next one, not the start of
the current one.

16 months agolibblkid: bcachefs: validate size of member field
Thomas Weißschuh [Sun, 22 Jan 2023 01:52:29 +0000 (01:52 +0000)] 
libblkid: bcachefs: validate size of member field

16 months agolibblkid: bcachefs: fix field type
Thomas Weißschuh [Sat, 21 Jan 2023 05:32:22 +0000 (05:32 +0000)] 
libblkid: bcachefs: fix field type

16 months agolibblkid: bcachefs: add reproducer for oss-fuzz 55282
Thomas Weißschuh [Sat, 21 Jan 2023 05:25:34 +0000 (05:25 +0000)] 
libblkid: bcachefs: add reproducer for oss-fuzz 55282

16 months agolibblkid: bcachefs: fix endless loop
Thomas Weißschuh [Sat, 21 Jan 2023 05:01:55 +0000 (05:01 +0000)] 
libblkid: bcachefs: fix endless loop

When a field has size 0 it will loop forever.

See #2031

16 months agouuidd: use sizeof_member
Thomas Weißschuh [Sat, 21 Jan 2023 00:52:49 +0000 (00:52 +0000)] 
uuidd: use sizeof_member

16 months agolast: use sizeof_member
Thomas Weißschuh [Sat, 21 Jan 2023 00:52:39 +0000 (00:52 +0000)] 
last: use sizeof_member

16 months agolibblkid: iso9660: use sizeof_member
Thomas Weißschuh [Sat, 21 Jan 2023 00:52:23 +0000 (00:52 +0000)] 
libblkid: iso9660: use sizeof_member

16 months agoremove no longer needed braces
Cristian Rodríguez [Sat, 21 Jan 2023 18:19:28 +0000 (18:19 +0000)] 
remove no longer needed braces

16 months agoreplace open-coded instances of mempcpy
Cristian Rodríguez [Thu, 19 Jan 2023 18:25:08 +0000 (18:25 +0000)] 
replace open-coded instances of mempcpy

16 months agofsck.cramfs: print correct error on 32-bit systems
Samanta Navarro [Fri, 20 Jan 2023 11:57:15 +0000 (11:57 +0000)] 
fsck.cramfs: print correct error on 32-bit systems

On 32-bit systems the file length check does not handle files correctly
which are larger than 4 GB. Use an unsigned long long which is already
in place for blkdev_get_size.

Proof of Concept:

- Prepare a file containing a CramFS
```
mkdir owo
mkfs.cramfs owo owo.iso
dd if=/dev/zero of=owo.iso bs=1 seek=4294967296 count=1 conv=notrunc
fsck.cramfs owo.iso
```

- Check the file
```
fsck.cramfs owo.iso
```

You will see: `fsck.cramfs: file length too short`
Better message is: `fsck.cramfs: file extends past end of filesystem`

Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
16 months agolsfd: make a few structs const
Thomas Weißschuh [Sun, 22 Jan 2023 17:55:48 +0000 (17:55 +0000)] 
lsfd: make a few structs const

16 months agolibblkid: bcachefs: limit maximum size of read superblock
Thomas Weißschuh [Sun, 22 Jan 2023 17:40:15 +0000 (17:40 +0000)] 
libblkid: bcachefs: limit maximum size of read superblock

16 months agoblkpr: mark data const
Thomas Weißschuh [Sun, 22 Jan 2023 14:27:24 +0000 (14:27 +0000)] 
blkpr: mark data const

16 months agomeson: add blkpr
Thomas Weißschuh [Sun, 22 Jan 2023 14:27:12 +0000 (14:27 +0000)] 
meson: add blkpr

16 months agolibblkid: iso9660: don't warn on isonum mismatch
Thomas Weißschuh [Sat, 21 Jan 2023 05:43:40 +0000 (05:43 +0000)] 
libblkid: iso9660: don't warn on isonum mismatch

we are not doing anything about it anyways

16 months agolibblkid: bcachefs: fix member_field_end
Thomas Weißschuh [Sun, 22 Jan 2023 03:36:06 +0000 (03:36 +0000)] 
libblkid: bcachefs: fix member_field_end

The end of this member is the start of the next one, not the start of
the current one.

16 months agolibblkid: bcachefs: validate size of member field
Thomas Weißschuh [Sun, 22 Jan 2023 01:52:29 +0000 (01:52 +0000)] 
libblkid: bcachefs: validate size of member field

16 months agoremove no longer needed braces
Cristian Rodríguez [Sat, 21 Jan 2023 18:19:28 +0000 (18:19 +0000)] 
remove no longer needed braces

16 months agolibblkid: bcachefs: fix field type
Thomas Weißschuh [Sat, 21 Jan 2023 05:32:22 +0000 (05:32 +0000)] 
libblkid: bcachefs: fix field type

16 months agolibblkid: bcachefs: add reproducer for oss-fuzz 55282
Thomas Weißschuh [Sat, 21 Jan 2023 05:25:34 +0000 (05:25 +0000)] 
libblkid: bcachefs: add reproducer for oss-fuzz 55282

16 months agolibblkid: bcachefs: fix endless loop
Thomas Weißschuh [Sat, 21 Jan 2023 05:01:55 +0000 (05:01 +0000)] 
libblkid: bcachefs: fix endless loop

When a field has size 0 it will loop forever.

See #2031

16 months agouuidd: use sizeof_member
Thomas Weißschuh [Sat, 21 Jan 2023 00:52:49 +0000 (00:52 +0000)] 
uuidd: use sizeof_member

16 months agolast: use sizeof_member
Thomas Weißschuh [Sat, 21 Jan 2023 00:52:39 +0000 (00:52 +0000)] 
last: use sizeof_member

16 months agolibblkid: iso9660: use sizeof_member
Thomas Weißschuh [Sat, 21 Jan 2023 00:52:23 +0000 (00:52 +0000)] 
libblkid: iso9660: use sizeof_member

16 months agolsfd: remove strcpy(), keep things based on sizeof()
Karel Zak [Fri, 20 Jan 2023 14:20:55 +0000 (15:20 +0100)] 
lsfd: remove strcpy(), keep things based on sizeof()

* use safe xstrncpy() rather than strcpy()
* use sizeof() for static buffers rather than macro with real size
  (this solution is more robust for future code changes)
* use xcalloc() to zeroize allocated memory

Signed-off-by: Karel Zak <kzak@redhat.com>
16 months agoinclude/c: add sizeof_member()
Karel Zak [Fri, 20 Jan 2023 14:19:52 +0000 (15:19 +0100)] 
include/c: add sizeof_member()

This macro returns size of struct member.

Signed-off-by: Karel Zak <kzak@redhat.com>
16 months agoMerge branch 'master' of https://github.com/karelzak/util-linux into more_mempcpy
Cristian Rodríguez [Fri, 20 Jan 2023 12:26:22 +0000 (12:26 +0000)] 
Merge branch 'master' of https://github.com/karelzak/util-linux into more_mempcpy

16 months agofsck.cramfs: print correct error on 32-bit systems
Samanta Navarro [Fri, 20 Jan 2023 11:57:15 +0000 (11:57 +0000)] 
fsck.cramfs: print correct error on 32-bit systems

On 32-bit systems the file length check does not handle files correctly
which are larger than 4 GB. Use an unsigned long long which is already
in place for blkdev_get_size.

Proof of Concept:

- Prepare a file containing a CramFS
```
mkdir owo
mkfs.cramfs owo owo.iso
dd if=/dev/zero of=owo.iso bs=1 seek=4294967296 count=1 conv=notrunc
fsck.cramfs owo.iso
```

- Check the file
```
fsck.cramfs owo.iso
```

You will see: `fsck.cramfs: file length too short`
Better message is: `fsck.cramfs: file extends past end of filesystem`

Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
16 months agolibblkid: (bcachefs) verify checksum before set probing result
Karel Zak [Fri, 20 Jan 2023 11:45:10 +0000 (12:45 +0100)] 
libblkid: (bcachefs) verify checksum before set probing result

* merge probe_bcachefs_full_sb() in to probe_bcachefs()

* define variables at the beginning of the code block

* cosmetic code cleanup

Signed-off-by: Karel Zak <kzak@redhat.com>
16 months agolibblkid: bcachefs: add xxhash checksum support
Thomas Weißschuh [Fri, 18 Nov 2022 17:42:01 +0000 (18:42 +0100)] 
libblkid: bcachefs: add xxhash checksum support

16 months agolibblkid: bcachefs: add crc64 checksum support
Thomas Weißschuh [Tue, 13 Sep 2022 07:50:51 +0000 (09:50 +0200)] 
libblkid: bcachefs: add crc64 checksum support

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
16 months agolibblkid: bcachefs: add crc32 checksum support
Thomas Weißschuh [Mon, 19 Apr 2021 22:02:07 +0000 (00:02 +0200)] 
libblkid: bcachefs: add crc32 checksum support

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
16 months agolibblkid: bcachefs: validate device fields
Thomas Weißschuh [Sun, 27 Nov 2022 19:47:04 +0000 (20:47 +0100)] 
libblkid: bcachefs: validate device fields

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
16 months agolibblkid: bcachefs: probe UUID_SUB
Thomas Weißschuh [Mon, 12 Apr 2021 12:05:00 +0000 (14:05 +0200)] 
libblkid: bcachefs: probe UUID_SUB

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
16 months agolibblkid: add bcachefs support
Thomas Weißschuh [Mon, 12 Apr 2021 12:01:14 +0000 (14:01 +0200)] 
libblkid: add bcachefs support

https://bcachefs.org/

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
16 months agoreplace open-coded instances of mempcpy
Cristian Rodríguez [Thu, 19 Jan 2023 18:25:08 +0000 (18:25 +0000)] 
replace open-coded instances of mempcpy

16 months agoc.h: fix compiler warning [-Werror=shift-count-overflow]
Karel Zak [Tue, 17 Jan 2023 15:36:13 +0000 (16:36 +0100)] 
c.h: fix compiler warning [-Werror=shift-count-overflow]

It's probably typo in the original path (too many brackets:-)). Let's
be explicit about the types used in the calculation. '1 << n' means
the left shift is on 'int', but we need '(t)1 << n'.

Addresses: e53463ea40c58a6f84a597966ac69be9be72cd7d
Signed-off-by: Karel Zak <kzak@redhat.com>
16 months agoMerge branch 'blkdev' of https://github.com/ferivoz/util-linux
Karel Zak [Tue, 17 Jan 2023 15:15:11 +0000 (16:15 +0100)] 
Merge branch 'blkdev' of https://github.com/ferivoz/util-linux

* 'blkdev' of https://github.com/ferivoz/util-linux:
  lib/blkdev: use off_t for max values
  lib/blkdev: set errno in more cases
  lib/blkdev: handle interrupted read call

16 months agoswapon: add --fstab command line option
Karel Zak [Mon, 16 Jan 2023 12:47:36 +0000 (13:47 +0100)] 
swapon: add --fstab command line option

Let's add --fstab mount option for compatibility with mount(8).

Addresses: https://github.com/util-linux/util-linux/issues/2017
Signed-off-by: Karel Zak <kzak@redhat.com>
16 months agolib/blkdev: use off_t for max values
Samanta Navarro [Fri, 13 Jan 2023 11:52:36 +0000 (11:52 +0000)] 
lib/blkdev: use off_t for max values

The off_t datatype is signed. Use it for high and low boundaries as
well to support also very large block devices close to its limits.

Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
16 months agolib/blkdev: set errno in more cases
Samanta Navarro [Fri, 13 Jan 2023 11:51:52 +0000 (11:51 +0000)] 
lib/blkdev: set errno in more cases

Applications evaluate errno in case of a -1 return value. Examples
within util-linux are fsck.cramfs and mkfs.minix. Set errno more often
to offer reasonable error codes to the application and user.

Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
16 months agolib/blkdev: handle interrupted read call
Samanta Navarro [Fri, 13 Jan 2023 11:50:40 +0000 (11:50 +0000)] 
lib/blkdev: handle interrupted read call

The read call may fail if it is interrupted by a signal. Do not assume
that we have reached the end of the underlying block device because of
this. Use read_all which retries in these cases.

Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
16 months agoc.h: really avoid undefined behavior in SINT_MAX
Thomas Weißschuh [Sat, 14 Jan 2023 22:16:28 +0000 (22:16 +0000)] 
c.h: really avoid undefined behavior in SINT_MAX

The previous fix in #2013 still invoked undefined behavior by shifting
into the sign-bit.

Now we have a correct, albeit unwieldy solution that avoids undefined
behavior.
Instead of bit fiddling it uses plain addition and substraction.

We are looking for (in LaTeX notation):
  2^(n - 1) - 1
= 2 * 2^(n - 2) - 1
= 2^(n - 2) + 2^(n - 2) - 1
= 2^(n - 2) - 1 + 2^(n - 2)

16 months agoMerge branch 'mkswap' of https://github.com/ferivoz/util-linux
Karel Zak [Fri, 13 Jan 2023 12:35:02 +0000 (13:35 +0100)] 
Merge branch 'mkswap' of https://github.com/ferivoz/util-linux

* 'mkswap' of https://github.com/ferivoz/util-linux:
  mkswap: do not use uninitialized stack value

16 months agomkswap: do not use uninitialized stack value
Samanta Navarro [Fri, 13 Jan 2023 11:53:41 +0000 (11:53 +0000)] 
mkswap: do not use uninitialized stack value

If blkdev_get_size fails, then size is not set. Exit with an error code
and indicate what went wrong instead of continuing with random stack
content.

Proof of Concept:

```
$ mkswap /dev/null
mkswap: warning: truncating swap area to 17179869180 KiB
mkswap: /dev/null: insecure permissions 0666, fix with: chmod 0600 /dev/null
mkswap: unable to assign device to libblkid probe
```

The first output line depends on stack content and sometimes does not
show up at all. Abort operation if argument is neither regular file nor
block device.

Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
16 months agologger: (man) fix examples
Karel Zak [Fri, 13 Jan 2023 11:18:27 +0000 (12:18 +0100)] 
logger: (man) fix examples

Signed-off-by: Karel Zak <kzak@redhat.com>
16 months agoinclude: add missing license lines
Karel Zak [Thu, 12 Jan 2023 14:33:09 +0000 (15:33 +0100)] 
include: add missing license lines

The header files are usually based on code from lib/. This commit
copies relevant license headers from lib/ to include/ to keep
things consistent. The very generic things (e.g. MBR definitions)
are always public domain.

Fixes: https://github.com/util-linux/util-linux/issues/2010
Signed-off-by: Karel Zak <kzak@redhat.com>
16 months agoMerge branch 'sint-max' of https://github.com/t-8ch/util-linux
Karel Zak [Thu, 12 Jan 2023 13:35:50 +0000 (14:35 +0100)] 
Merge branch 'sint-max' of https://github.com/t-8ch/util-linux

* 'sint-max' of https://github.com/t-8ch/util-linux:
  c.h: avoid undefined behavior in SINT_MAX macro

17 months agoc.h: avoid undefined behavior in SINT_MAX macro
Thomas Weißschuh [Thu, 12 Jan 2023 00:49:35 +0000 (00:49 +0000)] 
c.h: avoid undefined behavior in SINT_MAX macro

The previous implementation relied on signed-integer overflow.
This is undefined behavior.

Instead use an implementation that only requires twos-complement
representation. This is what everybody uses anyways and it will be
required by C23.

17 months agologin: never send signals to init
Samanta Navarro [Wed, 11 Jan 2023 11:57:21 +0000 (11:57 +0000)] 
login: never send signals to init

If the signal handler is triggered after a failed fork attempt, then
child_pid will be -1. This in turn leads to a positive test and a
subsequent call of kill(1, signal). If signal was SIGTERM, then there
will be also another kill(1, SIGHUP) call.

Test explicitly for a positive child_pid value to prevent these cases.

Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
17 months agounshare: support --map-users=inner:outer:count as well as outer,inner,count
Chris Webb [Tue, 10 Jan 2023 13:58:58 +0000 (13:58 +0000)] 
unshare: support --map-users=inner:outer:count as well as outer,inner,count

The argument ordering in /proc/self/[gu]id_map and mount -o X-mount.idmap
is consistently inner:outer:count but unshare --map-users and --map-groups
were originally defined to expect outer,inner,count instead.

To reduce confusion caused by this mismatch, support a colon-separated
inner:outer:count ordering as well as the original comma-separated
outer,inner,count argument format. Although we accept both formats, only
document the new one in the usage text and deprecate the old format in
the man page.

Fixes: https://github.com/util-linux/util-linux/issues/1988
Signed-off-by: Chris Webb <chris@arachsys.com>
17 months agoMerge branch 'typo' of https://github.com/ferivoz/util-linux
Karel Zak [Tue, 10 Jan 2023 14:10:15 +0000 (15:10 +0100)] 
Merge branch 'typo' of https://github.com/ferivoz/util-linux

* 'typo' of https://github.com/ferivoz/util-linux:
  Fix typo

17 months agoinclude: add MOVE_MOUNT_SET_GROUP fallback
Karel Zak [Tue, 10 Jan 2023 13:48:06 +0000 (14:48 +0100)] 
include: add MOVE_MOUNT_SET_GROUP fallback

Addresses: https://github.com/torvalds/linux/commit/9ffb14ef61bab83fa818736bf3e7e6b6e182e8e2
Signed-off-by: Karel Zak <kzak@redhat.com>
17 months agoFix typo
Samanta Navarro [Tue, 10 Jan 2023 12:00:56 +0000 (12:00 +0000)] 
Fix typo

Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
17 months agolibmount: use MNT_ERR_APPLYFLAGS for failed mount_setattr()
Karel Zak [Tue, 10 Jan 2023 11:40:47 +0000 (12:40 +0100)] 
libmount: use MNT_ERR_APPLYFLAGS for failed mount_setattr()

The classic mount(2) based version uses MNT_ERR_APPLYFLAGS when not
able to set flags and errno is EINVAL. This is expected by
mnt_context_get_mount_excode() where libmount generates error messages
for mount(8).

Expected is:

 # mount --make-private /mnt/test
 mount: /mnt/test: not mount point or bad option.

rather than generic error:

 mount: /mnt/test: wrong fs type, bad option, bad superblock on none ...

Signed-off-by: Karel Zak <kzak@redhat.com>
17 months agoMerge branch 'waitpid' of https://github.com/t-8ch/util-linux
Karel Zak [Tue, 10 Jan 2023 10:30:55 +0000 (11:30 +0100)] 
Merge branch 'waitpid' of https://github.com/t-8ch/util-linux

* 'waitpid' of https://github.com/t-8ch/util-linux:
  waitpid: adapt bash-completion for current functionality
  po-man: add waitpid.1 manpage
  waitpid: add support for already exited PIDs

17 months agolibmount: fix typo in debug message
Karel Zak [Tue, 10 Jan 2023 10:27:40 +0000 (11:27 +0100)] 
libmount: fix typo in debug message

Signed-off-by: Karel Zak <kzak@redhat.com>
17 months agolibmount: implement X-mount.auto-fstypes
Karel Zak [Mon, 9 Jan 2023 13:22:06 +0000 (14:22 +0100)] 
libmount: implement X-mount.auto-fstypes

Fixes: https://github.com/util-linux/util-linux/issues/1969
Signed-off-by: Karel Zak <kzak@redhat.com>
17 months agowaitpid: adapt bash-completion for current functionality
Thomas Weißschuh [Sat, 7 Jan 2023 04:30:18 +0000 (04:30 +0000)] 
waitpid: adapt bash-completion for current functionality

17 months agopo-man: add waitpid.1 manpage
Thomas Weißschuh [Sat, 7 Jan 2023 02:18:22 +0000 (02:18 +0000)] 
po-man: add waitpid.1 manpage

17 months agowaitpid: add support for already exited PIDs
Thomas Weißschuh [Sat, 7 Jan 2023 02:16:06 +0000 (02:16 +0000)] 
waitpid: add support for already exited PIDs

17 months agolibmount: (optlist) keep parsed options without quotes
Karel Zak [Mon, 9 Jan 2023 12:58:45 +0000 (13:58 +0100)] 
libmount: (optlist) keep parsed options without quotes

Some mount options uses quotes due to commas in the value, for
example (SELinux) mount -o 'context="foo,bar"'.

Let's keep this parsed values without quotes in options list. It will
make things more simple.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 months agoMerge branch 'po-man/fixes' of https://github.com/t-8ch/util-linux
Karel Zak [Mon, 9 Jan 2023 11:47:31 +0000 (12:47 +0100)] 
Merge branch 'po-man/fixes' of https://github.com/t-8ch/util-linux

* 'po-man/fixes' of https://github.com/t-8ch/util-linux:
  sr.po: fix mkfs.cramfs translation
  build: propagate failures from asciidoctor
  po-man: remove unicode dash from manpage NAME section
  sr.po: add missing dash to manpage header
  po-man: always convert common manpage fragments
  po-man: enable out of tree builds
  autotools: add asciidoctor-includetracker to distributed files

17 months agogit: update .gitignore
Karel Zak [Mon, 9 Jan 2023 11:45:24 +0000 (12:45 +0100)] 
git: update .gitignore

Signed-off-by: Karel Zak <kzak@redhat.com>
17 months agoMerge branch 'mount.idmap.fix' of https://github.com/brauner/util-linux
Karel Zak [Mon, 9 Jan 2023 11:38:13 +0000 (12:38 +0100)] 
Merge branch 'mount.idmap.fix' of https://github.com/brauner/util-linux

* 'mount.idmap.fix' of https://github.com/brauner/util-linux:
  libmount: ensure child hangs around until we persisted namespace

17 months agoMerge branch 'schedutils' of https://github.com/chaiken/util-linux
Karel Zak [Mon, 9 Jan 2023 11:35:03 +0000 (12:35 +0100)] 
Merge branch 'schedutils' of https://github.com/chaiken/util-linux

* 'schedutils' of https://github.com/chaiken/util-linux:
  schedutils: better illustrate the usage of cpu-lists with taskset
  schedutils: clarify meaning of taskset return code
  schedutils: clarify confusing mask example in taskset man page

17 months agoci: packit: enable -Werror
Thomas Weißschuh [Sat, 7 Jan 2023 13:58:17 +0000 (13:58 +0000)] 
ci: packit: enable -Werror

17 months agowdctl: mark flags field as unsigned long
Thomas Weißschuh [Sun, 8 Jan 2023 03:29:51 +0000 (03:29 +0000)] 
wdctl: mark flags field as unsigned long

This is required by string_to_bitmask().
The previous cast failed on s390x with the following warning:

In function 'string_to_bitmask',
    inlined from 'string_to_bitmask' at lib/strutils.c:802:5,
    inlined from 'main' at sys-utils/wdctl.c:770:8:
lib/strutils.c:829:23: error: write of 64-bit data outside the bound of destination object, data truncated into 32-bit [-Werror=extra]
  829 |                 *mask |= flag;
      |

17 months agolibblkid: topology/sysfs: fix uint64_t handling on 32bit systems
Thomas Weißschuh [Sun, 8 Jan 2023 03:22:35 +0000 (03:22 +0000)] 
libblkid: topology/sysfs: fix uint64_t handling on 32bit systems

17 months agolibblkid: topology/ioctl: fix uint64_t handling on 32bit systems
Thomas Weißschuh [Sun, 8 Jan 2023 03:09:37 +0000 (03:09 +0000)] 
libblkid: topology/ioctl: fix uint64_t handling on 32bit systems

17 months agolibblkid: topolicy/ioctl: use union for multiple data types
Thomas Weißschuh [Sun, 8 Jan 2023 03:08:09 +0000 (03:08 +0000)] 
libblkid: topolicy/ioctl: use union for multiple data types

17 months agoipc_msg_get_limits: always initialize memory
Thomas Weißschuh [Sat, 7 Jan 2023 14:36:11 +0000 (14:36 +0000)] 
ipc_msg_get_limits: always initialize memory

17 months agomkswap: make context_string const
Thomas Weißschuh [Sat, 7 Jan 2023 14:23:56 +0000 (14:23 +0000)] 
mkswap: make context_string const

Sometimes context_str() return `const char *`.

17 months agolibmount: ensure child hangs around until we persisted namespace
Christian Brauner [Sun, 8 Jan 2023 12:05:20 +0000 (13:05 +0100)] 
libmount: ensure child hangs around until we persisted namespace

When we create a new namespace in a child process to persist it we need
to ensure that the child hangs around. During exit the child will drop
all references to its namespaces and so by the time we call open we
might already fail to open the namespace. Fix this.

Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
17 months agoschedutils: better illustrate the usage of cpu-lists with taskset
Alison Chaiken [Sun, 25 Dec 2022 17:37:02 +0000 (09:37 -0800)] 
schedutils: better illustrate the usage of cpu-lists with taskset

Provide a few examples of how to use the cpu-list variant of the taskset
command.

17 months agoschedutils: clarify meaning of taskset return code
Alison Chaiken [Sun, 25 Dec 2022 02:25:26 +0000 (18:25 -0800)] 
schedutils: clarify meaning of taskset return code

Make clear that an EXIT_SUCCESS value returned by taskset does not mean that a
thread has actually migrated to a core matching the affinity request.

17 months agoschedutils: clarify confusing mask example in taskset man page
Alison Chaiken [Sun, 25 Dec 2022 02:12:04 +0000 (18:12 -0800)] 
schedutils: clarify confusing mask example in taskset man page

Omit "0x" from a mask example which is clearly hexadecimal rather than omitting
it from "32", which could be a decimal representation.

17 months agosr.po: fix mkfs.cramfs translation
Thomas Weißschuh [Sat, 7 Jan 2023 03:58:43 +0000 (03:58 +0000)] 
sr.po: fix mkfs.cramfs translation

17 months agobuild: propagate failures from asciidoctor
Thomas Weißschuh [Fri, 6 Jan 2023 23:33:03 +0000 (23:33 +0000)] 
build: propagate failures from asciidoctor

17 months agopo-man: remove unicode dash from manpage NAME section
Thomas Weißschuh [Sat, 7 Jan 2023 02:10:27 +0000 (02:10 +0000)] 
po-man: remove unicode dash from manpage NAME section

Translators seem to like using unicode dashes.
When used in the NAME section of a manpage, asciidoctor will break.
Instead of trying to force all translators to keep this in mind, add an
extension to asciidoctor that takes care of this.

17 months agoautotools: add asciidoctor-includetracker to distributed files
Thomas Weißschuh [Sat, 7 Jan 2023 02:54:01 +0000 (02:54 +0000)] 
autotools: add asciidoctor-includetracker to distributed files

17 months agosr.po: add missing dash to manpage header
Thomas Weißschuh [Sat, 7 Jan 2023 02:43:57 +0000 (02:43 +0000)] 
sr.po: add missing dash to manpage header

asciidoctor fails without it.

17 months agopo-man: always convert common manpage fragments
Thomas Weißschuh [Fri, 6 Jan 2023 23:48:11 +0000 (23:48 +0000)] 
po-man: always convert common manpage fragments

Otherwise the manpage including it can never be built.

17 months agopo-man: enable out of tree builds
Thomas Weißschuh [Fri, 6 Jan 2023 14:54:14 +0000 (14:54 +0000)] 
po-man: enable out of tree builds

17 months agoautotools: add asciidoctor-includetracker to distributed files
Thomas Weißschuh [Sat, 7 Jan 2023 02:54:01 +0000 (02:54 +0000)] 
autotools: add asciidoctor-includetracker to distributed files

17 months agoautotools: fix build for test_loopdev
Thomas Weißschuh [Sat, 7 Jan 2023 02:27:45 +0000 (02:27 +0000)] 
autotools: fix build for test_loopdev

17 months agomeson: fix test_sysfs build
Thomas Weißschuh [Sat, 7 Jan 2023 02:24:49 +0000 (02:24 +0000)] 
meson: fix test_sysfs build

17 months agoMerge branch 'waitpid' of https://github.com/t-8ch/util-linux
Karel Zak [Fri, 6 Jan 2023 16:05:04 +0000 (17:05 +0100)] 
Merge branch 'waitpid' of https://github.com/t-8ch/util-linux

* 'waitpid' of https://github.com/t-8ch/util-linux:
  waitpid: add timeout support
  strutils: add function strtotimespec_or_err