]> err.no Git - util-linux/log
util-linux
16 years agoMerge commit 'origin/stable/v2.13' into stable/v2.13
LaMont Jones [Sat, 19 Jan 2008 15:01:14 +0000 (08:01 -0700)]
Merge commit 'origin/stable/v2.13' into stable/v2.13

16 years agobuild-sys: release++ (2.13.1)
Karel Zak [Wed, 16 Jan 2008 12:40:13 +0000 (13:40 +0100)]
build-sys: release++ (2.13.1)

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agodocs: update ReleseNotes
Karel Zak [Wed, 16 Jan 2008 12:11:24 +0000 (13:11 +0100)]
docs: update ReleseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agopo: merge files
Karel Zak [Wed, 16 Jan 2008 12:08:04 +0000 (13:08 +0100)]
po: merge files

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agodocs: update AUTHORS file
Karel Zak [Wed, 16 Jan 2008 11:38:31 +0000 (12:38 +0100)]
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agopo: update vi.po (from translationproject.org)
Clytie Siddall [Wed, 16 Jan 2008 11:35:56 +0000 (12:35 +0100)]
po: update vi.po (from translationproject.org)

16 years agopo: update uk.po (from translationproject.org)
Maxim V. Dziumanenko [Wed, 16 Jan 2008 11:35:56 +0000 (12:35 +0100)]
po: update uk.po (from translationproject.org)

16 years agopo: update tr.po (from translationproject.org)
Nilgün Belma Bugüner [Wed, 16 Jan 2008 11:35:56 +0000 (12:35 +0100)]
po: update tr.po (from translationproject.org)

16 years agopo: update sv.po (from translationproject.org)
Daniel Nylander [Wed, 16 Jan 2008 11:35:56 +0000 (12:35 +0100)]
po: update sv.po (from translationproject.org)

16 years agopo: update sl.po (from translationproject.org)
Simon Mihevc [Wed, 16 Jan 2008 11:35:56 +0000 (12:35 +0100)]
po: update sl.po (from translationproject.org)

16 years agopo: update ru.po (from translationproject.org)
Pavel Maryanov [Wed, 16 Jan 2008 11:35:56 +0000 (12:35 +0100)]
po: update ru.po (from translationproject.org)

16 years agopo: update pt_BR.po (from translationproject.org)
Rodrigo Stulzer Lopes [Wed, 16 Jan 2008 11:35:56 +0000 (12:35 +0100)]
po: update pt_BR.po (from translationproject.org)

16 years agopo: update pl.po (from translationproject.org)
Andrzej Krzysztofowicz [Wed, 16 Jan 2008 11:35:56 +0000 (12:35 +0100)]
po: update pl.po (from translationproject.org)

16 years agopo: update nl.po (from translationproject.org)
Benno Schulenberg [Wed, 16 Jan 2008 11:35:56 +0000 (12:35 +0100)]
po: update nl.po (from translationproject.org)

16 years agopo: update ja.po (from translationproject.org)
Daisuke Yamashita [Wed, 16 Jan 2008 11:35:55 +0000 (12:35 +0100)]
po: update ja.po (from translationproject.org)

16 years agopo: update it.po (from translationproject.org)
Marco Colombo [Wed, 16 Jan 2008 11:35:55 +0000 (12:35 +0100)]
po: update it.po (from translationproject.org)

16 years agopo: update id.po (from translationproject.org)
Arif E. Nugroho [Wed, 16 Jan 2008 11:35:55 +0000 (12:35 +0100)]
po: update id.po (from translationproject.org)

16 years agopo: update hu.po (from translationproject.org)
Gabor Kelemen [Wed, 16 Jan 2008 11:35:55 +0000 (12:35 +0100)]
po: update hu.po (from translationproject.org)

16 years agopo: update fr.po (from translationproject.org)
Michel Robitaille [Wed, 16 Jan 2008 11:35:55 +0000 (12:35 +0100)]
po: update fr.po (from translationproject.org)

16 years agopo: update fi.po (from translationproject.org)
Lauri Nurmi [Wed, 16 Jan 2008 11:35:55 +0000 (12:35 +0100)]
po: update fi.po (from translationproject.org)

