Commit Graph

8257 Commits

Author SHA1 Message Date
Karel Zak 86c58c4a82 umount: fix memory leak [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-17 15:12:35 +02:00
Karel Zak df1a1ca0c9 fstrim: fix memory leak [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-17 15:07:49 +02:00
Karel Zak aea3a3ba2c findmnt: fix memory leak [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-17 15:00:17 +02:00
Karel Zak fa936c9f9b sulogin: don't use uninitialized struct sigaction [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-17 14:47:20 +02:00
Karel Zak c210324c67 sulogin: check result of the open() [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-17 14:42:00 +02:00
Karel Zak 2e118e709b last: fix is_phantom() logic [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-17 14:39:11 +02:00
Karel Zak 98d391c0b6 libmount: add missing assert()
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-17 14:31:05 +02:00
Karel Zak f9953bbaa2 libblkid: comparing an array to null is not useful [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-17 14:20:03 +02:00
Karel Zak 8471bc61f9 lib/procutils: check fgets() return value [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-17 14:11:28 +02:00
Karel Zak cba69bb551 lib/loopdev: comparing an array to null is not useful [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-17 14:08:18 +02:00
Benno Schulenberg d179d01950 docs: bring four more man pages closer to standard formatting
In the IPC man pages strictly adhere to the memory, queue, semaphore
order, to reduce disorientation.  And for 'ipcmk', the arguments for
-M and -S and -p are not optional.  Add --version for 'mountpoint'.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-17 14:01:04 +02:00
Sami Kerola e612ead96a fstrim: avoid TOCTOU race
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-07-17 14:01:02 +02:00
Sami Kerola 0407c1bef9 fallocate: avoid unnecessary computation
Where POSIX_FADV_SEQUENTIAL and HAVE_POSIX_FADVISE are not available it
is waste of resources to have variables that are meaningful only for
posix_fadvise().  Also initialize the variables immediately to correct
values, and since cachesz is never changed mark it read only.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-07-17 14:01:00 +02:00
Sami Kerola 8a03628de9 lib/colors: remove memory leak
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-07-17 14:00:55 +02:00
Benno Schulenberg 5c0b406deb build-sys: harmonize some indentation
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-17 14:00:53 +02:00
Benno Schulenberg cfbebb2905 docs: improve the wording and conventions in the man-page howto
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-17 14:00:52 +02:00
Benno Schulenberg 1000a59543 docs: improve the formatting and wording of two man pages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-17 14:00:50 +02:00
Karel Zak d02c203512 cfdisk: make code more readable for analyzers [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-17 13:59:01 +02:00
Karel Zak a9408274b7 cfdisk: fix possible memory leak [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-17 13:46:27 +02:00
Benno Schulenberg e33ee284f9 docs: bring some more man pages closer to standard formatting
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-16 12:03:26 +02:00
Benno Schulenberg 6e72fa5965 docs: bring a few more man pages closer to standard formatting
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-16 12:03:25 +02:00
Benno Schulenberg 07990fdcd4 docs: bring several man pages closer to standard formatting
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-16 12:03:25 +02:00
Karel Zak bdba3fd9b5 lslogins: make --notruncate more robust
- keep coldescs[] read-only
 - don't expect that only COL_GECOS uses truncate flag

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-16 11:25:03 +02:00
Karel Zak 4b6ae07123 lslogins: add --noheadings
That's fatal mistake that this option which is required for script
is missing.

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-16 11:19:20 +02:00
Karel Zak 37019cbc27 lslogins: use bit-array, cleanup SELinux code
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-16 11:09:42 +02:00
Benno Schulenberg 2ddfd9e424 cfdisk: restore the license that was lost in January
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-15 13:25:19 +02:00
Benno Schulenberg 08626e33d4 docs: mount -o nouser is not useful, be clearer about that
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-15 13:22:29 +02:00
Benno Schulenberg 9bef99ccb1 docs: improve wording and formatting of the man page of cfdisk
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-15 13:22:26 +02:00
Sami Kerola 558445c93d tests: add kill --queue check
Correction.  The final failure to catch signal exit should not use
exiter() function.

--->8----
From: Sami Kerola <kerolasa@iki.fi>
Date: Mon, 14 Jul 2014 18:35:56 +0100
Subject: [PATCH] tests: add kill --queue check

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-07-15 13:22:24 +02:00
Karel Zak 33f7c502c6 cfdisk: fix warning usage, improve 's' help
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-15 13:12:23 +02:00
Karel Zak bfdb3244e3 cfdisk: accept 's' as well as 'S' for sectors
Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-15 13:01:56 +02:00
Karel Zak ad5d45c046 cfdisk: make menus sensitive to ESC
Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-15 12:41:30 +02:00
Karel Zak 8fc37981cf cfdisk: use \n for messages on stdout and stderr
Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-15 12:32:38 +02:00
Karel Zak bc787727d4 libfdisk: make disk sync() optional
... this allows to avoid unnecessary sync() from cfdisk.

Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-15 12:32:03 +02:00
Benno Schulenberg 993fdba086 docs: fix name and URL of 2.25-rc1
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-14 16:21:37 +02:00
Benno Schulenberg 0dc5e9ba03 libmount: adjust the ordering of a #define and tweak some comments
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-14 16:21:36 +02:00
Benno Schulenberg 3711f11307 docs: many tiny formatting and wording improvements to man page of mount
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-14 16:21:35 +02:00
Benno Schulenberg 1f94a78ce8 docs: improve formatting and wording of a few man pages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-14 16:21:34 +02:00
Benno Schulenberg 7d78e9880a build-sys: exclude Documentation/ from looking for translatable strings
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-14 16:21:34 +02:00
Benno Schulenberg 36a3cd56ab textual: fix the usage message of kill
Using angular brackets around each individual argument, indenting a
continuation line, not using a space before =, improving some wordings,
and the argument of --queue is a value (a piece of data), not a signal.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-14 16:13:37 +02:00
Karel Zak 2fa32bea49 Merge branch 'minor-fixes' of git://github.com/kerolasa/lelux-utiliteetit
* 'minor-fixes' of git://github.com/kerolasa/lelux-utiliteetit:
  lscpu: avoid double free
  libsmartcols: avoid variable dereference after release
  libfdisk: do not do the same thing twice in single if statement
  whereis: avoid printing uninitialized string
  setpriv: avoid alloca() use xmalloc() instead
  dmesg: avoid unnecessary variable assignment
  fdisk: avoid code duplication
  mkfs.cramfs: use defined failure name rather than magic value
  fdformat: match variable and print format types
  cfdisk: add braces to ensure operation order
  lscpu: avoid use of bzero() in favor of memset()
  setterm: remove unnecessary variable
  cal: remove unnused structure and definition
  textual: fix some typos
2014-07-14 16:03:48 +02:00
Andreas Henriksson 89c80bd25a uuidd.rc: Requires remote_fs
The Debian package checking tool lintian thinks that the script is
missing Requires on $remote_fs because it pokes at stuff under /usr
and it's probably right.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
2014-07-14 15:55:45 +02:00
Andreas Henriksson 928601e630 uuidd.rc: drop on-demand mode from script
The on-demand mode was dropped from libuuid in
commit ea4f8845f0 "libuuid: don't exec uuidd"

You now need systemd (socket activation) to use
uuidd on demand.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
2014-07-14 15:55:34 +02:00
Sami Kerola a3443c3067 kill: use --queue option argument as sigval integer value
The sigqueue(3) takes two values, signal and sigval.  Contents of the
signal can be altered with --signal option argument, so the --queue
argument should be reserved to affect sigval_int.

This is regression fix introduced by commit
9e8dffd5cd.

Reference: http://man7.org/linux/man-pages/man3/sigqueue.3.html
Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-07-14 15:49:35 +02:00
Benno Schulenberg bdef457d34 build-sys: improve the informative message when not building some util
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-14 15:49:32 +02:00
Benno Schulenberg 8309826200 docs: fix many wording and some formatting issues in the man page of kill
Also, add the most-used form of '-signal' to the synopsis.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-14 15:49:30 +02:00
Andreas Henriksson 8a11218213 whereis: fix missing newline on empty results
Running "whereis foo.bar.quux" previously resulted in
printing the "foo.bar:" pattern prefix without any
newline following it.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
2014-07-14 15:49:27 +02:00
Karel Zak 7c2cfb1896 libfdisk: make first sector buffer usage more robust
$ ~/util-linux/fdisk -b 4096 xxx
	..
	Segmentation fault

The buffer has to be reinitialized always when we apply a new
device properties (e.g. sector size).

Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-14 15:05:22 +02:00
Sami Kerola 4e6604e51a lscpu: avoid double free
The double free was possible for architectures other than x86_64 or i386.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-07-13 18:35:39 +01:00
Sami Kerola b697fc994a libsmartcols: avoid variable dereference after release
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-07-13 18:35:39 +01:00