]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
12 years agocolumn: describe change of separator behavior in man page bugs section
Sami Kerola [Sat, 29 Sep 2012 09:21:59 +0000 (10:21 +0100)] 
column: describe change of separator behavior in man page bugs section

Add to manual page how to achieve old behavior, just in case someone
relies on buggy behavior of the command.

[kzak@redhat.com: - remove unnecessary info from the man page :-)]

Reported-by: Padraig Brady <P@draigBrady.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agosu: fixed a typo in pam error message
Vitezslav Cizek [Mon, 1 Oct 2012 12:48:16 +0000 (14:48 +0200)] 
su: fixed a typo in pam error message

Signed-off-by: Vitezslav Cizek <vcizek@suse.cz>
12 years agocolumn: clarify the --separator option
Pádraig Brady [Wed, 26 Sep 2012 21:20:07 +0000 (22:20 +0100)] 
column: clarify the --separator option

Indicate that the string is a set,
which also clarifies that it's only
significant when parsing the input.

12 years agocolumn: make defined separator to be non-greedy
Sami Kerola [Wed, 26 Sep 2012 20:45:36 +0000 (21:45 +0100)] 
column: make defined separator to be non-greedy

This patch changes interpretation of subsequent delimeter interpretation.
Earlier version merged columns that had null string as content together,
which lead to output as visualized below.

$ printf "a:b:c\n1::3\n" | column  -t -s ':'
a  b  c
1  3

The number 3 has wrong column, which this patch takes care of, and alters
the output following way.

$ printf "a:b:c\n1::3\n" | column  -t -s ':'
a  b  c
1     3

This patch does not alter the default case, e.g., subsequent white spaces
are understood as separator of the same field, and the beginning of line
white spaces are being ignored together.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agomount: fix a few typos
Mike Frysinger [Tue, 25 Sep 2012 22:39:00 +0000 (18:39 -0400)] 
mount: fix a few typos

Nothing of note here.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agotextual: typo fixes
Gilles Espinasse [Sat, 22 Sep 2012 07:59:19 +0000 (09:59 +0200)] 
textual: typo fixes

Signed-off-by: Gilles Espinasse <g.esp@free.fr>
12 years agolsblk: fix reporting of 'part' type
Peter Rajnoha [Fri, 21 Sep 2012 12:23:32 +0000 (14:23 +0200)] 
lsblk: fix reporting of 'part' type

Partitions are incorrectly marked with 'disk' type on
lsblk output while it should be marked as 'part' type.

Before:
$ lsblk /dev/sda
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0  128M  0 disk
`-sda1   8:1    0   64M  0 disk

With this patch applied:
$ lsblk /dev/sda
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0  128M  0 disk
`-sda1   8:1    0   64M  0 part

Signed-off-by: Peter Rajnoha <prajnoha@redhat.com>
12 years agosu: don't modify PATH if -l not specified
Karel Zak [Tue, 2 Oct 2012 08:14:05 +0000 (10:14 +0200)] 
su: don't modify PATH if -l not specified

This patch reverts a6fdd3f8125be23930d955c2bc6b7a46cdaf8a12.

su(1) modifies PATH if:
  - option -l specified
  - ALWAYS_SET_PATH login.defs variable set

Reported-by: Thomas Bächler <thomas@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agoipcrm: avoid 'uninitialized' warning
Bernhard Voelker [Wed, 5 Sep 2012 13:12:01 +0000 (15:12 +0200)] 
ipcrm: avoid 'uninitialized' warning

GCC 4.1.2 on SLES 10.4:
sys-utils/ipcrm.c: In function ‘main’:
sys-utils/ipcrm.c:297: warning: ‘what_all’ may be used uninitialized in this function

* sys-utils/ipcrm.c: Initialize what_all to ALL.

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
12 years agoblkdiscard: add new command
Lukas Czerner [Wed, 12 Sep 2012 21:49:15 +0000 (17:49 -0400)] 
blkdiscard: add new command

blkdiscard is used to discard device sectors. This is useful for
solid-state drivers (SSDs) and thinly-provisioned storage. Unlike
fstrim this command is used directly on the block device.

blkkdiscard uses BLKDISCARD ioctl or BLKSECDISCARD ioctl for the secure
discard.

All data in the discarded region on the device will be lost!

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
12 years agoRevert "blkdiscard: new command"
Karel Zak [Thu, 27 Sep 2012 23:10:08 +0000 (01:10 +0200)] 
Revert "blkdiscard: new command"