16 years agopo: update eu.po (from translationproject.org)
Mikel Olasagasti [Wed, 16 Jan 2008 11:35:55 +0000 (12:35 +0100)]
po: update eu.po (from translationproject.org)

16 years agopo: update et.po (from translationproject.org)
Meelis Roos [Wed, 16 Jan 2008 11:35:55 +0000 (12:35 +0100)]
po: update et.po (from translationproject.org)

16 years agopo: update es.po (from translationproject.org)
Santiago Vila Doncel [Wed, 16 Jan 2008 11:35:54 +0000 (12:35 +0100)]
po: update es.po (from translationproject.org)

16 years agopo: update de.po (from translationproject.org)
Michael Piefel [Wed, 16 Jan 2008 11:35:54 +0000 (12:35 +0100)]
po: update de.po (from translationproject.org)

16 years agopo: update da.po (from translationproject.org)
Claus Hindsgaul [Wed, 16 Jan 2008 11:35:54 +0000 (12:35 +0100)]
po: update da.po (from translationproject.org)

16 years agopo: update cs.po (from translationproject.org)
Petr Pisar [Wed, 16 Jan 2008 11:35:54 +0000 (12:35 +0100)]
po: update cs.po (from translationproject.org)

16 years agopo: update ca.po (from translationproject.org)
Josep Puigdemont [Wed, 16 Jan 2008 11:35:54 +0000 (12:35 +0100)]
po: update ca.po (from translationproject.org)

16 years agoMerge commit 'origin/stable/v2.13' into stable/v2.13
LaMont Jones [Tue, 15 Jan 2008 04:37:13 +0000 (21:37 -0700)]
Merge commit 'origin/stable/v2.13' into stable/v2.13

16 years agosys-utils: correct setarch.8 manpage link creation
Frédéric Bothamy [Sun, 13 Jan 2008 05:35:51 +0000 (22:35 -0700)]
sys-utils: correct setarch.8 manpage link creation

At least on Debian, .so commands are relative to the man directory
(e.g., /usr/share/man), not to the subdirectory:
    % man i386
    man: can't open /usr/share/man/setarch.8: No such file or directory
    No manual entry for i386

See also http://bugs.debian.org/453245

Addresses-Debian-Bug: #453245
Signed-off-by: Frédéric Bothamy <frederic.bothamy@free.fr>
Signed-off-by: LaMont Jones <lamont@debian.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agochangelog: release
LaMont Jones [Sat, 12 Jan 2008 05:32:37 +0000 (22:32 -0700)]
changelog: release

16 years agohwclockfirst.sh: yet more tweaks for LSB init
LaMont Jones [Wed, 9 Jan 2008 04:29:32 +0000 (21:29 -0700)]
hwclockfirst.sh: yet more tweaks for LSB init

Addresses-Debian-Bug: 459760
Signed-off-by: LaMont Jones <lamont@debian.org>
16 years agochangelog: release
LaMont Jones [Mon, 7 Jan 2008 03:26:12 +0000 (20:26 -0700)]
changelog: release

16 years agoMerge commit 'origin/stable/v2.13' into stable/v2.13
LaMont Jones [Mon, 7 Jan 2008 03:20:08 +0000 (20:20 -0700)]
Merge commit 'origin/stable/v2.13' into stable/v2.13

16 years agorenice: correctly detect errors in arguments
LaMont Jones [Mon, 7 Jan 2008 02:53:56 +0000 (19:53 -0700)]
renice: correctly detect errors in arguments

renice was using atoi(), which does no error detection, meaning that:
"renice +20 blah" was accepted as valid.

Addresses-Debian-Bug: 385245
Signed-off-by: LaMont Jones <lamont@debian.org>
16 years agohwclock.sh: add full path to comment
LaMont Jones [Mon, 7 Jan 2008 02:27:01 +0000 (19:27 -0700)]
hwclock.sh: add full path to comment

Addresses-Debian-Bug: 418107
Signed-off-by: LaMont Jones <lamont@debian.org>
16 years agometa: mount should pre-depend on its libs
LaMont Jones [Mon, 7 Jan 2008 01:13:55 +0000 (18:13 -0700)]
meta: mount should pre-depend on its libs

