]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
7 years agochmem: cleanup includes
Karel Zak [Mon, 23 Oct 2017 13:49:22 +0000 (15:49 +0200)] 
chmem: cleanup includes

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agolib/path: make path_set_prefix() independent on cpu_set_t
Karel Zak [Mon, 23 Oct 2017 13:45:01 +0000 (15:45 +0200)] 
lib/path: make path_set_prefix() independent on cpu_set_t

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agolib/signames: fix redefinition of 'sys_signame' on OSX
Karel Zak [Mon, 23 Oct 2017 13:17:10 +0000 (15:17 +0200)] 
lib/signames: fix redefinition of 'sys_signame' on OSX

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agounshare: cleanup if-if code
Karel Zak [Mon, 23 Oct 2017 11:19:59 +0000 (13:19 +0200)] 
unshare: cleanup if-if code

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agolib/signames: remove signame array from header file
Karel Zak [Mon, 23 Oct 2017 11:18:57 +0000 (13:18 +0200)] 
lib/signames: remove signame array from header file

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agoMerge branch 'kill-child-feature' of https://github.com/nh2/util-linux
Karel Zak [Mon, 23 Oct 2017 10:58:21 +0000 (12:58 +0200)] 
Merge branch 'kill-child-feature' of https://github.com/nh2/util-linux

* 'kill-child-feature' of https://github.com/nh2/util-linux:
  unshare: Allow passing <signame> to --kill-child
  unshare: Add --kill-child option.
  signames: Make input char buffers const
  kill: Extract signal names into signames.h/signames.c

7 years agobuild-sys: move rfkill to /usr/sbin
Karel Zak [Fri, 20 Oct 2017 12:59:16 +0000 (14:59 +0200)] 
build-sys: move rfkill to /usr/sbin

The original implementation uses sbin, let's do it too.

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agotests: update lsmem
Karel Zak [Fri, 20 Oct 2017 12:33:47 +0000 (14:33 +0200)] 
tests: update lsmem

* add --split

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agolsmem: add --split
Karel Zak [Fri, 20 Oct 2017 10:31:09 +0000 (12:31 +0200)] 
lsmem: add --split

Now the way how lsmem lists memory ranges is affected by used output
columns.  It makes it very difficult to use in scripts where you want
to use for example only one column

ranges=$(lsmem -oRANGE)

and in this case all is merged to the one (or two) huge ranges and all
attributes are ignored. The --split allows to control this behavior

ranges=$(lsmem -oRANGE --split=STATE,ZONES)

forces lsmem to list ranges by STATE and ZONES differences.

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agolsmem: add hint about block merges to the man page
Karel Zak [Wed, 18 Oct 2017 11:16:09 +0000 (13:16 +0200)] 
lsmem: add hint about block merges to the man page

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agolsmem: improve path_read_xxx() usage
Karel Zak [Wed, 18 Oct 2017 10:21:47 +0000 (12:21 +0200)] 
lsmem: improve path_read_xxx() usage

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agochmem: cleanup usage()
Karel Zak [Wed, 18 Oct 2017 10:02:05 +0000 (12:02 +0200)] 
chmem: cleanup usage()

Just to be compatible with another u-l tools.

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agolsmem/chmem: add memory zone awareness to bash-completion
Andre Wild [Wed, 27 Sep 2017 17:44:46 +0000 (19:44 +0200)] 
lsmem/chmem: add memory zone awareness to bash-completion

This patch extends the valid --output values with ZONES for the
lsmem bash-completion, and adds the --zone option for the chmem
bash-completion.

Signed-off-by: Andre Wild <wild@linux.vnet.ibm.com>
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
7 years agotests/lsmem: update lsmem test with ZONES column
Gerald Schaefer [Wed, 27 Sep 2017 17:44:45 +0000 (19:44 +0200)] 
tests/lsmem: update lsmem test with ZONES column

The existing s390 and x86_64 dumps already contain the valid_zones sysfs
attribute, so just add a new "lsmem -o +ZONES" test command and update
the expected results.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
7 years agolsmem/chmem: add memory zone awareness
Gerald Schaefer [Wed, 27 Sep 2017 17:44:44 +0000 (19:44 +0200)] 
lsmem/chmem: add memory zone awareness

With this patch, valid memory zones can be shown with lsmem, and chmem can
set memory online/offline in a specific memory zone, if allowed by the
kernel. The valid memory zones are read from the "valid_zones" sysfs
attribute, and setting memory online to a specific zone is done by
echoing "online_kernel" or "online_movable" to the "state" sysfs
attribute, in addition to the previous "online".