This was only attempt as alternative implementation, unfortunately
pushed publicly... sorry.

This reverts commit c84ed54cefdcaa07f3d1f40a65434c9d4277da08.

12 years agofdisk: add GPT support
Davidlohr Bueso [Thu, 27 Sep 2012 07:50:27 +0000 (09:50 +0200)] 
fdisk: add GPT support

This patch allows fdisk to handle GUID partition tables, based on the latest UEFI specifications
version 2.3.1, from June 27th, 2012. The following operations are supported:

  - Probing (detects both protective and hybrid MBRs)
  - Writing to disk
  - Listing used partitions
  - Adding partitions
  - Deleting partitions
  - Data integrity verifications (for both headers and partitions).

A few considerations:
  - Currently we do not fix invalid primary headers -- we just abort!
  - Header checksums are updated upon every change (ie: add/delete partitions), this allows us
    to mathematically verify the changes on-the-fly, and not only when writing to disk, like
    most other related tools do.
  - We are extremly picky when writing to disk, any error aborts the opeartion.
  - When creating a new partition, the following GUIDs are available:
     http://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs

For test cases, the gpt.img from libblkid tests, scsi_debug and my own hard drive (/dev/sda) were used.
For the image, all operations were tested successfully, and for /dev/sda all except write, which
was not tested - hey, I'm not suicidal!

[kzak@redhat.com: - add get/set partition type functions
                  - use unified on strings based table for partition types
                  - add partition type to table list function]

Tested-and-reviewed-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agofdisk: cleanup debug messages and comments
Karel Zak [Wed, 26 Sep 2012 12:31:22 +0000 (14:31 +0200)] 
fdisk: cleanup debug messages and comments

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agofdisk: use fdisk_parttype in add_partition
Karel Zak [Wed, 26 Sep 2012 12:14:54 +0000 (14:14 +0200)] 
fdisk: use fdisk_parttype  in add_partition

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agofdisk: add fdisk_set_partition_type()
Karel Zak [Wed, 26 Sep 2012 11:30:44 +0000 (13:30 +0200)] 
fdisk: add fdisk_set_partition_type()

 - remove all label specific partition type stuff from fdisk.c to
   label files
 - add new fdisk_set_partition_type() to API

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agofdisk: add fdisk_get_partition_type()
Karel Zak [Tue, 25 Sep 2012 10:12:28 +0000 (12:12 +0200)] 
fdisk: add fdisk_get_partition_type()

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agofdisk: add new functions for work with fdisk_parttype
Karel Zak [Tue, 25 Sep 2012 08:23:36 +0000 (10:23 +0200)] 
fdisk: add new functions for work with fdisk_parttype

 - add flags to fdisk_parttype to store more information about the types
 - function for conversion from code to fdisk_parttype
 - function for conversion from string to fdisk_parttype
 - function for conversion from user input to fdisk_parttype
 - support for unknown complex types (e.g. unknown UUIDs)

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agofdisk: improve list partition types
Karel Zak [Mon, 24 Sep 2012 11:24:09 +0000 (13:24 +0200)] 
fdisk: improve list partition types

 - add fdisk_parttype->typestr for types like GPT UUID or Mac
 - list typestr if specified

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agofdisk: move partition types to label specific part
Karel Zak [Mon, 24 Sep 2012 09:30:26 +0000 (11:30 +0200)] 
fdisk: move partition types to label specific part

 - move MBR partition types to dos_part_types.h
 - make dos_part_types.h independent on datetypes to keep it useful in
   all fdisks
 - add struct fdisk_parrtype
 - move label specific partition types to context->label

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agoblkdiscard: new command
Karel Zak [Thu, 27 Sep 2012 09:21:35 +0000 (11:21 +0200)] 
blkdiscard: new command

Add to fstrim(8) code to support new discard BLKDISCARD and
BLKSECDISCARD ioctls for block devices.  The new command is only
symlink to fstrim(8) as the both utils share some code and the basic
ideas.

Based on patch from Lukas Czerner <lczerner@redhat.com>.

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agolibmount: don't setup new loopdev on remount with regular mtab
Karel Zak [Wed, 26 Sep 2012 09:25:01 +0000 (11:25 +0200)] 
libmount: don't setup new loopdev on remount with regular mtab

