]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
5 years agolast: fix wtmp user name buffer overflow [asan]
Sami Kerola [Sun, 13 Jan 2019 19:48:59 +0000 (19:48 +0000)] 
last: fix wtmp user name buffer overflow [asan]

Ensure utmp user name field is null terminated.  Without that getpwnam() can
buffer overflow, when wtmp file is malformed.

Addresses: https://github.com/karelzak/util-linux/issues/715
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
5 years agobash-completion: umount support relative path and ~ as home shorthands
Sami Kerola [Sat, 12 Jan 2019 11:14:15 +0000 (11:14 +0000)] 
bash-completion: umount support relative path and ~ as home shorthands

Addresses: https://github.com/karelzak/util-linux/issues/703
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
5 years agobuild-sys: release++ (v2.33.1) v2.33.1
Karel Zak [Wed, 9 Jan 2019 10:14:51 +0000 (11:14 +0100)] 
build-sys: release++ (v2.33.1)

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agodocs: update v2.33.1-ReleaseNotes
Karel Zak [Wed, 9 Jan 2019 10:13:20 +0000 (11:13 +0100)] 
docs: update v2.33.1-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agodocs: update AUTHORS file
Karel Zak [Wed, 9 Jan 2019 10:11:00 +0000 (11:11 +0100)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agopo: merge changes
Karel Zak [Wed, 9 Jan 2019 10:09:03 +0000 (11:09 +0100)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agopo: update sv.po (from translationproject.org)
Sebastian Rasmussen [Wed, 9 Jan 2019 10:04:30 +0000 (11:04 +0100)] 
po: update sv.po (from translationproject.org)

5 years agopo: update es.po (from translationproject.org)
Antonio Ceballos Roa [Wed, 9 Jan 2019 10:04:30 +0000 (11:04 +0100)] 
po: update es.po (from translationproject.org)

5 years agolibblkid: (ntfs) fix compiler warning [-Wpedantic]
Karel Zak [Wed, 2 Jan 2019 13:44:59 +0000 (14:44 +0100)] 
libblkid: (ntfs) fix compiler warning [-Wpedantic]

libblkid/src/superblocks/ntfs.c:80:2: warning: ISO C restricts enumerator
values to range of 'int' (4294967295 is too large) [-Wpedantic]

Addressed: https://github.com/karelzak/util-linux/pull/732
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agochmem: add initilizer [clang]
Sami Kerola [Thu, 13 Dec 2018 22:12:26 +0000 (22:12 +0000)] 
chmem: add initilizer [clang]

warning: use of GNU empty initializer extension [-Wgnu-empty-initializer]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
5 years agoRemove duplicate entry for reset-env from usage
John W Higgins [Tue, 18 Dec 2018 01:11:44 +0000 (17:11 -0800)] 
Remove duplicate entry for reset-env from usage

I assume the second entry was not desired in the original commit. Line 153-154 would appear to be a duplicate

5 years agodmesg: correct "-n, --console-level level" example in manual page
Jean-Philippe ROMAIN [Mon, 17 Dec 2018 08:30:54 +0000 (09:30 +0100)] 
dmesg: correct "-n, --console-level level" example in manual page

When providing an abbreviation of the level name with the option "-n, --console-level level",
it corresponds to the level (included) up to which messages are displayed on the console.
If a level number is given, this level is excluded.

So in the given example, "-n 1" is equivalent to "-n emerg".

Signed-off-by: Jean-Philippe Romain <jean-philippe.romain@st.com>
5 years agodocs: add link to mail list archive
Sami Kerola [Sat, 15 Dec 2018 16:05:40 +0000 (16:05 +0000)] 
docs: add link to mail list archive

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
5 years agolibblkid: stratis: correct byte order
Tony Asleson [Thu, 13 Dec 2018 15:03:28 +0000 (09:03 -0600)] 
libblkid: stratis: correct byte order

Stratis superblock is little endian, ensure we retrieve the
number of sectors and initialization time correctly.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
5 years agomkswap: use dd(1) in example rather than fallocate(1)
Karel Zak [Wed, 12 Dec 2018 11:14:39 +0000 (12:14 +0100)] 
mkswap: use dd(1) in example rather than fallocate(1)

The man page warns against fallocate on some filesystems and recommends
dd(1) as the most portable solution. So, let's use dd(1) also in the
example used in the same man page.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1203378
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agotests: check for tar and {b,g}zip
Karel Zak [Tue, 11 Dec 2018 10:44:48 +0000 (11:44 +0100)] 
tests: check for tar and {b,g}zip

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agolibmount: (umount) make mnt_stat_mountpoin() usable for relative paths
Karel Zak [Mon, 10 Dec 2018 15:25:08 +0000 (16:25 +0100)] 
libmount: (umount) make mnt_stat_mountpoin() usable for relative paths

 # mount -o loop devicefile /mnt/test
 # umount devicefile
 umount: devicefile: not mounted.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1653781
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoumount: fix --quiet
Karel Zak [Mon, 10 Dec 2018 13:34:12 +0000 (14:34 +0100)] 
umount: fix --quiet

Addresses: https://github.com/karelzak/util-linux/commit/d5fd9ac6b208c5acdb6c0023757a7e2827474482#commitcomment-31610748
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agochoom: fix negative adjust score usage
Karel Zak [Mon, 10 Dec 2018 13:26:04 +0000 (14:26 +0100)] 
choom: fix negative adjust score usage

It's really bad idea to use uint64_t (ul_path_write_u64(()) when write
signed number.

Addresses: https://github.com/karelzak/util-linux/issues/723
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agolibuuid: fix man page typos
Seth Girvan [Fri, 7 Dec 2018 10:02:00 +0000 (02:02 -0800)] 
libuuid: fix man page typos

Signed-off-by: Seth Girvan <snth@snthhacks.com>
5 years agofstrim: fix usage()
Karel Zak [Mon, 10 Dec 2018 11:03:18 +0000 (12:03 +0100)] 
fstrim: fix usage()

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agobuild-sys: do not require crypt()
Karel Zak [Thu, 22 Nov 2018 11:53:00 +0000 (12:53 +0100)] 
build-sys: do not require crypt()

The function is necessary only for newgrp and sulogin.

Addresses: https://github.com/karelzak/util-linux/issues/584
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agobuild-sys: do not require dirfd()
Karel Zak [Wed, 24 Oct 2018 12:32:29 +0000 (14:32 +0200)] 
build-sys: do not require dirfd()

The dirfd() is required on many places, but it should not be required for
all utils by ./configure.ac.

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoinclude/c: re-add type checking in container_of()
Ruediger Meier [Sun, 2 Dec 2018 18:23:45 +0000 (19:23 +0100)] 
include/c: re-add type checking in container_of()

This reverts parts of commit eb06d5d4, which seems to be based on
Linux kernel commit c7acec71. Unlike the original kernel patch we did
not add that even stronger type checking by using macro BUILD_BUG_ON_MSG.
So basically we removed a useful warning when compiling such
broken code:

      struct st {
            int a;
            char b;
      };
      struct st t = { .a = 1, .b = 2 };
      struct st *x = container_of(&t.a, struct st, b);
      printf("%p %p\n", (void *)&t, (void *)x);

Moreover we also introduced a new compiler warning for intel/icc:
   "arithmetic on pointer to void or function type"

Let's just revert the update of container_of() because adding a
kernel-like BUILD_BUG_ON_MSG would be too much noise and also
problematic (see kernel commit c03567a8). Also note that the original
problem addressed by the kernel commit seems to be only reproducible
with gcc 4.9, not with any later gcc nor clang,icc. Moreover, currently
we have no such use-case in the UL sources anyways.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
5 years agotests: make lsns-netnsid portable
Karel Zak [Fri, 30 Nov 2018 11:24:15 +0000 (12:24 +0100)] 
tests: make lsns-netnsid portable

It seems ip(8) link-show command does not provide link-netnsid in all
cases (versions ?). Let's try to use "ip netns list-id" as fallback.

This commit also add possibility to debug the script by $LOG variable.

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agotests: enlarge backing file for fstab-btrfs
Karel Zak [Fri, 30 Nov 2018 11:22:48 +0000 (12:22 +0100)] 
tests: enlarge backing file for fstab-btrfs

It seems the new limit for Btrfs is 47MiB.

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agomkswap: fix page size warning message
Noel Cragg [Thu, 29 Nov 2018 10:38:41 +0000 (11:38 +0100)] 
mkswap: fix page size warning message

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agobuild-sys: make fdisk, sfdisk, cfdisk optional (enabled by default)
Carlos Santos [Thu, 22 Nov 2018 15:05:49 +0000 (13:05 -0200)] 
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>
5 years agosetarch: fix obscure sparc32bash use-case
Karel Zak [Thu, 22 Nov 2018 10:03:35 +0000 (11:03 +0100)] 
setarch: fix obscure sparc32bash use-case

Reported-by: Carlos Santos <casantos@datacom.com.br>
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoagetty: Return old behavior with empty logname
Stanislav Brabec [Mon, 19 Nov 2018 23:38:14 +0000 (00:38 +0100)] 
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>
5 years agofstrim: Add Documentation key to fstrim.service
Andreas Henriksson [Mon, 12 Nov 2018 18:45:51 +0000 (19:45 +0100)] 
fstrim: Add Documentation key to fstrim.service

5 years agouuidd: Add Documentation key to uuidd.service
Andreas Henriksson [Mon, 12 Nov 2018 18:39:45 +0000 (19:39 +0100)] 
uuidd: Add Documentation key to uuidd.service

5 years agofix a bug where switch_root would erroneously try to parse initargs
Paul Asmuth [Fri, 9 Nov 2018 16:02:11 +0000 (17:02 +0100)] 
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

5 years agoagetty: fix output of escaped characters
Christian Hesse [Wed, 7 Nov 2018 12:55:06 +0000 (13:55 +0100)] 
agetty: fix output of escaped characters

Signed-off-by: Christian Hesse <mail@eworm.de>
5 years agolibblkid: fix detection of dm-integrity superblock
Milan Broz [Wed, 7 Nov 2018 11:48:37 +0000 (12:48 +0100)] 
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>
5 years agoagetty: fix portability issues
Samuel Thibault [Mon, 12 Nov 2018 10:31:17 +0000 (11:31 +0100)] 
agetty: fix portability issues

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agotests: run oids test only when uuidgen tool was built
Thomas Deutschmann [Sun, 11 Nov 2018 01:17:55 +0000 (02:17 +0100)] 
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.

5 years agobuild-sys: release++ (v2.33) v2.33
Karel Zak [Tue, 6 Nov 2018 11:08:46 +0000 (12:08 +0100)] 
build-sys: release++ (v2.33)

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agodocs: update v2.33-ReleaseNotes
Karel Zak [Tue, 6 Nov 2018 11:06:56 +0000 (12:06 +0100)] 
docs: update v2.33-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agodocs: update AUTHORS file
Karel Zak [Tue, 6 Nov 2018 11:03:34 +0000 (12:03 +0100)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agopo: merge changes
Karel Zak [Tue, 6 Nov 2018 11:00:00 +0000 (12:00 +0100)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agopo: update uk.po (from translationproject.org)
Yuri Chornoivan [Tue, 6 Nov 2018 10:43:56 +0000 (11:43 +0100)] 
po: update uk.po (from translationproject.org)

5 years agopo: update pt_BR.po (from translationproject.org)
Rafael Fontenelle [Tue, 6 Nov 2018 10:43:56 +0000 (11:43 +0100)] 
po: update pt_BR.po (from translationproject.org)

5 years agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Tue, 6 Nov 2018 10:43:56 +0000 (11:43 +0100)] 
po: update pl.po (from translationproject.org)

5 years agopo: update ja.po (from translationproject.org)
Takeshi Hamasaki [Tue, 6 Nov 2018 10:43:56 +0000 (11:43 +0100)] 
po: update ja.po (from translationproject.org)

5 years agopo: update fr.po (from translationproject.org)
Frédéric Marchal [Tue, 6 Nov 2018 10:43:56 +0000 (11:43 +0100)] 
po: update fr.po (from translationproject.org)

5 years agopo: update es.po (from translationproject.org)
Antonio Ceballos Roa [Tue, 6 Nov 2018 10:43:56 +0000 (11:43 +0100)] 
po: update es.po (from translationproject.org)

5 years agopo: update cs.po (from translationproject.org)
Petr Písař [Tue, 6 Nov 2018 10:43:56 +0000 (11:43 +0100)] 
po: update cs.po (from translationproject.org)

5 years agoMerge branch 'spelling' of https://github.com/jwilk-forks/util-linux
Karel Zak [Tue, 6 Nov 2018 09:56:03 +0000 (10:56 +0100)] 
Merge branch 'spelling' of https://github.com/jwilk-forks/util-linux

5 years agoeject: use err() rather than abort()
Karel Zak [Mon, 5 Nov 2018 09:34:10 +0000 (10:34 +0100)] 
eject: use err() rather than abort()

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1645920
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agodocs: fix typos
Jakub Wilk [Sat, 3 Nov 2018 19:55:45 +0000 (20:55 +0100)] 
docs: fix typos

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
5 years agoagetty: when logname is erased, re-enable reloads
Stanislav Brabec [Fri, 26 Oct 2018 13:02:17 +0000 (15:02 +0200)] 
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>
5 years agodocs: add info about branches; update travis.yml
Karel Zak [Wed, 24 Oct 2018 11:02:59 +0000 (13:02 +0200)] 
docs: add info about branches; update travis.yml

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoblkzone: fix report zones sector offset check
Masato Suzuki [Tue, 23 Oct 2018 09:31:35 +0000 (18:31 +0900)] 
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>
5 years agoagetty: don't put the VC into canonical mode
Lubomir Rintel [Fri, 19 Oct 2018 20:08:17 +0000 (22:08 +0200)] 
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>
5 years agobuild-sys: release++ (v2.33-rc2) v2.33-rc2
Karel Zak [Fri, 19 Oct 2018 10:19:32 +0000 (12:19 +0200)] 
build-sys: release++ (v2.33-rc2)

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agodocs: update v2.33-ReleaseNotes
Karel Zak [Fri, 19 Oct 2018 10:18:07 +0000 (12:18 +0200)] 
docs: update v2.33-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agodocs: update AUTHORS file
Karel Zak [Fri, 19 Oct 2018 10:16:45 +0000 (12:16 +0200)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agopo: merge changes
Karel Zak [Fri, 19 Oct 2018 10:14:52 +0000 (12:14 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoagetty: don't use __u32
Karel Zak [Thu, 11 Oct 2018 12:22:08 +0000 (14:22 +0200)] 
agetty: don't use __u32

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoagetty: make output more robust
Karel Zak [Thu, 11 Oct 2018 11:29:39 +0000 (13:29 +0200)] 
agetty: make output more robust

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoagetty: cleanup issue output change, remove bool
Karel Zak [Thu, 11 Oct 2018 11:21:23 +0000 (13:21 +0200)] 
agetty: cleanup issue output change, remove bool

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoagetty: move all issue variables to struct
Karel Zak [Thu, 11 Oct 2018 11:12:02 +0000 (13:12 +0200)] 
agetty: move all issue variables to struct

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoagetty: Reload only if it is really needed
Stanislav Brabec [Wed, 10 Oct 2018 17:26:34 +0000 (19:26 +0200)] 
agetty: Reload only if it is really needed

If netlink event arrives and related escapes are part of issue, agetty
reloads and re-display the prompt. Reload is triggered not only by IP
address change, but also by IPv6 RAs. In some environments it causes
reload several times in a minute, and even complicates the login.

To prevent this, reload only if a real change appears.

This consists of:
split print_issue_file() to several functions:

eval_issue_file() prints issue to memory. It does not affect terminal in
any way.

print_issue_file() prints issue file from memory.

cmp_issue_file() compares the issue file and returns true, if reload is
needed.

The implementation requires additional change:

do_prompt() does not evaluate the issue file. It is responsibility of
calling function.

Test suite:

Use issue that contais \4 and/or \6 escape.

After installing new instance, restart agetty by typing a letter and then
Enter 6 times.

To check whether reload happens, type a letter. When reload happens,
letter disappears.

1. Unplug network cable. Wait a while and re-plug network cable.
You should see 2 reloads on single stack and 3 reloads on dual stack.

2. Run a loop
while : ; do
sed -i '$areload_test' /etc/issue
agetty --reload
sleep 3
sed -i '/reload_test/d' /etc/issue
agetty --reload
sleep 3
done
You should see regular reload every 3 seconds.

3. Run a loop
while : ; do
agetty --reload
sleep 3
done
Before: You see regular reload every 3 seconds.
After: No reloads.

4. Run a loop
while : ; do
ifconfig lo 127.0.0.1 netmask 255.0.0.0
sleep 3
ifconfig lo 127.0.0.2 netmask 255.0.0.0
sleep 3
done
Before: You see regular reload every 3 seconds.
After: No reloads.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
5 years agoagetty: Watch only protocol requested by issue escapes
Stanislav Brabec [Wed, 10 Oct 2018 17:26:27 +0000 (19:26 +0200)] 
agetty: Watch only protocol requested by issue escapes

To decrease number of reloads, watch only protocol requested by \4 and \6
escapes in issue file.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
5 years agoagetty: rename variable changed to triggered
Stanislav Brabec [Wed, 10 Oct 2018 17:26:21 +0000 (19:26 +0200)] 
agetty: rename variable changed to triggered

changed variable name is not correct. It does not say that network
interface changed its address. It just says that the netlink message
processing was triggered.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
5 years agobash-completion: cleanup mount and umount --namespace
Karel Zak [Fri, 5 Oct 2018 09:48:04 +0000 (11:48 +0200)] 
bash-completion: cleanup mount and umount --namespace

* use only PATHs rather than PIDs to namespaces

* add --namespace to umount too

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoMerge branch '2018wk40' of https://github.com/kerolasa/util-linux
Karel Zak [Fri, 5 Oct 2018 09:42:59 +0000 (11:42 +0200)] 
Merge branch '2018wk40' of https://github.com/kerolasa/util-linux

* '2018wk40' of https://github.com/kerolasa/util-linux:
  bash-completion: catch up with option changes

5 years agolibmount: keep namespaces support optional
Karel Zak [Fri, 5 Oct 2018 09:04:04 +0000 (11:04 +0200)] 
libmount: keep namespaces support optional

Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agobuild-sys: add USE_LIBMOUNT_SUPPORT_NAMESPACES
Karel Zak [Fri, 5 Oct 2018 09:02:26 +0000 (11:02 +0200)] 
build-sys: add USE_LIBMOUNT_SUPPORT_NAMESPACES

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agobash-completion: catch up with option changes
Sami Kerola [Thu, 4 Oct 2018 20:36:22 +0000 (21:36 +0100)] 
bash-completion: catch up with option changes

Check what has changed in usage functions in between v2.32..a77bd80d5 and
update bash-completion files accordingly.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
5 years agosfdisk: disable --activate for Hybrid GPT/MBR
Karel Zak [Thu, 4 Oct 2018 12:06:45 +0000 (14:06 +0200)] 
sfdisk: disable --activate for Hybrid GPT/MBR

Addresses: https://github.com/karelzak/util-linux/issues/699
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agodocs: add getopt to TODO
Karel Zak [Thu, 4 Oct 2018 10:54:05 +0000 (12:54 +0200)] 
docs: add getopt to TODO

Addresses: https://github.com/karelzak/util-linux/issues/701
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agosfdisk: be more verbose about PMBR on --activate
Karel Zak [Thu, 4 Oct 2018 10:40:10 +0000 (12:40 +0200)] 
sfdisk: be more verbose about PMBR on --activate

Addresses: https://github.com/karelzak/util-linux/issues/699
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agorename: avoid undefined function prototype for `fpurge`
Patrick Steinhardt [Wed, 26 Sep 2018 06:23:09 +0000 (08:23 +0200)] 
rename: avoid undefined function prototype for `fpurge`

In case where the non-standard `fpurge` function is available, we
redefine `__fpurge` to `fpurge`. We can do so because the only
difference between both functions is that one returns an error code
while the other does not. But as we do not check the error code either
way, we do not care about which one of them we use.

The above redefinition happens unconditionally if we know that `fpurge`
exists. Most notably, we also redefine it if we already do have an
`__fpurge` function available that could be used. This causes problems
on musl-based platforms, where we detect availability of `fpurge` in
libc, but where no function declaration for it exists in "stdio_ext.h".
The compiler thus prints a warning due to an unknown function, even
though it will link just fine.

Avoid this warning by only redefining `__fpurge` to `fpurge` when
HAVE___FPURGE is not defined.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
5 years agolsblk: fix unknown type `stat` caused by missing header
Patrick Steinhardt [Wed, 26 Sep 2018 06:23:08 +0000 (08:23 +0200)] 
lsblk: fix unknown type `stat` caused by missing header

The structure `blkdev_cxt` has a `struct stat` member embedded, whose
size may not be known on some systems because of a missing include for
"sys/stat.h". On glibc-based systems, this header is included
transitively via "sys/statvfs.h", but on musl-based systems it is not.

Fix the resulting compile error due to unknown size of the struct by
including "sys/stat.h".

Signed-off-by: Patrick Steinhardt <ps@pks.im>
5 years agolibfdisk: fix printf format modifier
Ruediger Meier [Tue, 25 Sep 2018 22:37:29 +0000 (00:37 +0200)] 
libfdisk: fix printf format modifier

libfdisk/src/script.c: In function ‘fdisk_script_read_context’:
libfdisk/src/script.c:452:33: error: format ‘%zu’ expects argument of type ‘size_t’, but argument 4 has type ‘long unsigned int’ [-Werror=format=]
   snprintf(buf, sizeof(buf), "%zu", fdisk_get_grain_size(cxt));
                                 ^

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
5 years agolibfdisk: fix OSX compiler warning
Ruediger Meier [Tue, 25 Sep 2018 22:37:28 +0000 (00:37 +0200)] 
libfdisk: fix OSX compiler warning

libfdisk/src/context.c:1354:54: error: unused parameter 'cxt' [-Werror,-Wunused-parameter]
const char *fdisk_get_devmodel(struct fdisk_context *cxt)

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
5 years agoagetty: cleanup code to copy to log strings
Karel Zak [Wed, 3 Oct 2018 15:08:11 +0000 (17:08 +0200)] 
agetty: cleanup code to copy to log strings

man utmp:
  String fields are terminated by a null byte ('\0') if they are shorter
  than the size of the field.

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agosu: cleanup code to copy to log strings
Karel Zak [Wed, 3 Oct 2018 15:08:11 +0000 (17:08 +0200)] 
su: cleanup code to copy to log strings

man utmp:
  String fields are terminated by a null byte ('\0') if they are shorter
  than the size of the field.

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agologin: cleanup code to copy to log strings
Karel Zak [Wed, 3 Oct 2018 15:08:11 +0000 (17:08 +0200)] 
login: cleanup code to copy to log strings

man utmp:
  String fields are terminated by a null byte ('\0') if they are shorter
  than the size of the field.

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agomkfs.cramfs: properly copy disk name
Karel Zak [Wed, 3 Oct 2018 15:07:37 +0000 (17:07 +0200)] 
mkfs.cramfs: properly copy disk name

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agolast: make sure domain is zero terminated
Karel Zak [Wed, 3 Oct 2018 15:06:33 +0000 (17:06 +0200)] 
last: make sure domain is zero terminated

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agowall: make sure line is zero terminated
Karel Zak [Wed, 3 Oct 2018 15:06:12 +0000 (17:06 +0200)] 
wall: make sure line is zero terminated

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoinclude/c: add str2memcpy() and mem2strcpy()
Karel Zak [Wed, 3 Oct 2018 15:03:11 +0000 (17:03 +0200)] 
include/c: add str2memcpy() and mem2strcpy()

str2memcpy() - copy zero terminated string to optionally terminated buffer

mem2strcpy() - copy from buffer to zero terminated string

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoinclude/ttyutils: define values if missing.
Sevan Janiyan [Sat, 29 Sep 2018 13:49:02 +0000 (14:49 +0100)] 
include/ttyutils: define values if missing.

Upstreamed from pkgsrc.

Addresses: https://github.com/karelzak/util-linux/pull/695
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoinclude/c: add NAME_MAX compat
Sevan Janiyan [Sat, 29 Sep 2018 13:50:04 +0000 (14:50 +0100)] 
include/c: add NAME_MAX compat

Upstreamed from pkgsrc.

Addresses: https://github.com/karelzak/util-linux/pull/695
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agolsblk: always use "part" as TYPE for partitions
Karel Zak [Wed, 3 Oct 2018 12:39:57 +0000 (14:39 +0200)] 
lsblk: always use "part" as TYPE for partitions

The current code uses "part" or "disk" only if nothing else is
possible to recognize. It means for example partitions on loops (or
RAIDs, etc) are marked as "loop" rather than "part".

Addresses: https://github.com/karelzak/util-linux/issues/700
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agomount: add note about MS_BIND and _netdev
Karel Zak [Tue, 2 Oct 2018 10:50:40 +0000 (12:50 +0200)] 
mount: add note about MS_BIND and _netdev

Addresses: https://github.com/karelzak/util-linux/issues/697
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agobuild-sys: release++ (v2.33-rc1) v2.33-rc1
Karel Zak [Tue, 25 Sep 2018 09:26:58 +0000 (11:26 +0200)] 
build-sys: release++ (v2.33-rc1)

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agotests: add choom to build-sys test
Karel Zak [Mon, 24 Sep 2018 09:37:13 +0000 (11:37 +0200)] 
tests: add choom to build-sys test

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agodocs: fix gtkdoc warning
Karel Zak [Mon, 24 Sep 2018 09:21:09 +0000 (11:21 +0200)] 
docs: fix gtkdoc warning

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agodocs: update v2.33-ReleaseNotes
Karel Zak [Thu, 20 Sep 2018 12:27:55 +0000 (14:27 +0200)] 
docs: update v2.33-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agodocs: update AUTHORS file
Karel Zak [Thu, 20 Sep 2018 10:19:06 +0000 (12:19 +0200)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agopo: merge changes
Karel Zak [Wed, 19 Sep 2018 10:54:05 +0000 (12:54 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agopo: update sv.po (from translationproject.org)
Sebastian Rasmussen [Wed, 19 Sep 2018 10:49:46 +0000 (12:49 +0200)] 
po: update sv.po (from translationproject.org)

5 years agopo: update pt_BR.po (from translationproject.org)
Rafael Fontenelle [Wed, 19 Sep 2018 10:49:46 +0000 (12:49 +0200)] 
po: update pt_BR.po (from translationproject.org)

5 years agopo: update ja.po (from translationproject.org)
Takeshi Hamasaki [Wed, 19 Sep 2018 10:49:46 +0000 (12:49 +0200)] 
po: update ja.po (from translationproject.org)

5 years agolibfdisk: (docs) add missing function
Karel Zak [Wed, 19 Sep 2018 10:00:59 +0000 (12:00 +0200)] 
libfdisk: (docs) add missing function

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agolsblk: move udev and blkid stuff to lsblk-properties.c
Karel Zak [Wed, 19 Sep 2018 09:25:08 +0000 (11:25 +0200)] 
lsblk: move udev and blkid stuff to lsblk-properties.c

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