Signed-off-by: LaMont Jones <lamont@debian.org>
16 years agochangelog: release
LaMont Jones [Sun, 6 Jan 2008 19:50:34 +0000 (12:50 -0700)]
changelog: release

16 years agohwclockfirst: more LSB init cleanup
LaMont Jones [Sun, 6 Jan 2008 16:54:17 +0000 (09:54 -0700)]
hwclockfirst: more LSB init cleanup

Addresses-Debian-Bug: 458346
Signed-off-by: LaMont Jones <lamont@debian.org>
16 years agobuild-sys: release++ (-rc2)
Karel Zak [Wed, 2 Jan 2008 13:22:22 +0000 (14:22 +0100)]
build-sys: release++ (-rc2)

Increment release number to v2.13.1-rc2

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agopo: update po files
Karel Zak [Wed, 2 Jan 2008 13:18:46 +0000 (14:18 +0100)]
po: update po files

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agodocs: update ReleaseNotes
Karel Zak [Wed, 2 Jan 2008 12:58:58 +0000 (13:58 +0100)]
docs: update ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agodocs: update AUTHORS file, add all translators
Karel Zak [Wed, 2 Jan 2008 12:40:00 +0000 (13:40 +0100)]
docs: update AUTHORS file, add all translators

This patch also merges TRANSLATORS and CONTRIBUTORS to the one list
only.  It's more simple to maintain this one list.

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agopo: add pl.po (from translationproject.org)
Andrzej Krzysztofowicz [Wed, 2 Jan 2008 12:06:01 +0000 (13:06 +0100)]
po: add pl.po (from translationproject.org)

16 years agopo: add eu.po (from translationproject.org)
Mikel Olasagasti [Wed, 2 Jan 2008 12:06:01 +0000 (13:06 +0100)]
po: add eu.po (from translationproject.org)

16 years agopo: update vi.po (from translationproject.org)
Clytie Siddall [Wed, 2 Jan 2008 12:06:01 +0000 (13:06 +0100)]
po: update vi.po (from translationproject.org)

16 years agopo: update uk.po (from translationproject.org)
Maxim V. Dziumanenko [Wed, 2 Jan 2008 12:06:01 +0000 (13:06 +0100)]
po: update uk.po (from translationproject.org)

16 years agopo: update tr.po (from translationproject.org)
Nilgün Belma Bugüner [Wed, 2 Jan 2008 12:06:00 +0000 (13:06 +0100)]
po: update tr.po (from translationproject.org)

16 years agopo: update sv.po (from translationproject.org)
Daniel Nylander [Wed, 2 Jan 2008 12:06:00 +0000 (13:06 +0100)]
po: update sv.po (from translationproject.org)

16 years agopo: update sl.po (from translationproject.org)
Simon Mihevc [Wed, 2 Jan 2008 12:06:00 +0000 (13:06 +0100)]
po: update sl.po (from translationproject.org)

16 years agopo: update ru.po (from translationproject.org)
Pavel Maryanov [Wed, 2 Jan 2008 12:06:00 +0000 (13:06 +0100)]
po: update ru.po (from translationproject.org)

16 years agopo: update pt_BR.po (from translationproject.org)
Rodrigo Stulzer Lopes [Wed, 2 Jan 2008 12:05:59 +0000 (13:05 +0100)]
po: update pt_BR.po (from translationproject.org)

16 years agopo: update nl.po (from translationproject.org)
Benno Schulenberg [Wed, 2 Jan 2008 12:05:59 +0000 (13:05 +0100)]
po: update nl.po (from translationproject.org)

16 years agopo: update ja.po (from translationproject.org)
Daisuke Yamashita [Wed, 2 Jan 2008 12:05:59 +0000 (13:05 +0100)]
po: update ja.po (from translationproject.org)

16 years agopo: update it.po (from translationproject.org)
Marco Colombo [Wed, 2 Jan 2008 12:05:59 +0000 (13:05 +0100)]
po: update it.po (from translationproject.org)