[chroot-i486] root:/tmp$ mount -oloop /tmp/blob /tmp/mnt
[chroot-i486] root:/tmp$ mount -o remount,loop,ro /tmp/mnt
[chroot-i486] root:/tmp$ mount
/dev/loop0 on /tmp/mnt type ext2 (ro,loop)
[chroot-i486] root:/tmp$ losetup -a
/dev/loop0: [2051]:306957 (/tmp/blob)
/dev/loop1: [0005]:2218 (/dev/loop0)
[chroot-i486] root:/tmp$ umount /tmp/mnt
umount: /tmp/mnt: filesystem umounted, but mount(8) failed: Device or
resource busy
[chroot-i486] root:/tmp$ losetup -d /dev/loop1
[chroot-i486] root:/tmp$ losetup -d /dev/loop0

Reported-by: g.esp@free.fr
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agolibmount: improve debug message
Karel Zak [Tue, 25 Sep 2012 15:04:21 +0000 (17:04 +0200)] 
libmount: improve debug message

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agolibmount: optimize mtab and utab parsing in umount
Karel Zak [Tue, 25 Sep 2012 14:47:18 +0000 (16:47 +0200)] 
libmount: optimize mtab and utab parsing in umount

create 8000 NFS mountpoints:
#!/bin/bash
mount=/tmp/mount
if [ ! -d $mount ]; then
    mkdir -p $mount
fi
for dir in {1..8000}; do
    if [ ! -d $mount/$dir ]; then
mkdir -p $mount/$dir
    fi
    echo mount $dir
    mount -t nfs 127.0.0.1:/ $mount/$dir
done

old version:
time ./umount /tmp/mount/2255

real 0m1.254s
user 0m1.002s
sys 0m0.238s

new version:
time ./umount /tmp/mount/2244

real 0m0.332s
user 0m0.111s
sys 0m0.218s

Reported-by: chenditang <chendt.fnst@cn.fujitsu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agolibmount: user-mounted loopback fs cannot be unmounted by user
Karel Zak [Fri, 21 Sep 2012 15:15:07 +0000 (17:15 +0200)] 
libmount: user-mounted loopback fs cannot be unmounted by user

Addresses: https://bugs.archlinux.org/task/31624
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agomkswap: wipe old signature if there is no part table by default
Milan Broz [Mon, 10 Sep 2012 10:58:39 +0000 (12:58 +0200)] 
mkswap: wipe old signature if there is no part table by default

Historically mkswap avoids wiping any signature on "whole disk",
until force option is given.

While the idea is that it should not wipe possible boot loader,
in reality it leads to many situations where e.g. LUKS device
is overwritten but still can be detected as LUKS (but unusable).

Patch chnges behaviour that only if partition table is detected,
signatures are not wiped.

Also it removes check for block device - loop device can now
map partitions in-kernel, so using mkswap on disk image in file
should behave the same as on disk.

Also it adds warning that know signature was wiped.

Signed-off-by: Milan Broz <mbroz@redhat.com>
12 years agosu: fix compiler warning [-Wstrict-prototypes]
Karel Zak [Fri, 21 Sep 2012 10:38:18 +0000 (12:38 +0200)] 
su: fix compiler warning [-Wstrict-prototypes]

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agosu: add segmentation fault reporting of the child process
Ondrej Oprala [Tue, 11 Sep 2012 14:39:17 +0000 (16:39 +0200)] 
su: add segmentation fault reporting of the child process

Child processes that ended with segmentation fault previously
indicated this with return status only. The report is now more
verbose if core dump is allowed.

Improved-by: Pádraig Brady <P@draigBrady.com>
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
12 years agolsblk: fix processing of dm partition mappings
Peter Rajnoha [Thu, 20 Sep 2012 11:17:13 +0000 (13:17 +0200)] 
lsblk: fix processing of dm partition mappings

As blkid_devno_to_wholedisk returns parent dm device for
a partition mapping, the condition used in lsblk incorrectly
checked the parent-child relationship.

In this particular case, we need to process the dm partition
mapping like any other non-partition device as dm devices always
use proper holders/slaves sysfs hierarchy instead of
/sys/block/<parent>/<name> that is used for real partitions.

Example (test1 is a partition mapping and sdb1 is a real partition):
$ lsblk
NAME             MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                8:0    0  128M  0 disk
`-test (dm-0)    253:0    0  128M  0 dm
  `-test1 (dm-1) 253:1    0  127M  0 part
sdb                8:16   0  128M  0 disk
`-sdb1             8:17   0  127M  0 disk

Before this patch (test1 skipped!):
$ lsblk -s /dev/mapper/test1
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
test (dm-0) 253:0    0  128M  0 dm
`-sda         8:0    0  128M  0 disk

