Commit Graph

13325 Commits

Author SHA1 Message Date
Karel Zak 450016eb72 build-sys: don't use ASAN on XOS
It seems that Apple Clang is not mature enough to use ASAN.

  AddressSanitizer: detect_leaks is not supported on this platform.

Let's disable ASAN on XOS at all.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-25 10:18:08 +02:00
Karel Zak 57f25377c3 po: merge changes
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-24 18:39:05 +02:00
Karel Zak 08a2cf7292 hardlink: remove \r from output
* remove \r from internationalized messages
* remove \r from all output to make it easy to use (see for example
  output file from "hardlink -vv --dry-run . &> log")

* remove unnecessary formatting stuff from output, just keep is simple
  and stupid...

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-24 18:31:08 +02:00
Sebastian Rasmussen 8a2c8175f2 po: update sv.po (from translationproject.org) 2019-04-24 18:10:37 +02:00
Božidar Putanec 679bc72cf6 po: update hr.po (from translationproject.org) 2019-04-24 18:10:37 +02:00
Frédéric Marchal bd5d0e0b46 po: update fr.po (from translationproject.org) 2019-04-24 18:10:36 +02:00
Antonio Ceballos Roa fc2e4b525a po: update es.po (from translationproject.org) 2019-04-24 18:10:36 +02:00
Mario Blättermann a166829c7c po: update de.po (from translationproject.org) 2019-04-24 18:10:36 +02:00
Karel Zak 4750cb9126 build-sys: add devel-non-asan.conf
This allows to use "./tools/config-gen devel-non-asan" for ./configure.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-24 18:04:24 +02:00
Karel Zak 58354269eb build-sys: add 'make checklibdoc'
Let's to be sure that all libs API symbols are documented.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-24 18:02:39 +02:00
Karel Zak 00749b05b9 su: make comment more friedly to 'make checkxalloc'
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-24 12:45:20 +02:00
Karel Zak b97a25162a losetup: man page has repeating words [make checkmans]
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-24 12:43:27 +02:00
Karel Zak 0b17c997c0 tests: auto-enable ASAN option if necessary
Let's detect ASAN LDFLAGS in top level Makefile to make sure we call
tests with --memcheck-asan if build-system has been configured with
--enable-asan.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-24 12:24:15 +02:00
Stanislav Brabec 0d37969cbe lslogins: Fix discrepancies of SYS_UID_MIN
util-linux does not contain useradd. Its most popular implementation
comes from shadow. SYS_UID_MIN is one of common parameters. Its
hardcoded fallback value is equal to 101 in shadow useradd (see
shadow-4.6/libmisc/find_new_uid.c: get_ranges()), but 201 in
login-utils/lslogins.c.

Let lslogins use the same fallback as useradd from shadow.

Hopefully most distros define its custom value of SYS_UID_MIN in
/etc/login.defs, so this problem is not visible.

login-utils/lslogins.1 does not mention its default at all. Add a
reference and improve text of lslogins(1) to prevent off-by-one
interpretation.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-24 11:16:53 +02:00
Wang Shilong ce3d198d7c fstrim: document kernel return minlen explicitly
Filesystem will modify @minlen according to its
block size etc, and will return actual unit
to userspace, document it into manpage.

Cc: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
2019-04-24 11:08:23 +02:00
Karel Zak 19bc8ef897 tests: fix TS_ENABLE_ASAN usage
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-17 10:38:50 +02:00
Karel Zak 2da48ba3cc tests: use TS_ENABLE_ASAN in tests to detect ASAN
It seems better to not use any random ASAN variable.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-17 10:10:46 +02:00
Karel Zak 2c308875a7 misc: consolidate version printing and close_stdout()
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-16 15:14:13 +02:00
Karel Zak 68224d108d include/c: add print_version() macro
Let's consolidate the version printing code. It also seems better to
use exit() after --version, because it's handled in different way by
ASAN.

It's strange, but ASAN reports leaks after return in main(). Note that
we do not use free-before-exit.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-16 13:47:17 +02:00
Karel Zak 31c66833cb include/closestream: add close_stdout_atexit()
It seems better to have a way to control when atexit(close_stdout()) is
used, because close stdout means that for example ASAN (or another
into binary integrated tool) is not able to print the final summary.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-16 13:42:34 +02:00
Karel Zak 7f8787d094 chcpu: fix memory leak
The CPU set has been allocated more than once.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-16 10:51:35 +02:00
Karel Zak 2e5ff9db30 libmount: fix compiler warning [-Wsometimes-uninitialized]
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-15 13:35:21 +02:00
Karel Zak 7bd44e8ade build-sys: enable ASAN on travis-ci
Addresses: Addresses: https://github.com/systemd/systemd/pull/12252
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-15 13:05:33 +02:00
Karel Zak ef61c093d3 build-sys: add ASAN_LDFLAGS
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-15 13:01:21 +02:00
Karel Zak 1271e63c49 tests: ignore errors with enabled ASAN in python bindings
temporary solution... as it ends with
	undefined symbol: __asan_option_detect_stack_use_after_return

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-15 12:58:48 +02:00
Karel Zak 82e39473a5 libmount: fix memleak on parse errors
Addresses: https://github.com/systemd/systemd/pull/12252
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-15 12:55:46 +02:00
Wang Shilong 8302b2009a fstrim: get realpath before trim ioctl
Original motivation is we want to run fstrim command
on Lustre[1] osd server mount point directly, however
our server mount point doesn't export osd directory
to users, and it will cause following command fail:

 $fstrim -v /mnt/mds/