16 years agopo: update id.po (from translationproject.org)
Arif E. Nugroho [Wed, 2 Jan 2008 12:05:59 +0000 (13:05 +0100)]
po: update id.po (from translationproject.org)

16 years agopo: update hu.po (from translationproject.org)
Gabor Kelemen [Wed, 2 Jan 2008 12:05:59 +0000 (13:05 +0100)]
po: update hu.po (from translationproject.org)

16 years agopo: update fr.po (from translationproject.org)
Michel Robitaille [Wed, 2 Jan 2008 12:05:59 +0000 (13:05 +0100)]
po: update fr.po (from translationproject.org)

16 years agopo: update fi.po (from translationproject.org)
Lauri Nurmi [Wed, 2 Jan 2008 12:05:59 +0000 (13:05 +0100)]
po: update fi.po (from translationproject.org)

16 years agopo: update et.po (from translationproject.org)
Meelis Roos [Wed, 2 Jan 2008 12:05:59 +0000 (13:05 +0100)]
po: update et.po (from translationproject.org)

16 years agopo: update es.po (from translationproject.org)
Santiago Vila Doncel [Wed, 2 Jan 2008 12:05:59 +0000 (13:05 +0100)]
po: update es.po (from translationproject.org)

16 years agopo: update de.po (from translationproject.org)
Michael Piefel [Wed, 2 Jan 2008 12:05:58 +0000 (13:05 +0100)]
po: update de.po (from translationproject.org)

16 years agopo: update da.po (from translationproject.org)
Claus Hindsgaul [Wed, 2 Jan 2008 12:05:58 +0000 (13:05 +0100)]
po: update da.po (from translationproject.org)

16 years agopo: update cs.po (from translationproject.org)
Petr Pisar [Wed, 2 Jan 2008 12:05:58 +0000 (13:05 +0100)]
po: update cs.po (from translationproject.org)

16 years agopo: update ca.po (from translationproject.org)
Josep Puigdemont [Wed, 2 Jan 2008 12:05:58 +0000 (13:05 +0100)]
po: update ca.po (from translationproject.org)

16 years agorules: correct LSB init data for hwclockfirst.sh
LaMont Jones [Sun, 30 Dec 2007 17:34:34 +0000 (10:34 -0700)]
rules: correct LSB init data for hwclockfirst.sh

Addresses-Debian-Bug: 458346
Signed-off-by: LaMont Jones <lamont@debian.org>
16 years agomount: hint about helper program if device doesn't exist
Karel Zak [Fri, 14 Dec 2007 14:09:22 +0000 (15:09 +0100)]
mount: hint about helper program if device doesn't exist

Addresses-Debian-Bug: #452330
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: LaMont Jones <lamont@debian.org>
16 years agochangelog: release
LaMont Jones [Thu, 6 Dec 2007 04:37:16 +0000 (21:37 -0700)]
changelog: release

16 years agoMerge commit 'origin/stable/v2.13' into stable/v2.13
LaMont Jones [Thu, 6 Dec 2007 04:30:43 +0000 (21:30 -0700)]
Merge commit 'origin/stable/v2.13' into stable/v2.13

Conflicts:

getopt/getopt.1

16 years agodocs: add note about incorrect tag 2.13.1
Karel Zak [Wed, 5 Dec 2007 11:40:44 +0000 (12:40 +0100)]
docs: add note about incorrect tag 2.13.1

The git tag 2.13.1 is typo. I forgot to use -rc1 suffix for this tag.
The real 2.13.1 is going to be released with tag 2.13.1-REAL. Sorry.

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agomount: fix fd leak
Matthias Koenig [Wed, 21 Nov 2007 15:46:33 +0000 (16:46 +0100)]
mount: fix fd leak

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
16 years agogetopt: fix path to examples in getopt.1
Karel Zak [Wed, 28 Nov 2007 13:45:27 +0000 (14:45 +0100)]
getopt: fix path to examples in getopt.1

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agoblockdev: add --getsz to blockdev.8
Karel Zak [Wed, 28 Nov 2007 14:19:24 +0000 (15:19 +0100)]
blockdev: add --getsz to blockdev.8