$ lsblk -s /dev/sdb1
NAME  MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sdb1    8:17   0  127M  0 disk
`-sdb   8:16   0  128M  0 disk

With this patch (test1 processed correctly):
$ lsblk -s /dev/mapper/test1
NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
test1 (dm-1)  253:1    0  127M  0 part
`-test (dm-0) 253:0    0  128M  0 dm
  `-sda         8:0    0  128M  0 disk

$ lsblk -s /dev/sdb1
NAME  MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sdb1    8:17   0  127M  0 disk
`-sdb   8:16   0  128M  0 disk

12 years agolib/sysfs: fix sysfs_devname_to_devno for dm partitions
Peter Rajnoha [Thu, 20 Sep 2012 07:39:57 +0000 (09:39 +0200)] 
lib/sysfs: fix sysfs_devname_to_devno for dm partitions

Partitions mapped by device-mapper are not like real partitions where
there's a /sys/block/<parent>/<name>/dev sysfs path. We need to look
at /sys/block/<name>/dev like we do for any other non-partition devices.
The mapped partition is not found otherwise.

For example, this bug shows up in lsblk while specifying a device
on command line while that device is a dm mapping over a partition:
$lsblk
NAME             MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                8:0    0  128M  0 disk
`-test (dm-0)    253:0    0  128M  0 dm
  `-test1 (dm-1) 253:1    0  127M  0 part

Before this patch:
$lsblk /dev/mapper/test1
lsblk: dm-1: unknown device name

With this patch:
$lsblk /dev/mapper/test1
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
test1 (dm-1) 253:1    0  127M  0 part

12 years agosetterm: make error message more informative
Petr Uzel [Thu, 20 Sep 2012 13:53:50 +0000 (15:53 +0200)] 
setterm: make error message more informative

If `setterm -dump` fails because of lack of permission to read
/dev/vcsa, it should not report that it couldn't read /dev/vcsa0.
This could be misleading if there is only /dev/vcsa, but not /dev/vcsa0.

Before:
$ ./setterm -dump
setterm: Couldn't read /dev/vcsa0

After:
$ ./setterm -dump
setterm: Couldn't read neither /dev/vcsa0 nor /dev/vcsa

(Note: /dev/vcsa0 does not exist and the user does not have read
permission on /dev/vcsa in this case).

Addresses: https://bugzilla.novell.com/show_bug.cgi?id=780615
Reported-by: Christopher Yeleighton <giecrilj@stegny.2a.pl>
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
12 years agosfdisk: Fix format specifiers for size_t
Thierry Reding [Wed, 19 Sep 2012 09:48:46 +0000 (11:48 +0200)] 
sfdisk: Fix format specifiers for size_t

The proper specifier for size_t is %zu. %lu will work fine on 64-bit
architectures but not on 32-bit.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
12 years agohwclock: don't warp the systemtime if the RTC is in UTC
Tom Gundersen [Thu, 20 Sep 2012 22:02:46 +0000 (22:02 +0000)] 
hwclock: don't warp the systemtime if the RTC is in UTC

A sideeffect of 839be2ba6b44fa9dc927f081d547ebadec9de19c is that we now
warp the systemtime according to the timezone, on the first call of
--systz. This is not always the correct thing to do, and causes a
regression for us in Arch Linux.

The behavior is correct if the RTC, and hence the systemtime, is
in localtime. However, if the systemtime is already in UTC we don't
want to touch it when we set the kernel timezone (which we still need to
do as some filesystems use this information).

An almost identical issue was also fixed in systemd commit
72edcff5db936e54cfc322d9392ec46e2428fd9b.

Signed-off-by: Tom Gundersen <teg@jklm.no>
12 years agohwclock: wait time in hwclock is not long enough for some ARM devices
Karel Zak [Fri, 21 Sep 2012 10:05:12 +0000 (12:05 +0200)] 
hwclock: wait time in hwclock is not long enough for some ARM devices