But following succeed:

 $fstrim -v /mnt/mds

We could improve this a bit by getting realpath
before trapping kernel, this also give benifits
to normal use cases.

Cc: Andreas Dilger <adilger@dilger.ca>
Cc: Shuichi Ihara <sihara@ddn.com>
[1] http://wiki.lustre.org/Main_Page
Signed-off-by: Wang Shilong <wshilong@ddn.com>
2019-04-15 11:12:55 +02:00
Karel Zak 8b2464ae2a tests: update lscpu due to 'Vulnerability' fields
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-11 13:55:51 +02:00
Karel Zak b8910af5a6 lscpu: wrap default output long lines on terminal
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-11 13:53:03 +02:00
Karel Zak 639eeb28dd lscpu: report CPU vulnerabilities
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-11 13:45:29 +02:00
Karel Zak 3c4ff2dc9d include/strutils: add functions to replace and remove chars from string
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-11 13:13:06 +02:00
Karel Zak 7761bd3bb6 lib/fileutils: add xreaddir()
Remove duplicate code and keep only one implementation in
include/fileutils.h.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-11 13:11:53 +02:00
Andrew Savchenko 146900d411 setarch: add new e2k subarches
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-09 11:04:17 +02:00
Karel Zak 5b13d6a1c9 tests: add /mnt/test/foo^Mbar to mountinfo tests
Addresses: https://github.com/karelzak/util-linux/issues/780
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-08 15:22:27 +02:00
Karel Zak 6c9ab254ae libmount: don't use sscanf() for swaps parsing
Addresses: https://github.com/karelzak/util-linux/issues/780
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-08 15:16:23 +02:00
Karel Zak 86673b3a46 libmount: don't use sscanf() for mountinfo parsing
Addresses: https://github.com/karelzak/util-linux/issues/780
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-08 14:45:56 +02:00
Karel Zak 36fcefa651 libmount: don't use sscanf() for fstab parsing
Addresses: https://github.com/karelzak/util-linux/issues/780
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-08 13:34:47 +02:00
Karel Zak f1428af5be Merge branch 'spelling' of https://github.com/jwilk-forks/util-linux
* 'spelling' of https://github.com/jwilk-forks/util-linux:
  docs: fix typo
2019-04-02 12:05:25 +02:00
Marcos Paulo de Souza e108643981 fstrim.c: Remove commnet about vfat not supporting fstrim
Commit f663b5b38f ("fat: add FITRIM ioctl for FAT file system") in
linux kernel added support for using fstrim with vfat filesystem.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
2019-04-01 18:38:31 -03:00
Karel Zak c313ee737b tastset: (man) add :N stride for CPU lists
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-29 13:00:42 +01:00
Karel Zak 4534e4f2fb fsck: (man) labels are available for all filesystems
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-28 15:29:09 +01:00
Karel Zak 99c1ebee21 su: change error message
We use PAM and if pam_strerror() returns nothing we have no clue why
authentication failed. It's mistake to blame incorrect password if
there are many possible reason...

Addresses: https://github.com/karelzak/util-linux/issues/778
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-25 16:39:43 +01:00
Jakub Wilk 25d9f1403d docs: fix typo
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
2019-03-22 13:27:33 +01:00
Karel Zak 65bcbf105b taskset: fix cpuset list parser
taskset hangs when executed with badly formatted cpuset list, for
example:

	 $ taskset -c 0--1 true

The current cpuset list parser is pretty weak as based on scanf()
without strings verification ("-1" as input for "%u" returns
unexpected number). It seems faster and better to use strtoul() and
isdigit().

Addresses: https://github.com/karelzak/util-linux/issues/77
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-20 13:12:25 +01:00
Karel Zak 06c141a99a lscpu: (man) tiny changes 2019-03-19 17:00:01 +01:00
Karel Zak a44cd89128 lscpu: fix excl[] array order
It (rows and columns) must be in ASCII order.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-19 16:56:28 +01:00
Karel Zak 0a31a242cb lscpu: fix and document --output-all
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-19 16:47:55 +01:00
Karel Zak 2ec00a10b2 lscpu: define libsmartcols flags for -e
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-19 16:40:51 +01:00
Karel Zak 4161da7bb0 lscpu: fix --caches order
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-19 16:24:54 +01:00
Karel Zak 9261d0a119 lscpu: (man) make SYNOPSIS compatible with another utils
In this case is really no reason to duplicate all options in SYNOPSIS.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-19 14:30:09 +01:00