This patch also marks --getsize as deprecated option.

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agosfdisk: allow partitioning drives of over 2^31 sectors.
Kunihiko IMAI [Mon, 20 Aug 2007 12:12:53 +0000 (06:12 -0600)]
sfdisk: allow partitioning drives of over 2^31 sectors.

sfdisk would incorrectly complain that there was no room when partitioning
a drive over 2^31 sectors in size.

Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
16 years agohwclock: check for ENODEV
David Woodhouse [Tue, 4 Dec 2007 13:44:05 +0000 (14:44 +0100)]
hwclock: check for ENODEV

/sbin/hwclock is supposed to fall back to using /dev/rtc0 if /dev/rtc isn't
working (which it isn't, because mkinitrd creates it with the old device
numbers, and we're switching to the new RTC_CLASS driver).

Unfortunately, it'll only cope if the error it gets is ENOENT (i.e. the device
node doesn't exist). It doesn't fall back to the next device in the list if the
error is ENODEV, which is what happens when the device node exists, but there's
no driver.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agohwclock.sh: drop redundant file pointer. Closes: #453333
LaMont Jones [Wed, 28 Nov 2007 21:22:29 +0000 (14:22 -0700)]
hwclock.sh: drop redundant file pointer.  Closes: #453333

16 years agosys-utils: correct setarch.8 manpage link creation. Closes: #453245
Frédéric Bothamy [Wed, 28 Nov 2007 00:44:16 +0000 (17:44 -0700)]
sys-utils: correct setarch.8 manpage link creation.  Closes: #453245

At least on Debian, .so commands are relative to the man directory
(e.g., /usr/share/man), not to the subdirectory:
    % man i386
    man: can't open /usr/share/man/setarch.8: No such file or directory
    No manual entry for i386

See also http://bugs.debian.org/453245

Signed-off-by: Frédéric Bothamy <frederic.bothamy@free.fr>
Signed-off-by: LaMont Jones <lamont@debian.org>
16 years agoagetty: drop useless and unused diff from upstream
LaMont Jones [Thu, 22 Nov 2007 02:59:51 +0000 (19:59 -0700)]
agetty: drop useless and unused diff from upstream

Signed-off-by: LaMont Jones <lamont@debian.org>
16 years agosys-utils: Drop duplicate install of setarch manpage links.
LaMont Jones [Thu, 22 Nov 2007 02:57:43 +0000 (19:57 -0700)]
sys-utils: Drop duplicate install of setarch manpage links.

Signed-off-by: LaMont Jones <lamont@debian.org>
16 years agoMerge commit 'origin/stable/v2.13' into stable/v2.13. Closes: #446175
LaMont Jones [Wed, 21 Nov 2007 23:12:11 +0000 (16:12 -0700)]
Merge commit 'origin/stable/v2.13' into stable/v2.13.  Closes: #446175

17 years agomount: don't call canonicalize(SPEC) for cifs, smbfs and nfs
Karel Zak [Wed, 21 Nov 2007 00:46:57 +0000 (01:46 +0100)]
mount: don't call canonicalize(SPEC) for cifs, smbfs and nfs

When calling "mount -t smbfs //foo/bar /mnt/foo", mount.smbfs will be
called with /foo/bar if /foo/bar exists locally, and will display its
usage.

The patch also removes duplicate canonicalize() from mounted()
function.

Reported-By: Pascal Terjan <pterjan@linuxfr.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agochangelog: release
LaMont Jones [Tue, 20 Nov 2007 02:32:10 +0000 (19:32 -0700)]
changelog: release

17 years agometa: drop Conflicts: bsdmainutils too
LaMont Jones [Tue, 20 Nov 2007 02:30:21 +0000 (19:30 -0700)]
meta: drop Conflicts: bsdmainutils too

17 years agochangelog: release
LaMont Jones [Mon, 19 Nov 2007 20:10:17 +0000 (13:10 -0700)]
changelog: release

17 years agocal comes from bsdmainutils as well.
LaMont Jones [Mon, 19 Nov 2007 04:16:48 +0000 (21:16 -0700)]
cal comes from bsdmainutils as well.

Drop the Replaces:, too, since we don't replace anything anymore.

17 years agobuild-sys: remove hardcoded _GNU_SOURCE
Karel Zak [Wed, 19 Sep 2007 22:57:01 +0000 (00:57 +0200)]
build-sys: remove hardcoded _GNU_SOURCE

We have AC_GNU_SOURCE, so we needn't any extra hardcoded _GNU_SOURCE.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agochangelog: start new release
LaMont Jones [Thu, 15 Nov 2007 05:53:01 +0000 (22:53 -0700)]
changelog: start new release

17 years agoMerge commit 'origin/stable/v2.13' into stable/v2.13
LaMont Jones [Thu, 15 Nov 2007 04:58:23 +0000 (21:58 -0700)]
Merge commit 'origin/stable/v2.13' into stable/v2.13

17 years agobuild-sys: release++
Karel Zak [Tue, 13 Nov 2007 09:46:57 +0000 (10:46 +0100)]
build-sys: release++

Increment release number to v2.13.1

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodocs: add v2.13.1 ReleaseNotes
Karel Zak [Tue, 13 Nov 2007 09:38:14 +0000 (10:38 +0100)]
docs: add v2.13.1 ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodocs: update AUTHORS file
Karel Zak [Mon, 12 Nov 2007 21:39:33 +0000 (22:39 +0100)]
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agopo: update po files
Karel Zak [Mon, 12 Nov 2007 11:19:37 +0000 (12:19 +0100)]
po: update po files

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agopo: update fi.po (from translationproject.org)
Lauri Nurmi [Mon, 12 Nov 2007 11:05:17 +0000 (12:05 +0100)]
po: update fi.po (from translationproject.org)

17 years agopo: update hu.po (from translationproject.org)
Gabor Kelemen [Mon, 12 Nov 2007 10:48:10 +0000 (11:48 +0100)]
po: update hu.po (from translationproject.org)

17 years agolosetup: fix errno usage
Karel Zak [Thu, 25 Oct 2007 10:10:31 +0000 (12:10 +0200)]
losetup: fix errno usage

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodocs: fix ChangeLog URL
Pascal Terjan [Sat, 3 Nov 2007 10:55:52 +0000 (11:55 +0100)]
docs: fix ChangeLog URL

Signed-off-by: Pascal Terjan <pterjan@linuxfr.org>
17 years agochangelog: release
LaMont Jones [Mon, 29 Oct 2007 20:30:37 +0000 (14:30 -0600)]
changelog: release

17 years agobuild: don't deliver col* and ul as part of bsdutils for now. Closes: #446939
LaMont Jones [Mon, 29 Oct 2007 20:07:55 +0000 (14:07 -0600)]
build: don't deliver col* and ul as part of bsdutils for now.  Closes: #446939

Bsdmainutils delivers these files, so we'll not conflict with them for now.

17 years agoMerge commit 'origin/stable/v2.13' into stable/v2.13
LaMont Jones [Fri, 26 Oct 2007 12:48:29 +0000 (06:48 -0600)]
Merge commit 'origin/stable/v2.13' into stable/v2.13

17 years agodocs: add info about .bugfix releases and branches
Karel Zak [Mon, 22 Oct 2007 08:47:46 +0000 (10:47 +0200)]
docs: add info about .bugfix releases and branches

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomkswap: possible to crash with SELinux relabeling support
KaiGai Kohei [Mon, 22 Oct 2007 08:30:19 +0000 (10:30 +0200)]
mkswap: possible to crash with SELinux relabeling support

When fgetfilecon() is failed with -ENODATA, this process does not
exit.  However, "oldcontext" is not initialized in this case, so
context_new() will be called with uninitialized "oldcontext" at the
next.

Finally, it makes a segmentation fault, because context_new() have to
refer an incorrect memory region.

The attached patch fixes this matter using matchpathcon().  If we
cannot obtain actual file context due to -ENODATA, a context which is
returned by matchpathcon() is applied as oldcontext.  Then, the type
of the context is relabeled to "swapfile_t" explicitly.

Signed-off-by: KaiGai Kohei <kaigai@kaigai.gr.jp>
Signed-off-by: Karel Zak <kzak@redhat.com>