Commit Graph

13248 Commits

Author SHA1 Message Date
Noel Cragg 4850e97257 mkswap: fix page size warning message
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-11-29 11:38:41 +01:00
Carlos Santos 9c7431fd18 build-sys: make fdisk, sfdisk, cfdisk optional (enabled by default)
Useful for embedded systems, on which only few utilities are required.

[kzak@redhat.com: - rename to --disable-fdisks
                  - use $enable_{c,s,}fdisk in code]

Signed-off-by: Carlos Santos <casantos@datacom.com.br>
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-11-29 11:33:27 +01:00
Andreas Henriksson df8d991b24 uuidd: Add hardening settings to uuidd.service
This limits what the uuid daemon has access to when it runs.

Further improving this with additional option or making
things even tighter is most likely possible.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
2018-11-29 10:37:08 +01:00
Roland Kammerer 627a0efa75 tests: add test images for drbd v08/v09
This adds DRBD meta data images for DRBD versions 8 and 9, as well as
the according expected output.

Signed-off-by: Roland Kammerer <roland.kammerer@linbit.com>
2018-11-29 10:35:25 +01:00
Karel Zak f069b12824 Merge branch 'master' of https://github.com/nyantec/util-linux
* 'master' of https://github.com/nyantec/util-linux:
  fix a bug where switch_root would erroneously try to parse initargs
2018-11-22 12:04:54 +01:00
Karel Zak 46ffa930f2 Merge branch '2018wk41' of https://github.com/kerolasa/util-linux
* '2018wk41' of https://github.com/kerolasa/util-linux:
  include/c: use returns_nonnull function attribute in xalloc.h
2018-11-22 11:51:00 +01:00
Karel Zak 2dd292faf7 Merge branch 'fix-uuid-oids-test' of https://github.com/Whissi/util-linux
* 'fix-uuid-oids-test' of https://github.com/Whissi/util-linux:
  tests: run oids test only when uuidgen tool was built
2018-11-22 11:40:42 +01:00
Andreas Henriksson 8f3d2d76aa fstrim: Add hardening settings to fstrim.service
This limits what the fstrim process has access to when it runs.

PrivateUsers can't be enabled because of:
"If this mode is enabled, all unit processes are run without privileges
in the host user namespace[...]"

Further improving this with additional option or making
things even tighter is most likely possible.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-11-22 11:13:58 +01:00
Karel Zak 3fa06e0490 setarch: fix obscure sparc32bash use-case
Reported-by: Carlos Santos <casantos@datacom.com.br>
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-11-22 11:03:35 +01:00
Sami Kerola f1b327f8d5
include/c: use returns_nonnull function attribute in xalloc.h
Let the compiler optimize based on the knowledge that the return value will
never be null.

Reference: https://patchwork.ozlabs.org/patch/281112/#631159
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2018-11-21 20:54:18 +00:00
Roland Kammerer ca2071c6ea libblkid: add check for DRBD9
This adds the according meta-data structs + defines and an additional
function to detect DRBD9 magics.

Signed-off-by: Roland Kammerer <roland.kammerer@linbit.com>
2018-11-21 10:48:08 +01:00
Stanislav Brabec d16afd8d15 agetty: Return old behavior with empty logname
c094fcd37 introduced a behavior change: When Return is entered with empty
logname, nothing happens. As it confuses users, return back the old
behavior: re-prompt.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
2018-11-21 10:48:05 +01:00
Andreas Henriksson b7fb72090b libblkid: Fix hidding typo
Spelling error spotted by lintian.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
2018-11-21 10:48:00 +01:00
Andreas Henriksson 0f7a57f58b fstrim: Add Documentation key to fstrim.service 2018-11-21 10:47:40 +01:00
Andreas Henriksson c8d61f361c uuidd: Add Documentation key to uuidd.service 2018-11-21 10:47:31 +01:00
Sami Kerola 7004da3d73 fstrim: use long options in systemd service file
Long options are more user friendly.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2018-11-21 10:47:14 +01:00
Ruediger Meier bd0be5e02a hardlink: add first simple tests
The test still fails without pcre2 and may also make problems on
exotic file systems.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-11-15 21:26:14 +01:00
Ruediger Meier 7d50d36121 hardlink: util-linux usage
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-11-14 00:37:14 +01:00
Ruediger Meier 53071734aa hardlink: fix compiler warnings
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-11-14 00:37:04 +01:00
Ruediger Meier 55c000e1eb hardlink: style indentations and license header
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-11-12 19:44:39 +01:00
Ruediger Meier 04ae85a7e5 hardlink: enable build with and without pcre2
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-11-12 19:40:33 +01:00
Paul Asmuth 61bea8d567 Merge branch 'master' of github.com:karelzak/util-linux 2018-11-12 14:22:12 +01:00
Paul Asmuth 9737a16711 fix a bug where switch_root would erroneously try to parse initargs
before this change, switch_root would try to parse all arguments,
including 'initargs', using getopt, which would lead to an 'unrecognized
option' error when trying to pass a flag to the init program
2018-11-12 14:20:45 +01:00
Laurent Vivier f0af42b517 unshare: allow to set user ID and group ID
This patch introduces two new parameters to set the
user ID and the group ID of the program to be executed.
Setting group ID also drops supplementary groups.