On Sun, Sep 16, 2012 at 02:11:48PM +0800, Queen Adam wrote:
> I'm using Archlinux ARM for my Melo A100 box.
> The hwclock always timeout when using select() in rtc.c.
>
> After I change the timeout from 5 to 10, the problem is solved.
>
> In fact the timeout in my ARM box seems only to be a little larger
> than 5s.

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agodocs: AUTHORS, NEWS: UTF-8 fixes.
Ville Skyttä [Sat, 15 Sep 2012 06:29:50 +0000 (09:29 +0300)] 
docs: AUTHORS, NEWS: UTF-8 fixes.

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
12 years agodocs: umount.8 syntax fix.
Ville Skyttä [Sat, 15 Sep 2012 06:29:49 +0000 (09:29 +0300)] 
docs: umount.8 syntax fix.

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
12 years agolibmount: append loop option when automatically create loopdev
Karel Zak [Tue, 18 Sep 2012 09:40:44 +0000 (11:40 +0200)] 
libmount: append loop option when automatically create loopdev

The loop option is optional, mount(8) is able to detect that the
source path is regular file (image) with known filesystem -- then a
loop device is automatically created. In this case we have to store
"loop" option to mtab on systems without autoclear loopdev flag.

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agolibmount: detach loopdev on umount if loop option in mtab
Karel Zak [Tue, 18 Sep 2012 09:22:17 +0000 (11:22 +0200)] 
libmount: detach loopdev on umount if loop option in mtab

[chroot-i486] root:/$ mount --version
mount from util-linux 2.22 (libmount 2.22.0: debug)
[chroot-i486] root:/$ losetup -a
[chroot-i486] root:/$ mount -oloop /tmp/foo_fs /tmp/bar_dir
[chroot-i486] root:/$ umount /tmp/foo_fs
[chroot-i486] root:/$ losetup -a
/dev/loop0: [2051]:387175 (/tmp/foo_fs)

Reported-by: g.esp@free.fr
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agortcwake: doesn't reset wakealarm
Giacomo [Wed, 12 Sep 2012 17:33:39 +0000 (17:33 +0000)] 
rtcwake: doesn't reset wakealarm

Disable an alarm use the same logic used to enable it: first try RTC_WKALM_SET
with the "enabled" flag set to false, if it fails fall back to RTC_AIE_OFF.

Signed-off-by: Giacomo <giacomo.perale@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agoagetty: add \4 and \6 issue file sequences to print IP addresses
Karel Zak [Thu, 13 Sep 2012 10:54:36 +0000 (12:54 +0200)] 
agetty: add \4 and \6 issue file sequences to print IP addresses

Based on Andrea Bonomi <a.bonomi@endian.com> ideas.

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agobuild-sys: simplify usrlib_execdir initialization
Karel Zak [Wed, 12 Sep 2012 16:09:28 +0000 (18:09 +0200)] 
build-sys: simplify usrlib_execdir initialization

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agobuild-sys: fix --localstatedir heuristics
Karel Zak [Wed, 12 Sep 2012 14:36:06 +0000 (16:36 +0200)] 
build-sys: fix --localstatedir heuristics

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agotests: remove encryption loopdev test
Karel Zak [Wed, 12 Sep 2012 12:49:49 +0000 (14:49 +0200)] 
tests: remove encryption loopdev test

Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agolibmount: don't remove user= when executed by root
Karel Zak [Wed, 12 Sep 2012 12:27:12 +0000 (14:27 +0200)] 
libmount: don't remove user= when executed by root

The original mount(8) allows to store arbitrary user= option to mtab
file if called by root user. For example:

  # mount -f foo /bar -t xxx -o rw,user=kzak

the new mount removes the 'user=' and 'users' options at all for root
user. This is regression. The original functionality is necessary by
'sshfs' where fuse writes to mtab file by mount(8).

Reported-by: Juergen Daubert <jue@jue.li> (and 'horrorStruck' on IRC)
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agolibmount: segfaults if neither /etc/filesystems nor/proc/filesystems exists
Karel Zak [Wed, 12 Sep 2012 09:57:19 +0000 (11:57 +0200)] 
libmount: segfaults if neither /etc/filesystems nor/proc/filesystems exists

Reported-by: Juergen Daubert <jue@jue.li>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agomount: losetup: remove obsolete encryption support
Ludwig Nussel [Tue, 11 Sep 2012 08:46:11 +0000 (10:46 +0200)] 
mount: losetup: remove obsolete encryption support

kernel cryptoloop is deprecated since ages and support for cryptoloop
in util-linux is incomplete/broken.
- no password hashing
- last 8 bit of key are always set to zero
- no binary keys possible (stops reading key at \n and \0)

In the past some Distros added the above features with patches. So
remove cryptoloop support from util-linux completely to make sure
people won't try using it.

Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agobuild-sys: remove static from config-gen.d/{devel,all}.conf
Karel Zak [Tue, 11 Sep 2012 08:06:23 +0000 (10:06 +0200)] 
build-sys: remove static from config-gen.d/{devel,all}.conf

