]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
13 years agolibblkid: export info about PT magic strings
Karel Zak [Sun, 13 Nov 2011 20:25:12 +0000 (21:25 +0100)] 
libblkid: export info about PT magic strings

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibblkid: add BLKID_PARTS_MAGIC
Karel Zak [Fri, 11 Nov 2011 14:13:33 +0000 (15:13 +0100)] 
libblkid: add BLKID_PARTS_MAGIC

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomkswap: wipe all old signatures
Karel Zak [Fri, 11 Nov 2011 12:33:51 +0000 (13:33 +0100)] 
mkswap: wipe all old signatures

mkswap(8) zaps the begin of the device (1024 bytes) only. This is not
enough, because for example ReiserFS superblock is outside this area.

This patch add blkid_do_wipe() call to mkswap(8) and all block device
is scanned and all signature are removed.

Reported-by: Martin Pitt <martin.pitt@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: update TODO file
Karel Zak [Fri, 11 Nov 2011 11:58:59 +0000 (12:58 +0100)] 
docs: update TODO file

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agowipefs: improve -a, use blkid_do_wipe()
Karel Zak [Fri, 11 Nov 2011 11:48:38 +0000 (12:48 +0100)] 
wipefs: improve -a, use blkid_do_wipe()

Some filesystems (e.g. FAT) is possible to detect in many ways -- for
example if a magic string is stored on more places on the device. The
current implementation always removes from the device only the firstly
detected possibility.

 # wipefs /dev/sdb1
 offset               type
 ----------------------------------------------------------------
 0x36                 vfat   [filesystem]
                      UUID:  D203-A7F4

 # wipefs -a /dev/sdb1
 8 bytes [46 41 54 31 36 20 20 20] erased at offset 0x36 (vfat)

 # wipefs /dev/sdb1
 offset               type
 ----------------------------------------------------------------
 0x0                  vfat   [filesystem]
                      UUID:  D203-A7F4

This patch fixes this issue:

 # wipefs -a /dev/sdb1
 8 bytes were erased at offset 0x00000036 (vfat): 46 41 54 31 36 20 20 20
 1 bytes were erased at offset 0x00000000 (vfat): eb
 2 bytes were erased at offset 0x000001fe (vfat): 55 aa

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibblkid: add blkid_do_wipe()
Karel Zak [Fri, 11 Nov 2011 11:41:35 +0000 (12:41 +0100)] 
libblkid: add blkid_do_wipe()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibblkid: don't call CDROM_GET_CAPABILITY for partitions
Karel Zak [Thu, 10 Nov 2011 19:18:54 +0000 (20:18 +0100)] 
libblkid: don't call CDROM_GET_CAPABILITY for partitions

Reported-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofsck.minix: fix zone_map memory allocation failure check
Francesco Cosoleto [Wed, 9 Nov 2011 15:57:28 +0000 (16:57 +0100)] 
fsck.minix: fix zone_map memory allocation failure check

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
13 years agolib,tt: add TT_FL_NOEXTREMES
Karel Zak [Thu, 10 Nov 2011 01:02:38 +0000 (02:02 +0100)] 
lib,tt: add TT_FL_NOEXTREMES

If you mark a column with TT_FL_NOEXTREMES flag then extremely
large fields will no have effect to column width. Foe example:

 without the TT_FL_NOEXTREMES flag for the 'AAA' column:

 AAA         BBB CCC  DDD
 aa          bbb ccc  ddd
 aaaaaaaaaaa  bb ccc  ddd
 aa           bb ccc  ddd
 aa           bb ccc  ddd

 with the flags:

 AAA  BBB CCC  DDD
 aa   bbb ccc  dddddddddd
 aaaaaaaaaaa
       bb ccc  dddddddd
 aa    bb ccc  dddddd
 aa    bb ccc  ddddddddd

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoprlimit: fix noheadings option in man page
Bernhard Voelker [Wed, 9 Nov 2011 12:33:54 +0000 (13:33 +0100)] 
prlimit: fix noheadings option in man page

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
13 years agoprlimit: fix SYS_ macro
Karel Zak [Wed, 9 Nov 2011 10:53:49 +0000 (11:53 +0100)] 
prlimit: fix SYS_ macro