The option names used are the same as for nsenter,
-S, --setuid and -G, --setgid.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2018-11-12 11:52:15 +01:00
Laurent Vivier bf8834d4f4 unshare: allow to set a new root
This patch instroduces two new parameters to set the new
root and the new working directory in this new root.

This allows to combine "unshare chroot" in one command,
and doing like this the /proc filesystem is correctly
mounted in the new root with "--mount-proc".

The new parameters are -R, --root and -w, --wd. The names
are the same as for nsenter, except for "-r" that is already
used by "--map-root-user" and replaced by "-R".

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2018-11-12 11:52:14 +01:00
Christian Hesse f8ee3af9fa agetty: fix output of escaped characters
Signed-off-by: Christian Hesse <mail@eworm.de>
2018-11-12 11:32:28 +01:00
Milan Broz 1741d2ea57 libblkid: fix detection of dm-integrity superblock
Some new features in Linux kernel 4.19 for dm-integrity use metadata
format version 2, patch adds it to detection.

Signed-off-by: Milan Broz <gmazyland@gmail.com>
2018-11-12 11:32:24 +01:00
Samuel Thibault d7a412fe0a agetty: fix portability issues
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-11-12 11:31:17 +01:00
Thomas Deutschmann 8f93c8c71d
tests: run oids test only when uuidgen tool was built
oids test did not check if uuidgen was available.

oids test was also calling uuidgen from PATH which could result
in wrong results if uuidgen from a previous util-linux installation
was used.

With this commit we will check if uuidgen was built and make sure
that we only call the uuidgen binary we just built. If uuidgen is
not available we will skip this test.
2018-11-11 02:18:25 +01:00
Justin Chen e1686b25ac rtcwake: use poweroff if shutdown is not found
Some systems do not have the shutdown command. Use poweroff as an
alternative.

Signed-off-by: Justin Chen <justinpopo6@gmail.com>
2018-11-06 12:34:02 +01:00
Karel Zak 06993ebb11 build-sys: release++ (v2.33)
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-11-06 12:08:46 +01:00
Karel Zak a592edc4b6 docs: update v2.33-ReleaseNotes
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-11-06 12:06:56 +01:00
Karel Zak 26d2d1c559 docs: update AUTHORS file
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-11-06 12:03:34 +01:00
Karel Zak 8f9f4431b2 po: merge changes
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-11-06 12:00:00 +01:00
Yuri Chornoivan 24f25d2d88 po: update uk.po (from translationproject.org) 2018-11-06 11:43:56 +01:00
Rafael Fontenelle cbb5b175af po: update pt_BR.po (from translationproject.org) 2018-11-06 11:43:56 +01:00
Jakub Bogusz ae41723297 po: update pl.po (from translationproject.org) 2018-11-06 11:43:56 +01:00
Takeshi Hamasaki 3c0a1d2cec po: update ja.po (from translationproject.org) 2018-11-06 11:43:56 +01:00
Frédéric Marchal c29f58940b po: update fr.po (from translationproject.org) 2018-11-06 11:43:56 +01:00
Antonio Ceballos Roa 3f4e6c013e po: update es.po (from translationproject.org) 2018-11-06 11:43:56 +01:00
Petr Písař df15152ea2 po: update cs.po (from translationproject.org) 2018-11-06 11:43:56 +01:00
Karel Zak a9b0f9b08e Merge branch 'spelling' of https://github.com/jwilk-forks/util-linux 2018-11-06 10:56:03 +01:00
Karel Zak a6f99be447 eject: use err() rather than abort()
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1645920
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-11-05 10:35:24 +01:00
Jakub Wilk 84bf1f6842 docs: fix typos
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
2018-11-03 20:56:20 +01:00
Stanislav Brabec c094fcd373 agetty: when logname is erased, re-enable reloads
When user starts to enter logname, 8b58ffdd blocks issue reloads.
Reloads remain blocked even if user deletes all typed characters.

Make things visually consistent: If no characters are entered,
re-enable reloads.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
Reviewed-by: Lubomir Rintel <lkundrak@v3.sk>
Tested-by: Lubomir Rintel <lkundrak@v3.sk>
2018-10-31 09:35:48 +01:00
Karel Zak 84b27596f4 docs: add info about branches; update travis.yml
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-10-24 13:02:59 +02:00
Masato Suzuki 8a7f4b5bfe blkzone: fix report zones sector offset check
To catch an offset error, an offset should be begger than or equal to
a device size in the condition.

Signed-off-by: Masato Suzuki <masato.suzuki@wdc.com>
2018-10-23 11:49:41 +02:00
Lubomir Rintel 8b58ffddf4 agetty: don't put the VC into canonical mode
The wait_for_term_input()'s select() needs to be tripped when the user
starts typing. Otherwise the reloads can abort an already in-progress login.

Coupled with \4 and \6 expansions that happen to be there on Fedora Server,
this means reload on every netlink event. With a couple of IPv6 routers
announcing their networks and temporary addresses in use can make it
sometimes virtually impossible to log in.

Seems like zero lflags do the job just fine on a Linux VT. Reset it to
canonical mode before running login.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-10-22 11:03:47 +02:00
Karel Zak 3f7e7e4d3c build-sys: release++ (v2.33-rc2)
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-10-19 12:19:32 +02:00
Karel Zak b8ccaf5dec docs: update v2.33-ReleaseNotes
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-10-19 12:18:07 +02:00