It's impossible to compile static when gcc/ld is forced to
use GNU_RELRO and BIND_NOW for suid binaries (e.g. mount).

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agolibblkid: fix copyright noticed to be consistent (so all are LGPL)
Karel Zak [Tue, 11 Sep 2012 07:30:16 +0000 (09:30 +0200)] 
libblkid: fix copyright noticed to be consistent (so all are LGPL)

The libblkid library was intended to be released under the LGPL.
There is very little significant code in version.c; just a version
parser, and the original copyright holder (Theodore Ts'o,
tytso@mit.edu) has confirmed that he had intended to relicense all of
the files under the LGPL during a time when he was the sole author.

Acked-by: "Theodore Ts'o" <tytso@mit.edu>
Reported-by: John Calcote <john.calcote@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agohwclock: add a new --compare option
Ondrej Oprala [Wed, 29 Aug 2012 16:11:15 +0000 (18:11 +0200)] 
hwclock: add a new --compare option

The new option imitates adjtimex -c functionality and outputs
the drift in 10 second intervals.

[kzak@redhat.com: - coding style
                  - print hw and system time columns too]

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agoMerge https://github.com/hramrach/util-linux
Karel Zak [Mon, 10 Sep 2012 09:17:53 +0000 (11:17 +0200)] 
Merge https://github.com/hramrach/util-linux

12 years agolibmount: improve mnt_table_get_root_fs() docs
Karel Zak [Mon, 10 Sep 2012 08:30:11 +0000 (10:30 +0200)] 
libmount: improve mnt_table_get_root_fs() docs

Fix info about return value, improve description.

Reported-by: Amit <amit.uttam@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agowdctl: add fallbacks for old kernel headers
Karel Zak [Fri, 7 Sep 2012 16:08:55 +0000 (18:08 +0200)] 
wdctl: add fallbacks for old kernel headers