Reported-by: "Voelker, Bernhard" <bernhard.voelker@siemens-enterprise.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: fix trivial typos in debugging output
Petr Uzel [Wed, 9 Nov 2011 09:10:52 +0000 (10:10 +0100)] 
libmount: fix trivial typos in debugging output

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agowhereis: remove unused value warning
Francesco Cosoleto [Tue, 8 Nov 2011 22:14:54 +0000 (23:14 +0100)] 
whereis: remove unused value warning

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
13 years agolibblkid: silence a format string warning [-Wformat]
Francesco Cosoleto [Tue, 8 Nov 2011 22:14:53 +0000 (23:14 +0100)] 
libblkid: silence a format string warning [-Wformat]

Fix the following clang warning:

 exfat.c:130:41: warning: conversion specifies type 'unsigned short' but
 the argument has type 'uint8_t' (aka 'unsigned char') [-Wformat]
         blkid_probe_sprintf_version(pr, "%hu.%hu",
                                              ~~^
                                              %c

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
13 years agofsck.minix: remove unnecessary memset calls
Francesco Cosoleto [Tue, 8 Nov 2011 22:14:52 +0000 (23:14 +0100)] 
fsck.minix: remove unnecessary memset calls

The program aborts without using this unintialized allocated memory,
setting to zero doesn't look needed.

memset calls with sizeof() of pointer as argument (reported by clang).

[kzak@redhat.com: - replace malloc with calloc for {zone,inode}_count
                    to make code more robust]

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomount: fix build
Davidlohr Bueso [Tue, 8 Nov 2011 23:39:46 +0000 (00:39 +0100)] 
mount: fix build

With the new build changes when libmount is not defined the compilation breaks:

fstab.c:440: undefined reference to `streq_except_trailing_slash'
collect2: ld returned 1 exit status
make[2]: *** [mtab_lock_test] Error 1
make[2]: Leaving directory `/home/dave/projects/ut/mount'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/dave/projects/ut'
make: *** [all] Error 2

This patch adds strutils to the fstab.c rule.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 years agolibmount: fix chdir to parent for restricted (user) umounts
Karel Zak [Tue, 8 Nov 2011 20:47:23 +0000 (21:47 +0100)] 
libmount: fix chdir to parent for restricted (user) umounts

Reported-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: refresh TODO file
Karel Zak [Tue, 8 Nov 2011 15:38:56 +0000 (16:38 +0100)] 
docs: refresh TODO file

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: ignore tailing slash in netfs source paths
Petr Uzel [Tue, 8 Nov 2011 15:25:01 +0000 (16:25 +0100)] 
libmount: ignore tailing slash in netfs source paths

Addresses: https://bugzilla.novell.com/show_bug.cgi?id=728480
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolib,loopdev: add LOOP_CTL_GET_FREE support
Karel Zak [Mon, 7 Nov 2011 15:45:11 +0000 (16:45 +0100)] 
lib,loopdev: add LOOP_CTL_GET_FREE support

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: add note about config-gen purpose
Karel Zak [Mon, 7 Nov 2011 10:31:47 +0000 (11:31 +0100)] 
docs: add note about config-gen purpose

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: refresh TODO file
Karel Zak [Mon, 7 Nov 2011 10:18:09 +0000 (11:18 +0100)] 
docs: refresh TODO file

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: clean FAIL_DELAY usage
Karel Zak [Mon, 7 Nov 2011 10:04:44 +0000 (11:04 +0100)] 
login: clean FAIL_DELAY usage

... with this patch: login(1) always uses sleep(FAIL_DELAY) before
exit() if user is not authenticated or his PAM session is not fully
initialized.

Note that user has three attempts to write his password before
login(1) is terminated.

Reported-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoprlimit: add --{raw,noheadings} options
Karel Zak [Mon, 7 Nov 2011 08:57:46 +0000 (09:57 +0100)] 
prlimit: add --{raw,noheadings} options

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoprlimit: add a units column
Davidlohr Bueso [Wed, 2 Nov 2011 17:40:19 +0000 (18:40 +0100)] 
prlimit: add a units column

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: add notes about tools/config-gen
Karel Zak [Fri, 4 Nov 2011 19:59:52 +0000 (20:59 +0100)] 
docs: add notes about tools/config-gen

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotests: add build-sys regression test
Karel Zak [Fri, 4 Nov 2011 19:58:21 +0000 (20:58 +0100)] 
tests: add build-sys regression test

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: remove redundant flags from mount/Makefile.am
Karel Zak [Fri, 4 Nov 2011 19:56:52 +0000 (20:56 +0100)] 
build-sys: remove redundant flags from mount/Makefile.am

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: add tools/config-gen and basic compilation scenarios
Karel Zak [Fri, 4 Nov 2011 11:12:20 +0000 (12:12 +0100)] 
build-sys: add tools/config-gen and basic compilation scenarios

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: fix UL_INIT_BUILD macro
Karel Zak [Fri, 4 Nov 2011 13:08:30 +0000 (14:08 +0100)] 
build-sys: fix UL_INIT_BUILD macro

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotests: fix options evaluation, add support for optional tests
Karel Zak [Thu, 3 Nov 2011 12:20:24 +0000 (13:20 +0100)] 
tests: fix options evaluation, add support for optional tests

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: fix libuuid initialization
Karel Zak [Thu, 27 Oct 2011 22:33:41 +0000 (00:33 +0200)] 
build-sys: fix libuuid  initialization

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoprlimit: add add falbacks
Karel Zak [Thu, 27 Oct 2011 22:23:59 +0000 (00:23 +0200)] 
prlimit: add add falbacks

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibuuid: fix includes in man pages
Karel Zak [Thu, 27 Oct 2011 21:28:05 +0000 (23:28 +0200)] 
libuuid: fix includes in man pages

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: add UL_BUILD_INIT macro
Karel Zak [Thu, 27 Oct 2011 15:46:47 +0000 (17:46 +0200)] 
build-sys: add UL_BUILD_INIT macro

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_HWCLOCK
Karel Zak [Thu, 27 Oct 2011 15:04:49 +0000 (17:04 +0200)] 
build-sys: cleanup BUILD_HWCLOCK

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_{WALL,WRITE}
Karel Zak [Thu, 27 Oct 2011 14:50:54 +0000 (16:50 +0200)] 
build-sys: cleanup BUILD_{WALL,WRITE}

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_SCHEDUTILS
Karel Zak [Thu, 27 Oct 2011 14:49:32 +0000 (16:49 +0200)] 
build-sys: cleanup BUILD_SCHEDUTILS

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: move --with-* before --enable-*
Karel Zak [Thu, 27 Oct 2011 14:31:36 +0000 (16:31 +0200)] 
build-sys: move --with-* before --enable-*

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_LOGIN_UTILS
Karel Zak [Thu, 27 Oct 2011 14:28:35 +0000 (16:28 +0200)] 
build-sys: cleanup BUILD_LOGIN_UTILS

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_{RENAME,RESET}
Karel Zak [Thu, 27 Oct 2011 14:19:14 +0000 (16:19 +0200)] 
build-sys: cleanup BUILD_{RENAME,RESET}

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_{LAST,LINE,MESG}
Karel Zak [Thu, 27 Oct 2011 14:18:12 +0000 (16:18 +0200)] 
build-sys: cleanup BUILD_{LAST,LINE,MESG}

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_KILL, enable kill(1) by default
Karel Zak [Thu, 27 Oct 2011 14:16:02 +0000 (16:16 +0200)] 
build-sys: cleanup BUILD_KILL, enable kill(1) by default

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_ELVTUNE
Karel Zak [Thu, 27 Oct 2011 14:10:55 +0000 (16:10 +0200)] 
build-sys: cleanup BUILD_ELVTUNE

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_PIVOT_ROOT
Karel Zak [Thu, 27 Oct 2011 14:07:50 +0000 (16:07 +0200)] 
build-sys: cleanup BUILD_PIVOT_ROOT

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_SWITCH_ROOT
Karel Zak [Thu, 27 Oct 2011 14:05:41 +0000 (16:05 +0200)] 
build-sys: cleanup BUILD_SWITCH_ROOT

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_CRAMFS
Karel Zak [Thu, 27 Oct 2011 14:02:29 +0000 (16:02 +0200)] 
build-sys: cleanup BUILD_CRAMFS

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_{DDATE,AGETTY}
Karel Zak [Thu, 27 Oct 2011 13:57:18 +0000 (15:57 +0200)] 
build-sys: cleanup BUILD_{DDATE,AGETTY}

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_ARCH
Karel Zak [Thu, 27 Oct 2011 13:56:05 +0000 (15:56 +0200)] 
build-sys: cleanup BUILD_ARCH

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_UNSHARE
Karel Zak [Thu, 27 Oct 2011 13:51:28 +0000 (15:51 +0200)] 
build-sys: cleanup BUILD_UNSHARE

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_FALLOCATE
Karel Zak [Thu, 27 Oct 2011 13:48:51 +0000 (15:48 +0200)] 
build-sys: cleanup BUILD_FALLOCATE

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup HAVE_LIBCRYPT
Karel Zak [Thu, 27 Oct 2011 13:13:40 +0000 (15:13 +0200)] 
build-sys: cleanup HAVE_LIBCRYPT

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agochsh: remove non-PAM code
Karel Zak [Thu, 27 Oct 2011 13:09:59 +0000 (15:09 +0200)] 
chsh: remove non-PAM code

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agochfn: remove non-PAM code
Karel Zak [Thu, 27 Oct 2011 13:06:49 +0000 (15:06 +0200)] 
chfn: remove non-PAM code

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: remove unnecessary ifdef HAVE_CRYPT_H
Karel Zak [Thu, 27 Oct 2011 12:59:20 +0000 (14:59 +0200)] 
login: remove unnecessary ifdef HAVE_CRYPT_H

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: move structs, types, descs checks before --enable-*
Karel Zak [Thu, 27 Oct 2011 12:53:06 +0000 (14:53 +0200)] 
build-sys: move structs, types, descs checks before --enable-*

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: move type checks before --enable-*
Karel Zak [Thu, 27 Oct 2011 12:48:49 +0000 (14:48 +0200)] 
build-sys: move type checks before --enable-*

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: move gettext check before --enable-*
Karel Zak [Thu, 27 Oct 2011 12:44:30 +0000 (14:44 +0200)] 
build-sys: move gettext check before --enable-*

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_{LS,CH}CPU
Karel Zak [Thu, 27 Oct 2011 12:40:00 +0000 (14:40 +0200)] 
build-sys: cleanup BUILD_{LS,CH}CPU

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_MOUNTPOINT
Karel Zak [Thu, 27 Oct 2011 12:31:34 +0000 (14:31 +0200)] 
build-sys: cleanup BUILD_MOUNTPOINT

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup misc-utils/Makefile.am
Karel Zak [Thu, 27 Oct 2011 12:28:59 +0000 (14:28 +0200)] 
build-sys: cleanup misc-utils/Makefile.am

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: add note about BUILD_* macros
Karel Zak [Thu, 27 Oct 2011 12:28:27 +0000 (14:28 +0200)] 
docs: add note about BUILD_* macros

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_LSBLK
Karel Zak [Thu, 27 Oct 2011 12:20:35 +0000 (14:20 +0200)] 
build-sys: cleanup BUILD_LSBLK

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_UUIDD
Karel Zak [Thu, 27 Oct 2011 12:17:00 +0000 (14:17 +0200)] 
build-sys: cleanup BUILD_UUIDD

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_LIBMOUNT
Karel Zak [Thu, 27 Oct 2011 11:45:42 +0000 (13:45 +0200)] 
build-sys: cleanup BUILD_LIBMOUNT

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: use $build_libblkid
Karel Zak [Thu, 27 Oct 2011 10:55:05 +0000 (12:55 +0200)] 
build-sys: use $build_libblkid

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_PARTX
Karel Zak [Thu, 27 Oct 2011 10:52:01 +0000 (12:52 +0200)] 
build-sys: cleanup BUILD_PARTX

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_FSCK
Karel Zak [Thu, 27 Oct 2011 10:44:06 +0000 (12:44 +0200)] 
build-sys: cleanup BUILD_FSCK

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_MOUNT
Karel Zak [Thu, 27 Oct 2011 10:39:30 +0000 (12:39 +0200)] 
build-sys: cleanup BUILD_MOUNT

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup BUILD_RAW
Karel Zak [Thu, 27 Oct 2011 10:08:01 +0000 (12:08 +0200)] 
build-sys: cleanup BUILD_RAW

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: remove unnecessary perl check
Karel Zak [Thu, 27 Oct 2011 09:10:53 +0000 (11:10 +0200)] 
build-sys: remove unnecessary perl check

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: add howto-build-sys.txt
Karel Zak [Thu, 27 Oct 2011 09:06:08 +0000 (11:06 +0200)] 
docs: add howto-build-sys.txt

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: add UL_REQUIRES_* macros
Karel Zak [Thu, 27 Oct 2011 08:45:04 +0000 (10:45 +0200)] 
build-sys: add UL_REQUIRES_* macros

UL_REQUIRES_{LINUX,BUILD,HAVE} macros check for dependence between
--enable-* state and OS type, another build (e.g. libblkid), function
or library.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: move --enable-lib{mount,uuid,blkid} before others --enable-*
Karel Zak [Thu, 27 Oct 2011 08:32:24 +0000 (10:32 +0200)] 
build-sys: move --enable-lib{mount,uuid,blkid} before others --enable-*

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: rename and move macros
Karel Zak [Tue, 25 Oct 2011 15:00:32 +0000 (17:00 +0200)] 
build-sys: rename and move macros

 - use m4/ul.m4 for util-linux macros
 - use UL_ prefix for all util-linux macros

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodmesg: fix printing of multibyte characters
Petr Uzel [Tue, 1 Nov 2011 15:29:42 +0000 (16:29 +0100)] 
dmesg: fix printing of multibyte characters

Also make it compile if HAVE_WIDECHAR is not defined.

Addresses: https://bugzilla.novell.com/show_bug.cgi?id=725993
Reported-by: Harald Koenig <koenig@linux.de>
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agodocs: update TODO file
Davidlohr Bueso [Wed, 26 Oct 2011 14:26:49 +0000 (16:26 +0200)] 
docs: update TODO file

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 years agopartx: use USAGE_ macros
Davidlohr Bueso [Wed, 2 Nov 2011 15:22:44 +0000 (16:22 +0100)] 
partx: use USAGE_ macros

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolsblk: remove __NCOLUMNS
Davidlohr Bueso [Wed, 26 Oct 2011 13:58:18 +0000 (15:58 +0200)] 
lsblk: remove __NCOLUMNS

We use ARRAY_SIZE() instead to define the amount of available columns.

[kzak@redhat.com: - fix compiler warnings [-Wsign-compare]]

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agopartx: remove __NCOLUMNS
Davidlohr Bueso [Wed, 26 Oct 2011 13:57:38 +0000 (15:57 +0200)] 
partx: remove __NCOLUMNS

We use ARRAY_SIZE() instead to define the amount of available columns.

[kzak@redhat.com: - fix compiler warnings [-Wsign-compare]]

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofsck: use FS blacklist for non-all mode too
Karel Zak [Wed, 2 Nov 2011 14:51:45 +0000 (15:51 +0100)] 
fsck: use FS blacklist for non-all mode too

Reported-by: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: cosmetic changes in docs
Karel Zak [Fri, 7 Oct 2011 15:56:27 +0000 (17:56 +0200)] 
login: cosmetic changes in docs

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: use ENV_PATH and ENV_{ROOT,SU}PATH from login.defs
Karel Zak [Wed, 5 Oct 2011 22:56:32 +0000 (00:56 +0200)] 
login: use ENV_PATH and ENV_{ROOT,SU}PATH from login.defs

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: add -H option for compatibility with Suse
Karel Zak [Wed, 5 Oct 2011 22:56:32 +0000 (00:56 +0200)] 
login: add -H option for compatibility with Suse

Note that our login(1) uses hostname without domain, so:

"foo login: "

this is compatible with the default agetty(8) behavior.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: use LOG_UNKFAIL_ENAB from login.defs, improve logging
Karel Zak [Wed, 5 Oct 2011 22:30:45 +0000 (00:30 +0200)] 
login: use LOG_UNKFAIL_ENAB from login.defs, improve logging

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: use DEFAULT_HOME from login.defs
Karel Zak [Wed, 5 Oct 2011 21:50:12 +0000 (23:50 +0200)] 
login: use DEFAULT_HOME from login.defs

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: use HUSHLOGIN_FILE from login.defs
Karel Zak [Wed, 5 Oct 2011 21:39:14 +0000 (23:39 +0200)] 
login:  use HUSHLOGIN_FILE from login.defs

Note that Suse login(1) does not use any default for HUSHLOGIN_FILE.
We use /etc/hushlogins and ~/.hushlogin as default.

The another difference is that *empty* global (e.g. /etc/hushlogins)
means that hushed mode will be enabled for all accounts.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: use TTYGROUP from login.defs
Karel Zak [Wed, 5 Oct 2011 21:07:45 +0000 (23:07 +0200)] 
login:  use TTYGROUP from login.defs

Note that Suse login(1) does not use any default for TTYGROUP, it
means that TTYGROUP has to be explicitly defined otherwise user\'s
primary group is used.

The util-linux login(1) uses 'tty' group name as a default value.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: use TTYPERM from login.defs
Karel Zak [Wed, 5 Oct 2011 11:56:09 +0000 (13:56 +0200)] 
login: use TTYPERM from login.defs

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: use FAIL_DELAY from login.defs
Karel Zak [Wed, 5 Oct 2011 11:41:40 +0000 (13:41 +0200)] 
login: use FAIL_DELAY from login.defs

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: use LOGIN_TIMEOUT from login.defs
Karel Zak [Wed, 5 Oct 2011 11:38:15 +0000 (13:38 +0200)] 
login: use LOGIN_TIMEOUT from login.defs

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: rewrite motd(), use MOTD_FILE from login.defs
Karel Zak [Wed, 5 Oct 2011 11:30:52 +0000 (13:30 +0200)] 
login: rewrite motd(), use MOTD_FILE from login.defs

Note that Suse login(1) does not use any default for MOTD_FILE, so
MOTD_FILE item in login.defs is required otherwise nothing is printed.

We use (for backward compatibility) /etc/motd as default.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: remove obsolete info from man page
Karel Zak [Wed, 5 Oct 2011 11:16:30 +0000 (13:16 +0200)] 
login: remove obsolete info from man page

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotests: remove obsolete checktty test
Karel Zak [Wed, 5 Oct 2011 10:15:50 +0000 (12:15 +0200)] 
tests: remove obsolete checktty test

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: add login.defs code and tests
Karel Zak [Wed, 5 Oct 2011 10:10:26 +0000 (12:10 +0200)] 
login: add login.defs code and tests

The new logindefs.c file contains /etc/login.defs parser and functions
for searching in the list of the login default variables. The patch
also contains a new regression test for the code.

Based on pam_login-4.0 from Suse.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotests: cleanup islocal test
Karel Zak [Tue, 4 Oct 2011 21:45:45 +0000 (23:45 +0200)] 
tests: cleanup islocal test

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: host{name,address} initialization refactoring
Karel Zak [Mon, 3 Oct 2011 15:45:36 +0000 (17:45 +0200)] 
login: host{name,address} initialization refactoring

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: remove unnecessary variables
Karel Zak [Mon, 3 Oct 2011 15:28:57 +0000 (17:28 +0200)] 
login: remove unnecessary variables

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: move signal stuff to the one place
Karel Zak [Mon, 3 Oct 2011 15:23:43 +0000 (17:23 +0200)] 
login: move signal stuff to the one place

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: log good logins refactoring
Karel Zak [Mon, 3 Oct 2011 15:21:04 +0000 (17:21 +0200)] 
login: log good logins refactoring

Signed-off-by: Karel Zak <kzak@redhat.com>