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>
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>
Karel Zak [Fri, 5 Oct 2007 10:22:13 +0000 (12:22 +0200)]
script: dies on SIGWINCH
The "doinput" process doesn't make a difference between SIGWINCH and
SIGCHILD. This process also sends unnecessary SIGWINCH to child (the
signal is ignored by child). Fixed.
chsh: should use pam_end function to terminate the PAM transaction
chsh will use PAM transaction if macros 'REQUIRE_PASSWORD' and
'HAVE_SECURITY_PAM_MISC_H' are defined, but there is no pam_end function be
used when the PAM transaction be terminated.
This patch also cleanup PAM code in chsh(1).
Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
Co-Author: Karel Zak <kzak@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 5 Oct 2007 10:22:13 +0000 (12:22 +0200)]
script: dies on SIGWINCH. Closes: #445956
The "doinput" process doesn't make a difference between SIGWINCH and
SIGCHILD. This process also sends unnecessary SIGWINCH to child (the
signal is ignored by child). Fixed.
Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: LaMont Jones <lamont@debian.org>
Run pg(1) and type '/<CR>' which is supposed to forward search for the
previously remembered search string. pg(1) will segfault after printing
"No remembered search string:".
Signed-off-by: Rajeev V. Pillai <rajeevvp@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
The --rtc option does not set the name of the device correctly.
It still uses /dev/rtc even if the --rtc option is given.
Testcase:
$ mv /dev/rtc /dev/foo
$ hwclock --show --debug --rtc=/dev/foo
hwclock from util-linux-2.13-rc2
Using /dev interface to clock.
Last drift adjustment done at 1190198135 seconds after 1969
Last calibration done at 1190198135 seconds after 1969
Hardware clock is on local time
Assuming hardware clock is kept in local time.
Waiting for clock tick...
hwclock: open() of /dev/rtc failed, errno=2: No such file or directory.
...got clock tick
Co-Author: Karel Zak <kzak@redhat.com> Signed-off-by: Matthias Koenig <mkoenig@suse.de> Signed-off-by: Karel Zak <kzak@redhat.com>
LaMont Jones [Fri, 21 Sep 2007 20:01:04 +0000 (14:01 -0600)]
hwclock: Reintroduce hwclockfirst.sh on Debian machines. Closes: #443487
If /etc/localtime is a readable file, then set the time in hwclockfirst.sh
before mounting the root partition. Many thanks to Ted T'so for the details
(found in the bug report.)
Mike Frysinger [Fri, 7 Sep 2007 00:30:16 +0000 (20:30 -0400)]
build-sys: nls/locale handling in util-linux-ng general
On Monday 03 September 2007, Karel Zak wrote:
> http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/590/focus=592
>
> I agree that we need a better support for compilation without
> locales, but from my point of view NLS != all locales stuff. The NLS
> support is subset only.
thinking about the input from everyone, i'd propose the attached ...
Only pull in locale.h as needed and move it to the common nls.h.
mount: chain of symlinks to fstab causes use of pointer after free
Looking at the source in 'mount/realpath.c' we find that when dealing with
the second or later symlink in the chain, a memory block was free()d before
copying its contents to a newly allocated block.
mount: chain of symlinks to fstab causes use of pointer after free
Looking at the source in 'mount/realpath.c' we find that when dealing with
the second or later symlink in the chain, a memory block was free()d before
copying its contents to a newly allocated block.