Reported-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agobuild-sys: add --disable-wdctl
Karel Zak [Fri, 7 Sep 2012 12:19:17 +0000 (14:19 +0200)] 
build-sys: add --disable-wdctl

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agoeject: robust strings usage [coverity scan]
Karel Zak [Fri, 7 Sep 2012 11:43:36 +0000 (13:43 +0200)] 
eject: robust strings usage [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agowhereis: improve readability for analysers
Karel Zak [Fri, 7 Sep 2012 11:34:38 +0000 (13:34 +0200)] 
whereis: improve readability for analysers

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agolib/pager: robust work with file descriptors [coverity scan]
Karel Zak [Fri, 7 Sep 2012 11:29:55 +0000 (13:29 +0200)] 
lib/pager: robust work with file descriptors [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agosulogin: cleanup file descriptors usage
Karel Zak [Fri, 7 Sep 2012 11:16:10 +0000 (13:16 +0200)] 
sulogin: cleanup file descriptors usage

 - use _FILENO macros rather than magic numbers
 - check for dup() result

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agoswitch_root: check open() return value [coverity scan]
Karel Zak [Fri, 7 Sep 2012 11:02:42 +0000 (13:02 +0200)] 
switch_root: check open() return value [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agoFix configure to work with multiarch distributions.
Michal Suchanek [Fri, 7 Sep 2012 10:55:48 +0000 (12:55 +0200)] 
Fix configure to work with multiarch distributions.

12 years agolib/sysfs: more robust sysfs_opendir() [coverity scan]
Karel Zak [Fri, 7 Sep 2012 10:15:39 +0000 (12:15 +0200)] 
lib/sysfs: more robust sysfs_opendir() [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agomark expected fallthrough for static analysers
Karel Zak [Fri, 7 Sep 2012 10:05:56 +0000 (12:05 +0200)] 
mark expected fallthrough for static analysers

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agotunelp: add missing break [coverity scan]
Karel Zak [Fri, 7 Sep 2012 10:00:53 +0000 (12:00 +0200)] 
tunelp: add missing break [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agogetopt: make the code more readable for analysers
Karel Zak [Fri, 7 Sep 2012 09:42:34 +0000 (11:42 +0200)] 
getopt: make the code more readable for analysers

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agonamei: remove dead code [coverity scan]
Karel Zak [Fri, 7 Sep 2012 09:39:38 +0000 (11:39 +0200)] 
namei: remove dead code [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agolibblkid: check fchmod() return value [coverity scan]
Karel Zak [Fri, 7 Sep 2012 09:00:54 +0000 (11:00 +0200)] 
libblkid: check fchmod() return value [coverity scan]

12 years agolibblkid: improve DBG() macro
Karel Zak [Fri, 7 Sep 2012 08:58:49 +0000 (10:58 +0200)] 
libblkid: improve DBG() macro

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agodocs: add note about /etc/pam.d/su-l to ReleaseNotes
Karel Zak [Wed, 5 Sep 2012 12:06:28 +0000 (14:06 +0200)] 
docs: add note about /etc/pam.d/su-l to ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agomount: fix man pahe typo in quota mount option names
Björn Jacke [Wed, 5 Sep 2012 11:39:48 +0000 (13:39 +0200)] 
mount: fix man pahe typo in quota mount option names

12 years agosu: move long options to main()
Karel Zak [Wed, 5 Sep 2012 09:26:20 +0000 (11:26 +0200)] 
su: move long options to main()

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agosu: verify writing to streams was successful
Karel Zak [Wed, 5 Sep 2012 09:21:07 +0000 (11:21 +0200)] 
su: verify writing to streams was successful

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agosu: more robust getpwuid() for GNU Hurt [coreutils 71b7ddc]
Karel Zak [Wed, 5 Sep 2012 09:13:34 +0000 (11:13 +0200)] 
su: more robust getpwuid() for GNU Hurt [coreutils 71b7ddc]

Let's support GNU Hurd over-engineering where a process can exist
without UID and getuid() returns -1 and sets errno.

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agobuild-sys: install su.1 if building su
Dave Reisner [Wed, 5 Sep 2012 02:31:03 +0000 (22:31 -0400)] 
build-sys: install su.1 if building su

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
12 years agowdctl: treat aligned translatable strings in a uniform manner
Benno Schulenberg [Fri, 31 Aug 2012 10:51:50 +0000 (12:51 +0200)] 
wdctl: treat aligned translatable strings in a uniform manner

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agowdctl: gettextize one forgotten word
Benno Schulenberg [Thu, 30 Aug 2012 19:08:47 +0000 (21:08 +0200)] 
wdctl: gettextize one forgotten word

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agotextual: add missing comma and colon in some help texts
Benno Schulenberg [Wed, 29 Aug 2012 19:32:22 +0000 (21:32 +0200)] 
textual: add missing comma and colon in some help texts

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agotextual: fix typos in messages
Yuri Chornoivan [Sat, 18 Aug 2012 18:47:08 +0000 (21:47 +0300)] 
textual: fix typos in messages

12 years agolibmount: document LIBMOUNT_DEBUG users
Davidlohr Bueso [Tue, 4 Sep 2012 13:58:06 +0000 (15:58 +0200)] 
libmount: document LIBMOUNT_DEBUG users

Update the manpages of programs that use this environment variable for
extra debugging information.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
12 years agoblkid: document LIBBLKID_DEBUG users
Davidlohr Bueso [Tue, 4 Sep 2012 13:58:02 +0000 (15:58 +0200)] 
blkid: document LIBBLKID_DEBUG users

Update the manpages of programs that use this environment variable for
extra debugging information.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
12 years agolsblk: add add_random columns
Milan Broz [Fri, 17 Aug 2012 18:25:26 +0000 (20:25 +0200)] 
lsblk: add add_random columns

Allow printing of queue/add_random attribute which describes
if device adds randomness to kernel RNG pool.

Signed-off-by: Milan Broz <mbroz@redhat.com>
12 years agorunuser: add note about PAM to man page
Karel Zak [Tue, 4 Sep 2012 14:53:22 +0000 (16:53 +0200)] 
runuser: add note about PAM to man page

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agodocs: add list of expected PAM config files
Karel Zak [Wed, 29 Aug 2012 16:02:24 +0000 (18:02 +0200)] 
docs: add list of expected PAM config files

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agorunuser: new command (derived from su(1))
Karel Zak [Wed, 29 Aug 2012 15:34:26 +0000 (17:34 +0200)] 
runuser: new command (derived from su(1))

 This command is based on su(1), the differences:

 - based on Fedora runuser su(1) patch
 - not installed with suid rights
 - allowed for root users only
 - don't ask for password
 - uses PAM session, for example:

$ cat /etc/pam.d/runuser
auth sufficient pam_rootok.so
session optional pam_keyinit.so revoke
session required pam_limits.so
session required pam_unix.so

$ cat /etc/pam.d/runuser-l
auth include runuser
session optional pam_keyinit.so force revoke
session include runuser

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agosu: move generic su code to su-common.c
Karel Zak [Tue, 28 Aug 2012 16:10:58 +0000 (18:10 +0200)] 
su: move generic su code to su-common.c

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agosu: add --group and --supp-group options
Karel Zak [Tue, 28 Aug 2012 14:32:28 +0000 (16:32 +0200)] 
su: add --group and --supp-group options

These options allow to specify alternative groups. The command
su(1) has to be executed by root. The implementation is based on
Fedora runuser(1) command.

For example:

 # su --group=kzak --supp-group=uuidd -
 # id
 uid=0(root) gid=1000(kzak) groups=0(root),985(uuidd),1000(kzak)

non-root user:

 $ su --group=kzak -
 su: only root can specify alternative groups

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agobuild-sys: add configure summary
Karel Zak [Wed, 29 Aug 2012 19:16:21 +0000 (21:16 +0200)] 
build-sys: add configure summary

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agocol: fix compiler warning [-Wstrict-prototypes]
Karel Zak [Wed, 29 Aug 2012 18:32:19 +0000 (20:32 +0200)] 
col: fix compiler warning [-Wstrict-prototypes]

text-utils/col.c:142:43: warning: function declaration isn’t a prototype [-Wstrict-prototypes]

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agofsck.cramfs: fix compiler warning [-Wpointer-arith]
Karel Zak [Wed, 29 Aug 2012 18:30:11 +0000 (20:30 +0200)] 
fsck.cramfs: fix compiler warning [-Wpointer-arith]

disk-utils/fsck.cramfs.c: In function ‘test_crc’:
disk-utils/fsck.cramfs.c:231:32: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
disk-utils/fsck.cramfs.c:233:24: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agobuild-sys: add another compiler warnings
Karel Zak [Wed, 29 Aug 2012 18:26:21 +0000 (20:26 +0200)] 
build-sys: add another compiler warnings

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agolibmount: use O_CLOEXEC everywhere
Karel Zak [Wed, 29 Aug 2012 18:08:18 +0000 (20:08 +0200)] 
libmount: use O_CLOEXEC everywhere

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agolibblkid: use O_CLOEXEC
Karel Zak [Wed, 29 Aug 2012 17:49:19 +0000 (19:49 +0200)] 
libblkid: use O_CLOEXEC

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agobuild-sys: release++ (v2.22) v2.22
Karel Zak [Tue, 4 Sep 2012 12:57:28 +0000 (14:57 +0200)] 
build-sys: release++ (v2.22)

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agodocs: update v2.22-ReleaseNotes
Karel Zak [Tue, 4 Sep 2012 12:36:16 +0000 (14:36 +0200)] 
docs: update v2.22-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agopo: merge changes
Karel Zak [Tue, 4 Sep 2012 12:23:25 +0000 (14:23 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agopo: update vi.po (from translationproject.org)
Trần Ngọc Quân [Tue, 4 Sep 2012 11:51:16 +0000 (13:51 +0200)] 
po: update vi.po (from translationproject.org)

12 years agopo: update uk.po (from translationproject.org)
Yuri Chornoivan [Tue, 4 Sep 2012 11:51:15 +0000 (13:51 +0200)] 
po: update uk.po (from translationproject.org)

12 years agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Tue, 4 Sep 2012 11:51:15 +0000 (13:51 +0200)] 
po: update pl.po (from translationproject.org)

12 years agopo: update nl.po (from translationproject.org)
Benno Schulenberg [Tue, 4 Sep 2012 11:51:15 +0000 (13:51 +0200)] 
po: update nl.po (from translationproject.org)

12 years agopo: update ja.po (from translationproject.org)
Takeshi Hamasaki [Tue, 4 Sep 2012 11:51:15 +0000 (13:51 +0200)] 
po: update ja.po (from translationproject.org)

12 years agopo: update fr.po (from translationproject.org)
David Prévot [Tue, 4 Sep 2012 11:51:15 +0000 (13:51 +0200)] 
po: update fr.po (from translationproject.org)

12 years agopo: update da.po (from translationproject.org)
Joe Hansen [Tue, 4 Sep 2012 11:51:15 +0000 (13:51 +0200)] 
po: update da.po (from translationproject.org)

12 years agopo: update cs.po (from translationproject.org)
Petr Písař [Tue, 4 Sep 2012 11:51:15 +0000 (13:51 +0200)] 
po: update cs.po (from translationproject.org)