]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
12 years agolibmount: fix mtab update for "none" source, fix leak stable/v2.19
Karel Zak [Wed, 20 Jul 2011 19:24:20 +0000 (21:24 +0200)] 
libmount: fix mtab update for "none" source, fix leak

tab_parse.c:mnt_parse_mountinfo_line parses "none" in src as NULL,

tab_update.c:fprintf_mtab_fs sets m1 to NULL instead of "none" and
returns -ENOMEM
tab_update.c:update_table says "write entry failed: Success", as errno
hasn't been set, and gotos to leave, leaving mtab not updated.

Addresses-debian-bug: 634871
Reported-by: Tomas Janousek <tomi@nomi.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agobuild-sys: release++ (v2.19.1) v2.19.1
Karel Zak [Mon, 2 May 2011 09:49:28 +0000 (11:49 +0200)] 
build-sys: release++ (v2.19.1)

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agodocs: update 2.19.1 ReleaseNotes
Karel Zak [Mon, 2 May 2011 09:46:08 +0000 (11:46 +0200)] 
docs: update 2.19.1 ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: non-linux fixup
Samuel Thibault [Wed, 20 Apr 2011 13:57:12 +0000 (15:57 +0200)] 
build-sys: non-linux fixup

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
13 years agobuild-sys: release++ (v2.19.1-rc1) v2.19.1-rc1
Karel Zak [Wed, 20 Apr 2011 09:39:22 +0000 (11:39 +0200)] 
build-sys: release++ (v2.19.1-rc1)

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: add v2.19.1 ReleaseNotes
Karel Zak [Wed, 20 Apr 2011 07:58:18 +0000 (09:58 +0200)] 
docs: add v2.19.1 ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: update AUTHORS file
Karel Zak [Wed, 20 Apr 2011 07:52:33 +0000 (09:52 +0200)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agopo: merge changes
Karel Zak [Wed, 20 Apr 2011 07:51:01 +0000 (09:51 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agopo: update fr.po (from translationproject.org)
David Prévot [Tue, 19 Apr 2011 13:22:34 +0000 (15:22 +0200)] 
po: update fr.po (from translationproject.org)

13 years agopo: update da.po (from translationproject.org)
Joe Hansen [Tue, 19 Apr 2011 13:22:34 +0000 (15:22 +0200)] 
po: update da.po (from translationproject.org)

13 years agotests: don't run mount/regfile test on old kernel
Karel Zak [Tue, 19 Apr 2011 11:39:35 +0000 (13:39 +0200)] 
tests: don't run mount/regfile test on old kernel

The /sys/.../loop/backing_file is available since 2.6.37.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotests: add test for RLIMIT_FSIZE issue
Karel Zak [Tue, 19 Apr 2011 10:22:06 +0000 (12:22 +0200)] 
tests: add test for RLIMIT_FSIZE issue

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: remove unused variable from test
Karel Zak [Tue, 19 Apr 2011 08:06:37 +0000 (10:06 +0200)] 
libmount: remove unused variable from test

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotests: use libmount tab update tests for UID=0 only
Karel Zak [Tue, 19 Apr 2011 08:04:33 +0000 (10:04 +0200)] 
tests: use libmount tab update tests for UID=0 only

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomount: remove unused variable
Karel Zak [Tue, 19 Apr 2011 07:17:12 +0000 (09:17 +0200)] 
mount: remove unused variable

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: block signals when update utab
Karel Zak [Wed, 13 Apr 2011 12:37:44 +0000 (14:37 +0200)] 
libmount: block signals when update utab

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: more robust mtab and utab update (CVE-2011-1676, CVE-2011-1677)
Karel Zak [Wed, 13 Apr 2011 09:02:34 +0000 (11:02 +0200)] 
libmount: more robust mtab and utab update (CVE-2011-1676, CVE-2011-1677)

http://thread.gmane.org/gmane.comp.security.oss.general/4374

Changes:

 - always use temporary file

 - use fflush() for the temporary file

 - check fprintf() return value

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomount: use lock from mnt_update_table()
Karel Zak [Wed, 13 Apr 2011 08:49:26 +0000 (10:49 +0200)] 
mount: use lock from mnt_update_table()

The mnt_update_table() is able to create a mtab lock now.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoumount: block signals when umounting and updating mtab (CVE-2011-1676, CVE-2011-1677)
Karel Zak [Wed, 13 Apr 2011 08:11:50 +0000 (10:11 +0200)] 
umount: block signals when umounting and updating mtab (CVE-2011-1676, CVE-2011-1677)

http://thread.gmane.org/gmane.comp.security.oss.general/4374

Based on CVE-2011-1089.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomount: use fflush() and temporary file for mtab updates (CVE-2011-1089)
Karel Zak [Tue, 12 Apr 2011 20:52:33 +0000 (22:52 +0200)] 
mount: use fflush() and temporary file for mtab updates (CVE-2011-1089)

http://thread.gmane.org/gmane.comp.security.oss.general/4374

Changes:

  - force mount(8) to use /etc/mtab.tmp file every time. The original
    code used the tmp file for remount/move operations only.

  - call and check fflush() return code for the tmp file

Note mount(8) blocks all signals when writing to mtab, so it's not
affected by SIGXFSZ and the mtab lock file is always removed.

This patch does not fix the same issue in umount(8) and libmount.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibblkid: remove test for non-zero head count in FAT superblock probe.
Nick Holloway [Sun, 10 Apr 2011 12:35:56 +0000 (13:35 +0100)] 
libblkid: remove test for non-zero head count in FAT superblock probe.

This change enables the auto-detection of the internal storage on a VTech
Kidizoom camera, which has a zero head count value in the superblock.

Microsoft documentation, "FAT: General Overview of On-Disk Format", states
that the sectors and heads fields are only relevant for media that have
a geometry.

The Linux kernel also does not require a non-zero head count, and can
manually mount the filesystem.

Signed-off-by: Nick Holloway <Nick.Holloway@pyrites.org.uk>
13 years agolibmount: avoid redundant declaration of mnt_context_do_umount
Jan Engelhardt [Sat, 9 Apr 2011 12:11:35 +0000 (14:11 +0200)] 
libmount: avoid redundant declaration of mnt_context_do_umount

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
13 years agoreadprofile: don't stop parsing at __init_end
Po-Yu Chuang [Fri, 8 Apr 2011 09:35:53 +0000 (17:35 +0800)] 
readprofile: don't stop parsing at __init_end

Some architectures like ARM place __init_end before .text section.
If any function in .init section is hit while profiling, readprofile
stops at __init_end.  That means if we enable profiling at boot time,
the profiler probably hits init functions and readprofile does not
work well unless we reset profiling buffer with -r option.

Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
13 years agomount: add note about blank lines to fstab.5
Karel Zak [Tue, 12 Apr 2011 08:05:25 +0000 (10:05 +0200)] 
mount: add note about blank lines to fstab.5

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=694648
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoumount: support non-canonical devnames in mtab
Karel Zak [Mon, 11 Apr 2011 12:05:57 +0000 (14:05 +0200)] 
umount: support non-canonical devnames in mtab

Addresses: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/755193
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agosetterm: segfault with long dump file name
Sami Kerola [Sat, 2 Apr 2011 20:56:50 +0000 (22:56 +0200)] 
setterm: segfault with long dump file name

The patch will make too long path to be truncated to MAX_PATH
lenght. If user supplies too long file name that is caught at
fopen. Some users might find this unintuitive, so the altered
behavior will be mantioned in manual page.

Bug in earlier version was visible with a command bellow.

setterm -dump -file $(for i in $(seq 254); do printf x ; done)

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agorev: memory leak fix
Sami Kerola [Sat, 2 Apr 2011 16:11:08 +0000 (18:11 +0200)] 
rev: memory leak fix

Moving the malloc out of loop will make leak to disappear, and
the command might run few jiffie quicker when there are 1+N
arguments.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agolibmount: fix parsing of mountinfo from 2.6.39
Karel Zak [Tue, 5 Apr 2011 12:17:51 +0000 (14:17 +0200)] 
libmount: fix parsing of mountinfo from 2.6.39

The /proc/self/mountinfo file uses " - " field as a separator between
optional fields and next fields in the file. The '-' char could be
used in the fields (for example in UUIDs), so it's necessary to check
for whole " - " string rather than for '-' char only.

Reported-by: "Aneesh Kumar K. V" <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: support /run/mount rather than /dev/.mount
Karel Zak [Thu, 31 Mar 2011 19:26:57 +0000 (21:26 +0200)] 
libmount: support /run/mount rather than /dev/.mount

The /run directory should be preferred on distributions where this
directory exists.

http://thread.gmane.org/gmane.linux.redhat.fedora.devel/146976

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolscpu: detect sun4{u,v} in /proc/cpuinfo for sparc64
Karel Zak [Thu, 31 Mar 2011 12:30:06 +0000 (14:30 +0200)] 
lscpu: detect sun4{u,v} in /proc/cpuinfo for sparc64

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolscpu: fix op-mode for /{sys,proc} dumps
Karel Zak [Thu, 31 Mar 2011 11:09:50 +0000 (13:09 +0200)] 
lscpu: fix op-mode for /{sys,proc} dumps

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolscpu: fix threads-per-core calculation
Karel Zak [Thu, 31 Mar 2011 10:55:13 +0000 (12:55 +0200)] 
lscpu: fix threads-per-core calculation

On Thu, Mar 24, 2011 at 01:45:34PM +0100, Jan Engelhardt wrote:
> On a 24-thread/6-core SPARC T1, lscpu would wrongly output "5
> threads per core".
>
> It seems that the 6c T1 is simply an 8c T1 where 2c are disabled
> (offering a lesser model for a lower price, and all that marketing
> fluff). So the machine description header of the 6c T1 reports 32
> threads, but only goes on to provide 24 elements thereafter, which
> is why Linux will report threads 24-31 as "offline". So far so good.
>
> But lscpu would take the number of all (online and offline) threads
> (32) and divides it by the number of online cores (6), which yields
> an odd 5.33 threads/core.
>
> Simply pick the number of online threads.

Based on Jan's patch.

Reported-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: fix checktty test to compile with old glibc
Karel Zak [Thu, 31 Mar 2011 09:39:01 +0000 (11:39 +0200)] 
login: fix checktty test to compile with old glibc

Reported-by: "Gabor Z. Papp" <gzp@papp.hu>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: fix memory leak in cache
Karel Zak [Wed, 30 Mar 2011 21:52:56 +0000 (23:52 +0200)] 
libmount: fix memory leak in cache

Reported-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: small lock code cleanup
Karel Zak [Wed, 30 Mar 2011 11:58:04 +0000 (13:58 +0200)] 
libmount: small lock code cleanup

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: block signals when writing to mtab
Karel Zak [Wed, 30 Mar 2011 07:30:05 +0000 (09:30 +0200)] 
libmount: block signals when writing to mtab

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoblkid: small fix for safe_print()
Sergey Gusarov [Fri, 25 Mar 2011 13:54:05 +0000 (16:54 +0300)] 
blkid: small fix for safe_print()

This small fix makes it possible to print the first unprintable character
with code 128 from ASCII table.

Signed-off-by: Sergey Gusarov <laborer2008@gmail.com>
13 years agoumount: use UMOUNT_NOFOLLOW for non-root users
Karel Zak [Tue, 29 Mar 2011 08:19:56 +0000 (10:19 +0200)] 
umount: use UMOUNT_NOFOLLOW for non-root users

The UMOUNT_NOFOLLOW umount2() flag is supported since kernel 2.6.34.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoinclude: [c.h] add definition wrappers for old libc versions
Davidlohr Bueso [Tue, 22 Mar 2011 13:42:09 +0000 (10:42 -0300)] 
include: [c.h] add definition wrappers for old libc versions

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: create a default lock for mtab update
Karel Zak [Mon, 28 Mar 2011 10:40:24 +0000 (12:40 +0200)] 
libmount: create a default lock for mtab update

Now it's necessary to explicitly create a lock for mnt_update_table().
It seems better to create the lock in mnt_update_table() by default to
skip this extra step.

Reported-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoddate: remove non-ascii chars from ddate
Karel Zak [Fri, 18 Mar 2011 09:25:42 +0000 (10:25 +0100)] 
ddate: remove non-ascii chars from ddate

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotailf: support --lines 0
Karel Zak [Fri, 18 Mar 2011 08:52:07 +0000 (09:52 +0100)] 
tailf: support --lines 0

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofdisk: check index before access to array [coverity scan]
Karel Zak [Thu, 17 Mar 2011 21:58:05 +0000 (22:58 +0100)] 
fdisk: check index before access to array [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibblkid: use blkid_probe_get_buffer() more carefully
Karel Zak [Wed, 16 Mar 2011 13:06:23 +0000 (14:06 +0100)] 
libblkid: use blkid_probe_get_buffer() more carefully

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: cleanup *_do_[u]mount() return codes and docs
Karel Zak [Mon, 14 Mar 2011 13:33:53 +0000 (14:33 +0100)] 
libmount: cleanup *_do_[u]mount() return codes and docs

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotests: update GPT test
Karel Zak [Fri, 11 Mar 2011 15:21:20 +0000 (16:21 +0100)] 
tests: update GPT test

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoblkid: fix double free [coverity scan]
Karel Zak [Fri, 11 Mar 2011 15:12:20 +0000 (16:12 +0100)] 
blkid: fix double free [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolib: [tt.c] dereferencing data before a null check [coverity scan]
Karel Zak [Fri, 11 Mar 2011 14:00:30 +0000 (15:00 +0100)] 
lib: [tt.c] dereferencing data before a null check [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotailf: fix open() return value check [coverity scan]
Karel Zak [Fri, 11 Mar 2011 13:25:45 +0000 (14:25 +0100)] 
tailf: fix open() return value check [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: keep code more readable for analyzers [coverity scan]
Karel Zak [Fri, 11 Mar 2011 12:57:14 +0000 (13:57 +0100)] 
libmount: keep code more readable for analyzers [coverity scan]

This is not a bug ('ent' is always non-NULL is 'm' is non-NULL), but
let's keep static analyzes and humans who read the code happy.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibblkid: fix typo in *_to_cpu() usage in raid detection [coverity scan]
Karel Zak [Fri, 11 Mar 2011 12:40:33 +0000 (13:40 +0100)] 
libblkid: fix typo in *_to_cpu() usage in raid detection [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolsblk: fix strtoul() usage [coverity scan]
Karel Zak [Fri, 11 Mar 2011 12:36:00 +0000 (13:36 +0100)] 
lsblk: fix strtoul() usage [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibblkid: add PART_ENTRY_* to docs
Karel Zak [Fri, 11 Mar 2011 12:31:07 +0000 (13:31 +0100)] 
libblkid: add PART_ENTRY_* to docs

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofindmnt: check mnt_tab_next_fs() return code [coverity scan]
Karel Zak [Fri, 11 Mar 2011 12:23:17 +0000 (13:23 +0100)] 
findmnt: check mnt_tab_next_fs() return code [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolsblk: use ssize_t for readlink() return code
Karel Zak [Fri, 11 Mar 2011 09:49:08 +0000 (10:49 +0100)] 
lsblk: use ssize_t for readlink() return code

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoblkid: don't ignore -i
Karel Zak [Tue, 8 Mar 2011 12:32:05 +0000 (13:32 +0100)] 
blkid: don't ignore -i

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoinclude: [c.h]: typeof to __typeof__ fix
Sami Kerola [Sun, 27 Feb 2011 12:05:09 +0000 (13:05 +0100)] 
include: [c.h]: typeof to __typeof__ fix

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agologger: fix variable type compiler warning
Sami Kerola [Thu, 24 Feb 2011 19:16:39 +0000 (20:16 +0100)] 
logger: fix variable type compiler warning

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agomount: update mtab on "-f" and compiled with libmount
Karel Zak [Mon, 7 Mar 2011 09:06:24 +0000 (10:06 +0100)] 
mount: update mtab on "-f" and compiled with libmount

Reported-by: silvan minghetti <bu1137@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoumount: segfaults with inconsistent entry in /etc/fstab
Karel Zak [Fri, 4 Mar 2011 13:44:29 +0000 (14:44 +0100)] 
umount: segfaults with inconsistent entry in /etc/fstab

Addresses: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/726283
Reported-by: Greg Brockman <gdb@gregbrockman.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibblkid: fix gcc warnings
Karel Zak [Tue, 1 Mar 2011 14:31:49 +0000 (15:31 +0100)] 
libblkid: fix gcc warnings

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibblkid: fix EFI GPT uuid byte order
Karel Zak [Tue, 1 Mar 2011 09:01:21 +0000 (10:01 +0100)] 
libblkid: fix EFI GPT uuid byte order

Intel uses little-endians for UUID, the rest of the sane world uses 16
byte big-endian array...

Reported-by: Andrew Lutomirski <luto@mit.edu>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibblkid: try to detect if PT is newer than LVM
Karel Zak [Thu, 24 Feb 2011 13:03:44 +0000 (14:03 +0100)] 
libblkid: try to detect if PT is newer than LVM

LVM (pvcreate) wipes the begin of the device. If there is a PT in the
wiped area then LVM signature is obsolete.

 # pvcreate /dev/sdb
 # fdisk /dev/sdb

old version:
 # blkid -p -o udev /dev/sdb
 ID_FS_TYPE=LVM2_member

new version:
 # blkid -p -o udev /dev/sdb
 ID_PART_TABLE_TYPE=dos

Reported-by: Matej Cepl <mcepl@redhat.com>
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=679799
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolsblk: bitwise or TT_FL_ASCII with tt_flags instead of setting
Dave Reisner [Mon, 21 Feb 2011 13:51:24 +0000 (08:51 -0500)] 
lsblk: bitwise or TT_FL_ASCII with tt_flags instead of setting

Signed-off-by: Dave Reisner <d@falconindy.com>
13 years agoscriptreplay: bug in argument check
Sami Kerola [Sun, 20 Feb 2011 12:21:17 +0000 (13:21 +0100)] 
scriptreplay: bug in argument check

Number of arguments cannot be at the same time too many and few.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoscript: fix compiler warnings
Sami Kerola [Sun, 20 Feb 2011 12:21:13 +0000 (13:21 +0100)] 
script: fix compiler warnings

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agolib: [strutils.c] more robust strtol checks
Karel Zak [Mon, 21 Feb 2011 14:35:04 +0000 (15:35 +0100)] 
lib: [strutils.c] more robust strtol checks

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotests: add tests for [u]mount regular file
Karel Zak [Mon, 21 Feb 2011 14:12:30 +0000 (15:12 +0100)] 
tests: add tests for [u]mount regular file

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoumount: allow unmounting loopdev specified by associated file
Petr Uzel [Thu, 17 Feb 2011 11:52:43 +0000 (12:52 +0100)] 
umount: allow unmounting loopdev specified by associated file

Make it possible to unmount a filesystem on a loop device if it is
specified by associated backing file. It does not attempt to unmount
anything if there are more than one loop device associated with the
given file.

Umount looks for associated loopdevice(s) only if umount is called
with the regular file as an argument.

Before:
mount -o loop -t ext2 img mnt
umount -v img
> Could not find /home/puzel/upstream/util-linux/img in mtab
> umount: img: not mounted

After:
mount -o loop -t ext2 img mnt
umount -v img
> img is associated with /dev/loop0, trying to unmount it
> /dev/loop0 has been unmounted

[kzak@redhat.com: - fix memory leak in lomount.c]

Addresses: https://bugzilla.novell.com/show_bug.cgi?id=666161
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolsblk: fix readlink() usage
Karel Zak [Fri, 18 Feb 2011 13:36:04 +0000 (14:36 +0100)] 
lsblk: fix readlink() usage

Reported-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agochsh: fix gcc link() warn_unused_result warning
Karel Zak [Thu, 17 Feb 2011 11:00:36 +0000 (12:00 +0100)] 
chsh: fix gcc link() warn_unused_result warning

setpwnam.c:176:9: warning: ignoring return value of ‘link’, declared with attribute warn_unused_result

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofsck: fix -C parsing
Karel Zak [Thu, 17 Feb 2011 10:56:51 +0000 (11:56 +0100)] 
fsck: fix -C parsing

Reported-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agochsh: fix small memory leak
Karel Zak [Thu, 17 Feb 2011 10:23:24 +0000 (11:23 +0100)] 
chsh: fix small memory leak

Reported-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: does not ignore setgid() return code for non-roots
Karel Zak [Thu, 17 Feb 2011 10:16:43 +0000 (11:16 +0100)] 
login: does not ignore setgid() return code for non-roots

Reported-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofdisk: more robust whole-disk detection
Karel Zak [Thu, 17 Feb 2011 10:02:26 +0000 (11:02 +0100)] 
fdisk: more robust whole-disk detection

In lib/wholedisk.c, i is set to 0. If fd was a -1, then at
line 18 geometry.start is used without it being initialized.

Reported-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibuuid: do not use invalid file descriptor
Petr Uzel [Mon, 14 Feb 2011 13:43:25 +0000 (14:43 +0100)] 
libuuid: do not use invalid file descriptor

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agolibuuid: manpage spelling fixes
Petr Uzel [Mon, 14 Feb 2011 13:43:24 +0000 (14:43 +0100)] 
libuuid: manpage spelling fixes

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agolibuuid: fix test in get_clock()
Petr Uzel [Mon, 14 Feb 2011 13:43:23 +0000 (14:43 +0100)] 
libuuid: fix test in get_clock()

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agouuidd: fix manpage: libuuid(3) does not exist
Petr Uzel [Mon, 14 Feb 2011 13:43:22 +0000 (14:43 +0100)] 
uuidd: fix manpage: libuuid(3) does not exist

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agolib: [strutils] avoid integer overflow on large values
Dave Reisner [Tue, 15 Feb 2011 09:06:08 +0000 (10:06 +0100)] 
lib: [strutils] avoid integer overflow on large values

This is visible on a 2TB disk via lsblk, where a large partition
incorrectly displays as 1.171798692T instead of 1.8T. This is
corrected by using a uint64_t type instead of a simple int --
consistant with the type used in lsblk.c to represent the raw size in
bytes.

[kzak@redhat.com: - add EiB support
                  - add size_to_human_string() to regression tests]

Signed-off-by: Dave Reisner <d@falconindy.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add fallbacks for old systems without umount2() syscall
Karel Zak [Fri, 11 Feb 2011 09:45:09 +0000 (10:45 +0100)] 
libmount: add fallbacks for old systems without umount2() syscall

Reported-by: Peter Breitenlohner <peb@mppmu.mpg.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoinclude: [at.h]: include c.h for PATH_MAX
Karel Zak [Fri, 11 Feb 2011 09:36:12 +0000 (10:36 +0100)] 
include: [at.h]: include c.h for PATH_MAX

Reported-by: Peter Breitenlohner <peb@mppmu.mpg.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: replace mkostmps() with more portable mkstemp()
Karel Zak [Fri, 11 Feb 2011 09:18:00 +0000 (10:18 +0100)] 
libmount: replace mkostmps() with more portable mkstemp()

Reported-by: Peter Breitenlohner <peb@mppmu.mpg.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: don't build lsblk on Linux without openat()
Karel Zak [Fri, 11 Feb 2011 08:42:49 +0000 (09:42 +0100)] 
build-sys: don't build lsblk on Linux without openat()

Reported-by: Peter Breitenlohner <peb@mppmu.mpg.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agopartx, lsblk: fix gettext calls
Karel Zak [Fri, 11 Feb 2011 08:06:27 +0000 (09:06 +0100)] 
partx, lsblk: fix gettext calls

Reported-by: Peter Breitenlohner <peb@mppmu.mpg.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: release++ (v2.19) v2.19
Karel Zak [Thu, 10 Feb 2011 08:37:47 +0000 (09:37 +0100)] 
build-sys: release++ (v2.19)

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: update v2.19 ReleaseNotes
Karel Zak [Thu, 10 Feb 2011 08:27:06 +0000 (09:27 +0100)] 
docs: update v2.19 ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: update AUTHORS file
Karel Zak [Thu, 10 Feb 2011 08:20:02 +0000 (09:20 +0100)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agopo: merge changes
Karel Zak [Thu, 10 Feb 2011 08:18:11 +0000 (09:18 +0100)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Thu, 10 Feb 2011 08:14:50 +0000 (09:14 +0100)] 
po: update pl.po (from translationproject.org)

13 years agopo: update nl.po (from translationproject.org)
Benno Schulenberg [Thu, 10 Feb 2011 08:14:50 +0000 (09:14 +0100)] 
po: update nl.po (from translationproject.org)

13 years agopo: update fr.po (from translationproject.org)
David Prévot [Thu, 10 Feb 2011 08:14:50 +0000 (09:14 +0100)] 
po: update fr.po (from translationproject.org)

13 years agopo: update da.po (from translationproject.org)
Joe Hansen [Thu, 10 Feb 2011 08:14:50 +0000 (09:14 +0100)] 
po: update da.po (from translationproject.org)

13 years agopo: update cs.po (from translationproject.org)
Petr Písař [Thu, 10 Feb 2011 08:14:49 +0000 (09:14 +0100)] 
po: update cs.po (from translationproject.org)

13 years agoinclude: [c.h]: add unused attribute to ignore_result()
Karel Zak [Wed, 9 Feb 2011 19:37:08 +0000 (20:37 +0100)] 
include: [c.h]: add unused attribute to ignore_result()

unfortunately, gcc 4.6

void fn (void) {
int foo;
foo = bar ();
}

evaluates that foo is never used. The __attribute__((unused)) is
necessary...

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotests: fix libmount test
Karel Zak [Wed, 9 Feb 2011 14:02:41 +0000 (15:02 +0100)] 
tests: fix libmount test

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibuuid: do not check for EAGAIN after flock()
Petr Uzel [Wed, 9 Feb 2011 12:14:04 +0000 (13:14 +0100)] 
libuuid: do not check for EAGAIN after flock()

As per flock() manpage, flock() does not set errno=EAGAIN.

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agolibmount: do not check for EAGAIN after flock()
Petr Uzel [Wed, 9 Feb 2011 12:13:49 +0000 (13:13 +0100)] 
libmount: do not check for EAGAIN after flock()

As per flock() manpage, flock() does not set errno=EAGAIN.

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agomount: add rootcontext= for tmpfs on SELinux boxes
Karel Zak [Wed, 9 Feb 2011 13:15:02 +0000 (14:15 +0100)] 
mount: add rootcontext= for tmpfs on SELinux boxes

Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=476964
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=676100
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoinclude: [c.h]: fix __alloc_size__ test
Karel Zak [Tue, 8 Feb 2011 15:35:41 +0000 (16:35 +0100)] 
include: [c.h]: fix __alloc_size__ test

Reported-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>