This patch also changes the default behavior of chmem, when setting memory
online without specifying a memory zone. If valid, memory will be set
online to the zone Movable. This zone is preferable for memory hotplug, as
it makes memory offline much more likely to succeed.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
7 years agolibmount: use eacess() rather than open() to check mtab/utab
Karel Zak [Mon, 9 Oct 2017 10:44:48 +0000 (12:44 +0200)] 
libmount: use eacess() rather than open() to check mtab/utab

The open() syscall is probably the most strong way how to check write
accessibility in all situations, but it's overkill and on some
paranoid systems with enabled audit/selinux. It fills logs with
"Permission denied" entries. Let's use eaccess() if available.

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agobuild-sys: release++ (v2.31) v2.31
Karel Zak [Thu, 19 Oct 2017 11:08:49 +0000 (13:08 +0200)] 
build-sys: release++ (v2.31)

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agodocs: update v2.31-ReleaseNotes
Karel Zak [Thu, 19 Oct 2017 11:06:00 +0000 (13:06 +0200)] 
docs: update v2.31-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agodocs: update AUTHORS file
Karel Zak [Thu, 19 Oct 2017 11:00:06 +0000 (13:00 +0200)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agopo: merge changes
Karel Zak [Thu, 19 Oct 2017 10:57:57 +0000 (12:57 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agopo: update sv.po (from translationproject.org)
Sebastian Rasmussen [Thu, 19 Oct 2017 10:53:09 +0000 (12:53 +0200)] 
po: update sv.po (from translationproject.org)

7 years agopo: update pt_BR.po (from translationproject.org)
Rafael Fontenelle [Thu, 19 Oct 2017 10:53:09 +0000 (12:53 +0200)] 
po: update pt_BR.po (from translationproject.org)

7 years agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Thu, 19 Oct 2017 10:53:09 +0000 (12:53 +0200)] 
po: update pl.po (from translationproject.org)

7 years agorfkill: fix description name typo
Sami Kerola [Mon, 16 Oct 2017 18:15:44 +0000 (19:15 +0100)] 
rfkill: fix description name typo

Commit 7d2a9960ad made gps to look like a GUID Partition Table.

Reviewed-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
7 years agoblkid: improve man page wording
Karel Zak [Mon, 16 Oct 2017 21:26:45 +0000 (23:26 +0200)] 
blkid: improve man page wording

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agoblkid: more info about ambivalent results to the man page
Karel Zak [Mon, 16 Oct 2017 10:01:41 +0000 (12:01 +0200)] 
blkid: more info about ambivalent results to the man page

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agoblkid: cleanup man page info about lsblk
Karel Zak [Mon, 16 Oct 2017 09:45:41 +0000 (11:45 +0200)] 
blkid: cleanup man page info about lsblk

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agozramctl: fix show all non-zero zram devices
James Sanford [Sat, 14 Oct 2017 07:57:20 +0000 (00:57 -0700)] 
zramctl: fix show all non-zero zram devices

Addresses: https://github.com/karelzak/util-linux/issues/521
Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agozramctl: remove unused ZRAM_EMPTY and blank line
James Sanford [Sat, 14 Oct 2017 07:57:05 +0000 (00:57 -0700)] 
zramctl: remove unused ZRAM_EMPTY and blank line

7 years agounshare: Allow passing <signame> to --kill-child
Niklas Hambüchen [Sat, 14 Oct 2017 02:31:57 +0000 (04:31 +0200)] 
unshare: Allow passing <signame> to --kill-child

7 years agounshare: Add --kill-child option.
Niklas Hambüchen [Tue, 19 Sep 2017 18:39:00 +0000 (20:39 +0200)] 
unshare: Add --kill-child option.

This allows to conveniently kill the entire process tree
below the forked program, a common problem when scripting
tasks that need to reliably fully terminate without leaving
reparented subprocesses behind.

The example added to the man page shows the most common use.

Implemented using prctl(PR_SET_PDEATHSIG, ...).

7 years agosignames: Make input char buffers const
Niklas Hambüchen [Sat, 14 Oct 2017 02:45:20 +0000 (04:45 +0200)] 
signames: Make input char buffers const

7 years agokill: Extract signal names into signames.h/signames.c
Niklas Hambüchen [Sat, 14 Oct 2017 02:31:12 +0000 (04:31 +0200)] 
kill: Extract signal names into signames.h/signames.c

7 years agorfkill: fix typo [coverity scan]
Karel Zak [Thu, 12 Oct 2017 12:53:32 +0000 (14:53 +0200)] 
rfkill: fix typo [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agolosetup: fix bitwise vs. logical typo [coverity scan]
Karel Zak [Thu, 12 Oct 2017 12:45:11 +0000 (14:45 +0200)] 
losetup: fix bitwise vs. logical typo [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agoipcs: fix memory leak [coverity scan]
Karel Zak [Thu, 12 Oct 2017 12:39:54 +0000 (14:39 +0200)] 
ipcs: fix memory leak [coverity scan]

It's not important, but let's keep static analyzes happy.

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agologger: keep header generators independent on connection
Karel Zak [Thu, 12 Oct 2017 12:21:27 +0000 (14:21 +0200)] 
logger: keep header generators independent on connection

* avoid memory leaks
* don't use incomplete or header after free()

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agofincore: make sure mmap(NULL, ...) [coverity scan]
Karel Zak [Thu, 12 Oct 2017 10:44:55 +0000 (12:44 +0200)] 
fincore: make sure mmap(NULL, ...) [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agolibsmartcols: (sample) cleanup line separator usage
Karel Zak [Thu, 12 Oct 2017 10:01:25 +0000 (12:01 +0200)] 
libsmartcols: (sample) cleanup line separator usage

* add comment to explain when nolinesep flag is necessary
* force to print \n before switch to the next line to support

  ./sample-scols-continuous > file

use case.

Addresses: https://github.com/ignatenkobrain/python-smartcols/issues/18
Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agolibsmartcols: (docs) add note about line separators
Karel Zak [Thu, 12 Oct 2017 09:33:49 +0000 (11:33 +0200)] 
libsmartcols: (docs) add note about line separators

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agolslogins: fix possible memory leak [coverity scan]
Karel Zak [Wed, 11 Oct 2017 13:13:44 +0000 (15:13 +0200)] 
lslogins: fix possible memory leak [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agolibsmartcols: don't call free_buffer() for uninitialized variable [coverity scan]
Karel Zak [Wed, 11 Oct 2017 13:06:41 +0000 (15:06 +0200)] 
libsmartcols: don't call free_buffer() for uninitialized variable [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agolibmount: make sure we call stat() propely [coverity scan]
Karel Zak [Wed, 11 Oct 2017 12:59:16 +0000 (14:59 +0200)] 
libmount: make sure we call stat() propely [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agolibfdisk: (sun) make math more robust [coverity scan]
Karel Zak [Wed, 11 Oct 2017 12:50:43 +0000 (14:50 +0200)] 
libfdisk: (sun) make math more robust [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agolib/pager: check open() return code [coverity scan]
Karel Zak [Wed, 11 Oct 2017 12:42:49 +0000 (14:42 +0200)] 
lib/pager: check open() return code [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agolib/mbsedit: check wctomb() return code [coverity scan]
Karel Zak [Wed, 11 Oct 2017 12:40:37 +0000 (14:40 +0200)] 
lib/mbsedit: check wctomb() return code [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agologger: allow to reconnect on initial failed connect too
Karel Zak [Wed, 11 Oct 2017 10:35:24 +0000 (12:35 +0200)] 
logger: allow to reconnect on initial failed connect too

The current code sets noact flag if unix socked connection failed. This is ugly.
We want to reconnect always in all cases (well, except --socket-error=on).

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agologger: add dummy fallback for OSX
Karel Zak [Tue, 10 Oct 2017 12:45:55 +0000 (14:45 +0200)] 
logger: add dummy fallback for OSX

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agologger: reconnect on failed send()
Karel Zak [Tue, 10 Oct 2017 11:56:30 +0000 (13:56 +0200)] 
logger: reconnect on failed send()

The libc syslog() reconnects on failed send(). We need the same thing
as logger(1) is expected as long time running tool. For example
recommended Apache configuration is:

ErrorLog "| /usr/bin/logger -t apache_error -p local6.debug"

The issue is that connection endpoint (e.g. syslogd) maybe restarted.
The simple way how to test is:

for i in $(seq 0 3600); do echo "This is message number $i"; sleep 1; done | logger --tcp --server 127.0.0.1 --port 514

and restart your syslog. The current implementation gets SIGPIPE or
write warning message, but it never reconnect.

Addresses: https://github.com/karelzak/util-linux/issues/363
Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agoMerge branch 'mount-typo' of https://github.com/Liam-Ryan/util-linux
Karel Zak [Tue, 10 Oct 2017 10:52:19 +0000 (12:52 +0200)] 
Merge branch 'mount-typo' of https://github.com/Liam-Ryan/util-linux

* 'mount-typo' of https://github.com/Liam-Ryan/util-linux:
  Fixed typo in mount.8

7 years agosetsid: document fork(2) usage
Karel Zak [Tue, 10 Oct 2017 10:06:09 +0000 (12:06 +0200)] 
setsid: document fork(2) usage

Addresses: https://github.com/karelzak/util-linux/issues/518
Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agoFixed typo in mount.8
Liam Ryan [Mon, 9 Oct 2017 16:41:42 +0000 (17:41 +0100)] 
Fixed typo in mount.8

Signed-off-by: Liam Ryan <liamryandev@gmail.com>
7 years agoagetty: fix /etc/os-release parsing
Karel Zak [Thu, 5 Oct 2017 09:07:41 +0000 (11:07 +0200)] 
agetty: fix /etc/os-release parsing

For example /etc/os-release:

VERSION="26 (Twenty Six)"
VERSION_ID=26

agetty for \S{VERSION} returns

_ID=26

because the parser does nor check for '=' after variable name.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1498462
Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agodocs: (TODO) make PMBR boot flag more user-friendly
Karel Zak [Wed, 4 Oct 2017 09:45:21 +0000 (11:45 +0200)] 
docs: (TODO) make PMBR boot flag more user-friendly

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agolosetup: fix conflicting types for ‘loopcxt_set_blocksize’
Karel Zak [Wed, 4 Oct 2017 08:08:08 +0000 (10:08 +0200)] 
losetup: fix conflicting types for ‘loopcxt_set_blocksize’

Reported-by: Lars Wendler <polynomial-c@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agobuild-sys: release++ (v2.31-rc2) v2.31-rc2
Karel Zak [Tue, 3 Oct 2017 15:53:33 +0000 (17:53 +0200)] 
build-sys: release++ (v2.31-rc2)

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agodocs: update v2.31-ReleaseNotes
Karel Zak [Tue, 3 Oct 2017 15:51:55 +0000 (17:51 +0200)] 
docs: update v2.31-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agodocs: update AUTHORS file
Karel Zak [Tue, 3 Oct 2017 15:49:32 +0000 (17:49 +0200)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agopo: merge changes
Karel Zak [Tue, 3 Oct 2017 15:48:43 +0000 (17:48 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agorfkill: support old "list" output
Karel Zak [Tue, 3 Oct 2017 13:35:17 +0000 (15:35 +0200)] 
rfkill: support old "list" output

.. just because we want to be replacement for the original version.

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agorfkill: remove duplicate code
Karel Zak [Tue, 3 Oct 2017 12:31:57 +0000 (14:31 +0200)] 
rfkill: remove duplicate code

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agorfkill: refactor actions
Karel Zak [Tue, 3 Oct 2017 11:44:19 +0000 (13:44 +0200)] 
rfkill: refactor actions

* convert action string to ID and use switch()
* add note about default output to the man page

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agorfkill: improve default output
Karel Zak [Tue, 3 Oct 2017 11:01:56 +0000 (13:01 +0200)] 
rfkill: improve default output

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agodocs: add Atari PT to the TODO list
Karel Zak [Mon, 2 Oct 2017 13:45:41 +0000 (15:45 +0200)] 
docs: add Atari PT to the TODO list

Addresses: https://github.com/karelzak/util-linux/issues/517
Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agolibmount: add human compatible message for EBADMSG errno
Karel Zak [Mon, 2 Oct 2017 11:44:29 +0000 (13:44 +0200)] 
libmount: add human compatible message for EBADMSG errno

 mount: /media/sdb5: mount(2) system call failed: Bad message.

is really ugly for end users. It seems XFS, extN (etc) use EBADMSG for
bad checksums. For network or pseudo filesystems continue to use "Bad
message" error...

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1496764
Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agoMerge branch 'fix-python_libmount_get_propagation' of https://github.com/giuseppe...
Karel Zak [Mon, 2 Oct 2017 10:44:24 +0000 (12:44 +0200)] 
Merge branch 'fix-python_libmount_get_propagation' of https://github.com/giuseppe/util-linux

* 'fix-python_libmount_get_propagation' of https://github.com/giuseppe/util-linux:
  libmount: fix Python get_propagation

7 years agoMerge branch 'patch-1' of https://github.com/sgargel/util-linux
Karel Zak [Mon, 2 Oct 2017 10:20:36 +0000 (12:20 +0200)] 
Merge branch 'patch-1' of https://github.com/sgargel/util-linux

* 'patch-1' of https://github.com/sgargel/util-linux:
  Fix end translation

7 years agolosetup: rename to --sector-size and LOG-SEC
Karel Zak [Mon, 2 Oct 2017 09:59:57 +0000 (11:59 +0200)] 
losetup: rename to --sector-size and LOG-SEC

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agolib/randutils: remove superfluous continue
Karel Zak [Mon, 2 Oct 2017 09:27:59 +0000 (11:27 +0200)] 
lib/randutils: remove superfluous continue

Addresses: https://github.com/karelzak/util-linux/commit/fa949792072530b49ef5760d7ecd6d250c66e35f#commitcomment-24678670
Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agoFix end translation
sgargel [Thu, 28 Sep 2017 11:56:56 +0000 (13:56 +0200)] 
Fix end translation

See also https://translate.google.it/#en/it/end

7 years agolosetup: Add support for logical block size
Stanislav Brabec [Tue, 26 Sep 2017 14:14:51 +0000 (16:14 +0200)] 
losetup: Add support for logical block size

Kernel since 4.14 supports setting of logical block size[1]. It allows to
create loop devices that report logical block size different from 512.

Add support for this feature to losetup.

References:
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/block/loop.c?id=89e4fdecb51cf5535867026274bc97de9480ade5

[kzak@redhat.com: - fix loopcxt_get_blocksize()
                  - remove lo_blocksize from loop_info64]

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Omar Sandoval <osandov@fb.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agodocs: add exec() exit codes to TODO
Karel Zak [Wed, 27 Sep 2017 09:25:08 +0000 (11:25 +0200)] 
docs: add exec() exit codes to TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agocfdisk: cleanup die-on-signal code
Karel Zak [Tue, 26 Sep 2017 10:47:50 +0000 (12:47 +0200)] 
cfdisk: cleanup die-on-signal code

Let's keep signal handler simple and don't cleanup terminal from the
handler.

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agocfdisk: make resize code more readable
Karel Zak [Tue, 26 Sep 2017 10:23:33 +0000 (12:23 +0200)] 
cfdisk: make resize code more readable

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agosetproctitle: fix out of boundary access
Tobias Stoeckmann [Mon, 25 Sep 2017 19:55:34 +0000 (21:55 +0200)] 
setproctitle: fix out of boundary access

A program using setproctitle can trigger an out of boundary access
if an attacker was able to clear the environment before execution.

The check in setproctitle prevents overflows, but does not take into
account that the whole length of the arguments could be 1, which is
possible by supplying such a program name to execlp(3) or using a
symbolic link, e.g. argv[0] = "l", argv[1] = NULL.

Only login uses setproctitle, which is not affected by this
problem due to initializing the environment right before the call.

7 years agologin: fix signal race
Tobias Stoeckmann [Mon, 25 Sep 2017 19:54:11 +0000 (21:54 +0200)] 
login: fix signal race

The functions warnx(3) and gettext(3) are not safe to use within signal
handlers and should be avoided. Preparing the message beforehand and
calling write(2) as well as calling _exit(2) solves the problem.

[kzak@redhat.com: - use program_invocation_short_name rather than argv[0],
                  - use ignore_result() to keep compiler happy]

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agodocs: add 2.30.2 to ReleaseNotes
Karel Zak [Mon, 25 Sep 2017 08:40:37 +0000 (10:40 +0200)] 
docs: add 2.30.2 to ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agobuild-sys: release++ (v2.31-rc1) v2.31-rc1
Karel Zak [Fri, 22 Sep 2017 10:03:15 +0000 (12:03 +0200)] 
build-sys: release++ (v2.31-rc1)

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agodocs: update v2.31 release notes
Karel Zak [Fri, 22 Sep 2017 09:53:22 +0000 (11:53 +0200)] 
docs: update v2.31 release notes

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agopo: merge changes
Karel Zak [Fri, 22 Sep 2017 09:49:50 +0000 (11:49 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agopo: Fix translation in ja.po
Masanari Iida [Thu, 21 Sep 2017 14:23:25 +0000 (23:23 +0900)] 
po: Fix translation in ja.po

English message and Japanese translation are unmatch.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
7 years agopo:Fix a typo
Masanari Iida [Thu, 21 Sep 2017 14:23:24 +0000 (23:23 +0900)] 
po:Fix a typo

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
7 years agoMerge branch '170915' of github.com:jwpi/util-linux
Karel Zak [Fri, 22 Sep 2017 08:59:05 +0000 (10:59 +0200)] 
Merge branch '170915' of github.com:jwpi/util-linux

* '170915' of github.com:jwpi/util-linux:
  hwclock: make debug implicit for test mode.
  hwclock: exit bug fix and single test mode message

7 years agolibmount: fix Python get_propagation
Giuseppe Scrivano [Thu, 21 Sep 2017 21:18:30 +0000 (23:18 +0200)] 
libmount: fix Python get_propagation

The current implementation would return always 0, as it is the return
code of mnt_fs_get_propagation.  Change the implementation to raise an
exception on an error and return the propagation flags otherwise.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
7 years agohwclock: make debug implicit for test mode.
J William Piggott [Wed, 20 Sep 2017 22:54:35 +0000 (18:54 -0400)] 
hwclock: make debug implicit for test mode.

Calling --test without --debug is not useful, so
make it implicit.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
7 years agohwclock: exit bug fix and single test mode message
J William Piggott [Wed, 20 Sep 2017 00:55:23 +0000 (20:55 -0400)] 
hwclock: exit bug fix and single test mode message

Bug fix: hwclock returns success when saving /etc/adjtime fails.

Remove redundant test mode messages.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
7 years agoDocs: add hwclock 'highlights' v2.31-ReleaseNotes
J William Piggott [Thu, 21 Sep 2017 01:20:47 +0000 (21:20 -0400)] 
Docs: add hwclock 'highlights' v2.31-ReleaseNotes

Signed-off-by: J William Piggott <elseifthen@gmx.com>
7 years agoDocs: grammar fixes for v2.31-ReleaseNotes
J William Piggott [Thu, 21 Sep 2017 01:18:13 +0000 (21:18 -0400)] 
Docs: grammar fixes for v2.31-ReleaseNotes

Signed-off-by: J William Piggott <elseifthen@gmx.com>
7 years agopo: fix ipcrm translation error fr.po
Karel Zak [Wed, 20 Sep 2017 10:14:42 +0000 (12:14 +0200)] 
po: fix ipcrm translation error fr.po

Addresses: https://github.com/karelzak/util-linux/issues/512
Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agodocs: update v2.31-ReleaseNotes
Karel Zak [Wed, 20 Sep 2017 09:31:42 +0000 (11:31 +0200)] 
docs: update v2.31-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agodocs: remove UUID v3 and v5 from TODO
Karel Zak [Tue, 19 Sep 2017 12:44:50 +0000 (14:44 +0200)] 
docs: remove UUID v3 and v5 from TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agodocs: update AUTHORS file
Karel Zak [Tue, 19 Sep 2017 12:17:25 +0000 (14:17 +0200)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agopo: merge changes
Karel Zak [Tue, 19 Sep 2017 12:14:46 +0000 (14:14 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agopo: update pt_BR.po (from translationproject.org)
Rafael Fontenelle [Tue, 19 Sep 2017 12:05:56 +0000 (14:05 +0200)] 
po: update pt_BR.po (from translationproject.org)

7 years agopo: update fr.po (from translationproject.org)
Stéphane Aulery [Tue, 19 Sep 2017 12:05:56 +0000 (14:05 +0200)] 
po: update fr.po (from translationproject.org)

7 years agopo: update es.po (from translationproject.org)
Antonio Ceballos Roa [Tue, 19 Sep 2017 12:05:56 +0000 (14:05 +0200)] 
po: update es.po (from translationproject.org)

7 years agopo: update da.po (from translationproject.org)
Joe Hansen [Tue, 19 Sep 2017 12:05:55 +0000 (14:05 +0200)] 
po: update da.po (from translationproject.org)

7 years agopo: update cs.po (from translationproject.org)
Petr Písař [Tue, 19 Sep 2017 12:05:55 +0000 (14:05 +0200)] 
po: update cs.po (from translationproject.org)

7 years agotests: update build-sys tests
Karel Zak [Tue, 19 Sep 2017 11:59:17 +0000 (13:59 +0200)] 
tests: update build-sys tests

Signed-off-by: Karel Zak <kzak@redhat.com>
7 years agobuild-sys: fix non-blkid compilation
Karel Zak [Tue, 19 Sep 2017 11:48:52 +0000 (13:48 +0200)] 
build-sys: fix non-blkid compilation

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