Compare commits

...
Sign in to create a new pull request.

84 commits

Author SHA1 Message Date
Karel Zak
d59979fa05 retired
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-19 10:13:23 +01:00
Karel Zak
6c69926dbf 2.18-5: add -l (lock) support to fsck
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-10-27 00:18:01 +02:00
Karel Zak
334e0e7abe 2.18-5: fix agetty -s (#645640)
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-10-26 23:42:56 +02:00
Karel Zak
39ece656f3 2.18-4: fix #623685
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-08-18 10:24:11 +02:00
Karel Zak
f5753f26bf 2.18-3: fix #620924
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-08-05 11:47:58 +02:00
Karel Zak
f5b82120dc - fix #618957 - ISO images listed in fstab are mounted twice at boot
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-08-05 11:33:59 +02:00
kzak
ad6c4cead9 - fix #615719 - tmpfs mount fails with 'user' option.
- fix #598631 - shutdown, reboot, halt and C-A-D don't work
2010-08-05 11:33:20 +02:00
Fedora Release Engineering
84c61844a0 dist-git conversion 2010-07-29 14:50:12 +00:00
kzak
a668ec5732 - upgrade to the final 2.18
ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseN
    otes
Fri Jun 18 2010 Karel Zak <kzak@redhat.com> 2.18-0.2
- upgrade to 2.18-rc2
    ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-rc2-Chan
    geLog
2010-06-30 13:46:30 +00:00
kzak
c8f122a16e - upgrade to 2.18-rc2
ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-rc2-Chan
    geLog
2010-06-18 11:24:07 +00:00
kzak
aaefb1b1e9 fix spec file, new tarball 2010-06-08 10:27:29 +00:00
kzak
719e877065 remove unused patches 2010-06-08 08:08:50 +00:00
kzak
b5c0655ff7 - upgrade to the release 2.18-rc1
ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseN
    otes
    ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-rc1-Chan
    geLog
2010-06-08 08:06:15 +00:00
kzak
ac8c6510b0 - fix #581252 - remounting tmpfs fails because of hidden rootcontext=
- fix #580296 - "rtcwake" does miss the "off" option
- fix #575734 - use microsecond resolution for blkid cache entries
- upgrade to the bugfix release 2.17.2
    ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.2-Releas
    eNotes
    ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.2-Change
    Log
- minor fixed in spec file
2010-04-12 15:02:58 +00:00
kzak
ad3276c60e - fix #533874 - libblkid should allow scanning of slow devices (eg. cdroms) 2010-03-11 22:10:59 +00:00
kzak
c5424ee0fe fix typo in spec file 2010-02-22 12:19:28 +00:00
kzak
b160158d1d - upgrade to the final 2.17.1
ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.1-Releas
    eNotes
    ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17.1-Change
    Log
2010-02-22 12:05:05 +00:00
kzak
3469b9156c - upgrade to 2.17.1-rc1 2010-02-16 15:07:47 +00:00
kzak
ebf27ef6b1 - fix uuidd init script 2010-02-16 14:29:21 +00:00
kzak
895e26434c - fix #541402 - uuidd initscript lsb compliance 2010-02-12 19:30:23 +00:00
kzak
f2798a3ae7 - remove Provides: lib{uuid,blkid}-static (thanks to Michael Schwendt)
- remove useless URL to sf.net
2010-01-08 14:01:57 +00:00
kzak
23fc39cc0a - upgrade to the final 2.17
ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-ReleaseN
    otes
    ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-ChangeLo
    g
- fix #545147 - util-linux-ng : Violation of the Packaging Guidelines
    (remove uuid and blkid static libs)
2010-01-08 11:22:22 +00:00
kzak
508868f471 - minor fixes in spec file (fix URL, add Requires, add LGPLv2+) 2009-12-14 11:50:10 +00:00
kzak
68cfaf1c07 - upgrade to 2.17-rc2
ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-rc2-Chan
    geLog
2009-12-09 12:52:55 +00:00
kzak
8e0edf3045 - add clock.8 man page (manlink to hwclock)
- add --help to mount.tmpfs
2009-12-07 11:17:37 +00:00
Bill Nottingham
0b5b5047d5 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-25 22:52:48 +00:00
kzak
ad59cd7228 - upgrade to 2.17-rc1
ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.17/v2.17-rc1-Chan
    geLog
2009-11-23 12:34:10 +00:00
kzak
ad52cd8da8 - upgrade to pre-release snapshot (official changelog not available yet,
see http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git for
    now)
2009-11-10 21:53:41 +00:00
kzak
9cc0805afc - upgrade to pre-release snapshot (official changelog not available yet,
see http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git for
    now)
- new commands: fallocate, unshare, wipefs
- libblkid supports topology and partitions probing
- remove support for --rmpart[s] from blockdev(8)
    (util-linux-ng-2.14-blockdev-rmpart.patch)
- merged upstream: util-linux-ng-2.14-sfdisk-dump.patch
    util-linux-ng-2.16-blkid-swsuspend.patch
    util-linux-ng-2.16-libblkid-compression.patch
    util-linux-ng-2.16-libblkid-ext2.patch
    util-linux-ng-2.16-switchroot-tty.patch
2009-10-19 12:51:04 +00:00
kzak
65b849d161 - fix spec file 2009-10-05 07:25:54 +00:00
kzak
54801c4aa3 - release++ 2009-10-02 08:46:21 +00:00
kzak
3d39c82c09 - fix #519237 - bash: cannot set terminal process group (-1): Inappropriate
ioctl for device
2009-10-01 19:05:20 +00:00
Tomáš Mráz
fdc66c57dc - use password-auth common PAM configuration instead of system-auth and
drop pam_console.so call from the remote PAM config file
2009-09-16 19:04:11 +00:00
kzak
2b1c901a2f - fix #522718 - sfdisk -d /dev/xxx | sfdisk --force /dev/yyy fails when
LANG is set
- fix typo in swsuspend detection
2009-09-14 08:40:51 +00:00
Tomáš Mráz
e9e0efc157 - rebuilt with new audit 2009-08-26 16:05:05 +00:00
kzak
0c627b12a6 - fix #518572 - blkid requires ext2.ko to be decompressed on installation
media
2009-08-23 19:25:24 +00:00
Tomáš Mráz
a462526bed - rebuilt with new audit 2009-08-21 11:21:10 +00:00
kzak
203ba3aecb - fix #513104 - blkid returns no fstype for ext2 device when ext2 module
not loaded
2009-08-13 22:22:43 +00:00
Štěpán Kasal
5cb38df8b7 - set conflict with versions of e2fsprogs containing fsck 2009-08-05 07:45:59 +00:00
kzak
dfa8a7f8fd - remove the mount.conf support (see #214891) 2009-07-30 21:29:42 +00:00
kzak
2cdb3efbb1 - fix #214891 - add mount.conf and MTAB_LOCK_DIR= option 2009-07-27 21:11:14 +00:00
kzak
dad65a571a remove obsolete build requires 2009-07-25 20:20:55 +00:00
kzak
70c61db862 - upgrade to 2.16
ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.16/v2.16-ReleaseN
    otes
- enable built-in libuuid (replacement for the old uuid stuff from
    e2fsprogs)
- new commands switch_root, uuidgen and uuidd (subpackage)
2009-07-25 20:18:47 +00:00
kzak
0b806dd6f2 - upgrade to 2.15.1 2009-06-10 13:10:27 +00:00
kzak
db3827f5de - set BuildRequires: e2fsprogs-devel
- add Requires: e2fsprogs-devel to libblkid-devel
2009-06-08 13:29:54 +00:00
kzak
a5cc6153d9 Fix conflicts/requires and temporary disable dependency on libuuid
(e2fsprogs).
2009-06-04 19:44:35 +00:00
kzak
46df5ca3c5 - upgrade to 2.15.1-rc1
ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.15/v2.15-ReleaseN
    otes
    ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.15/v2.15.1-rc1-Ch
    angeLog
- merged patches: util-linux-ng-2.14-login-remote.patch
    util-linux-ng-2.14-fdisk-4k-I.patch
    util-linux-ng-2.14-fdisk-4k-II.patch
    util-linux-ng-2.14-fdisk-4k-III.patch util-linux-ng-2.14-dmesg-r.patch
    util-linux-ng-2.14-flock-segfaults.patch
    util-linux-ng-2.14-renice-n.patch
- new commands: lscpu, ipcmk
- remove support for "managed" and "kudzu" mount options
- cleanup spec file
- enable built-in libblkid (replacement for the old blkid from e2fsprogs)
2009-06-04 15:12:50 +00:00
kzak
05a0394dee - fix #490769 - %post scriptlet failed (thanks to Dan Horak)
Fri Mar 20 2009 Karel Zak <kzak@redhat.com> 2.14.2-7
- fix some nits in mount.tmpfs
2009-04-02 20:25:26 +00:00
kzak
6d31d39936 - fix some nits in mount.tmpfs 2009-03-20 09:13:48 +00:00
kzak
04b6f23780 - fix #491175 - mount of tmpfs FSs fail at boot 2009-03-20 08:16:20 +00:00
kzak
24912fbd9d - fix #489672 - flock segfaults when file name is not given (upstream)
- fix #476964 - Mount /var/tmp with tmpfs creates denials
- fix #487227 - fdisk 4KiB hw sectors support (upstream)
- fix #477303 - renice doesn't support -n option (upstream)
2009-03-19 10:11:58 +00:00
Jesse Keating
0e1be0445e - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild 2009-02-25 23:34:24 +00:00
kzak
9c96631083 - add a missing patch 2009-02-20 09:23:39 +00:00
kzak
66c91f0320 - add -r option to dmesg(1) 2009-02-20 08:20:28 +00:00
kzak
c3563524aa - fix typo in spec file 2009-02-09 15:34:53 +00:00
kzak
7987ff85b8 - upgrade to stable 2.14.2
ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/v2.14.2-Releas
    eNotes
2009-02-09 14:16:06 +00:00
kzak
70f497f291 - fix #480413 - util-linux-ng doesn't include scriptreplay
- fix #479002 - remove dependency on ConsoleKit-libs
- upgrade to 2.14.2-rc2
2009-01-22 14:39:44 +00:00
kzak
6a4bb2607c - upgrade to 2.14.2-rc1
- refresh old patches
2008-12-23 00:12:56 +00:00
kzak
42ac52b884 release++ ... because we don't have "make force-tag" any more :-( 2008-11-21 14:47:23 +00:00
kzak
d3778b5531 - fix #472502 - problem with fdisk and use +sectors for the end of
partition
2008-11-21 14:23:00 +00:00
kzak
391e7e1b6c - fix #465761 - mount manpage is missing uid/gid mount options for tmpfs
- refresh util-linux-ng-2.14-mount-file_t.patch (fuzz=0)
2008-10-06 11:21:32 +00:00
kzak
ab782e1206 remove unused patch 2008-09-11 09:13:25 +00:00
kzak
ac6a14fbca - remove obsolete pam-console support 2008-09-10 22:00:29 +00:00
kzak
9cdcf099de fix spec file 2008-09-10 12:29:01 +00:00
kzak
f5ea4d01a3 - upgrade to stable 2.14.1 2008-09-10 11:47:47 +00:00
kzak
795ab70db1 - upgrade to 2.14.1-rc1
- refresh old patches
2008-08-14 00:37:00 +00:00
kzak
1027fb9d77 - update util-linux-ng-2.14-mount-file_t.patch to make the SELinux warning
optional (verbose mode is required)
2008-07-23 23:44:27 +00:00
kzak
8e2ed63485 - fix #390691 - mount should check selinux context on mount, and warn on
file_t
2008-07-01 12:53:26 +00:00
kzak
583551c607 - upgrade to stable util-linux-ng release 2008-06-09 13:21:22 +00:00
kzak
19c3281b6a uplead new upstream tarball 2008-05-19 12:14:00 +00:00
kzak
6c46b9e220 - upgrade to 2.14-rc3
- remove arch(8) (deprecated in favor of uname(1) or arch(1) from
    coreutils)
- add a new command ldattach(8)
- cfdisk(8) linked with libncursesw
2008-05-19 11:48:40 +00:00
kzak
384230c51d - fix audit log injection attack via login 2008-04-22 19:35:02 +00:00
kzak
87a1058ffc - fix location of the command raw(8) 2008-04-16 23:01:27 +00:00
kzak
eb6c545ff2 - fix 244383 - libblkid uses TYPE="swsuspend" for S1SUSPEND/S2SUSPEND 2008-04-15 21:26:19 +00:00
kzak
60528e2a98 - fix 439984 - backport mkswap -U 2008-04-02 14:12:59 +00:00
Tom Callaway
de2a746394 clean up sparc conditionals 2008-03-26 15:30:40 +00:00
Jesse Keating
314efc7780 - Autorebuild for GCC 4.3 2008-02-19 10:38:02 +00:00
kzak
4357e7635a - upgrade to new upstream release
- fix #427874 - util-linux-ng gets "excess command line argument" on update
2008-01-28 13:50:47 +00:00
kzak
fb66c6b778 - update to upstream 2.13.1-rc2 2008-01-02 14:27:25 +00:00
Daniel J Walsh
d24ef33bc4 fix ordering of pam_ck_connector 2007-12-12 22:06:53 +00:00
Daniel J Walsh
ddac4121ed - Fix pam files so that pam_keyinit happens after pam_selinux.so 2007-12-12 21:45:28 +00:00
kzak
5721e3ad7a - remove viwp and vigr (in favour of shadow-utils) 2007-12-12 14:35:35 +00:00
kzak
25b5fcbf65 - update to the latest upstream stable branch (commit:
fda9d11739ee88c3b2f22a73f12ec019bd3b8335)
2007-12-09 19:36:57 +00:00
kzak
73c5d6079d - fix #354791 - blockdev command calls the blkpg ioctl with a wrong data
structure
2007-10-31 11:09:24 +00:00
27 changed files with 7 additions and 2788 deletions

View file

@ -1,2 +0,0 @@
floppy-0.16.tar.bz2
util-linux-ng-2.13-20071004git.tar.bz2

5
.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
floppy-0.16.tar.bz2
util-linux-ng-2.18.tar.bz2
*~
*.rpm
*.log

View file

@ -1,21 +0,0 @@
# Makefile for source rpm: util-linux-ng
# $Id$
NAME := util-linux-ng
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

2
dead.package Normal file
View file

@ -0,0 +1,2 @@
util-linux-ng has been renamed to util-linux

View file

@ -1,63 +0,0 @@
.\" $OpenBSD: nologin.8,v 1.8 1999/06/04 02:45:19 aaron Exp $
.\" $NetBSD: nologin.8,v 1.3 1995/03/18 14:59:09 cgd Exp $
.\"
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)nologin.8 8.1 (Berkeley) 6/19/93
.\"
.Dd February 15, 1997
.Dt NOLOGIN 8
.Os
.Sh NAME
.Nm nologin
.Nd politely refuse a login
.Sh SYNOPSIS
.Nm nologin
.Sh DESCRIPTION
.Nm
displays a message that an account is not available and
exits non-zero.
It is intended as a replacement shell field for accounts that
have been disabled.
.Pp
If the file
.Pa /etc/nologin.txt
exists,
.Nm
displays its contents to the user instead of the default message.
.Sh SEE ALSO
.Xr login 1
.Sh HISTORY
The
.Nm
command appeared in
.Bx 4.4 .

View file

@ -1,58 +0,0 @@
/* $OpenBSD: nologin.c,v 1.2 1997/04/04 16:51:37 millert Exp $ */
/*
* Copyright (c) 1997, Jason Downs. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <sys/types.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
/* Distinctly different from _PATH_NOLOGIN. */
#define _PATH_NOLOGIN_TXT "/etc/nologin.txt"
#define DEFAULT_MESG "This account is currently not available.\n"
/*ARGSUSED*/
int main(argc, argv)
int argc;
char *argv[];
{
int nfd, nrd;
char nbuf[128];
nfd = open(_PATH_NOLOGIN_TXT, O_RDONLY);
if (nfd < 0) {
write(STDOUT_FILENO, DEFAULT_MESG, strlen(DEFAULT_MESG));
exit (1);
}
while ((nrd = read(nfd, nbuf, sizeof(nbuf))) > 0)
write(STDOUT_FILENO, nbuf, nrd);
close (nfd);
exit (1);
}

View file

@ -1,2 +0,0 @@
7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2
1fefa573d23d2e365592d00d1f9bd3a6 util-linux-ng-2.13-20071004git.tar.bz2

View file

@ -1,105 +0,0 @@
--- util-linux-ng-2.13-rc3/disk-utils/blockdev.c.kzak 2007-08-01 15:40:21.000000000 +0200
+++ util-linux-ng-2.13-rc3/disk-utils/blockdev.c 2007-08-13 12:31:47.000000000 +0200
@@ -32,6 +32,28 @@
#define BLKGETSIZE64 _IOR(0x12,114,size_t)
#endif
+#ifndef BLKPG
+#define BLKPG _IO(0x12,105)
+#define BLKPG_DEL_PARTITION 2
+#define BLKPG_DEVNAMELTH 64
+#define BLKPG_VOLNAMELTH 64
+
+struct blkpg_partition {
+ long long start;
+ long long length;
+ long long pno;
+ char devname[BLKPG_DEVNAMELTH];
+ char volname[BLKPG_VOLNAMELTH];
+};
+
+struct blkpg_ioctl_arg {
+ int op;
+ int flags;
+ int datalen;
+ void *data;
+};
+#endif
+
/* Maybe <linux/hdreg.h> could be included */
#ifndef HDIO_GETGEO
#define HDIO_GETGEO 0x0301
@@ -104,6 +126,10 @@
{ "--rereadpt", "BLKRRPART", BLKRRPART, ARGNONE, 0, NULL,
N_("reread partition table") },
#endif
+#ifdef BLKPG
+ { "--rmpart", "BLKPG", BLKPG, ARGINTAP, 0, "PARTNO", N_("disable partition") },
+ { "--rmparts", "BLKPG", BLKPG, ARGNONE, 0, NULL, N_("disable all partitions") },
+#endif
};
#define SIZE(a) (sizeof(a)/sizeof((a)[0]))
@@ -163,6 +189,35 @@
return 0;
}
+#ifdef BLKPG
+static int
+disable_partition(int fd, int partno) {
+ struct blkpg_partition part = {
+ .pno = partno,
+ };
+ struct blkpg_ioctl_arg io = {
+ .op = BLKPG_DEL_PARTITION,
+ .datalen = sizeof(part),
+ .data = &part,
+ };
+ int res;
+
+ res = ioctl(fd, BLKPG, &io);
+ if (res < 0)
+ return 0;
+ return 1;
+}
+
+static int
+disable_partitions(int fd) {
+ int p, res = 0;
+
+ for (p = 1; p <= 256; p++)
+ res += disable_partition(fd, p);
+ return res ? 0 : -1;
+}
+#endif
+
void do_commands(int fd, char **argv, int d);
void report_header(void);
void report_device(char *device, int quiet);
@@ -280,6 +335,12 @@
switch(bdcms[j].argtype) {
default:
case ARGNONE:
+#ifdef BLKPG
+ if (bdcms[j].ioc == BLKPG) {
+ res = disable_partitions(fd);
+ break;
+ }
+#endif
res = ioctl(fd, bdcms[j].ioc, 0);
break;
case ARGINTA:
@@ -297,6 +358,13 @@
bdcms[j].name);
usage();
}
+#ifdef BLKPG
+ if (bdcms[j].ioc == BLKPG) {
+ iarg = atoi(argv[++i]);
+ res = disable_partition(fd, iarg) ? 0 : -1;
+ break;
+ }
+#endif
iarg = atoi(argv[++i]);
res = ioctl(fd, bdcms[j].ioc, &iarg);
break;

View file

@ -1,10 +0,0 @@
--- util-linux-2.13-pre6/sys-utils/ctrlaltdel.8.kzak 2006-08-10 12:23:53.000000000 +0200
+++ util-linux-2.13-pre6/sys-utils/ctrlaltdel.8 2006-08-10 12:24:08.000000000 +0200
@@ -32,7 +32,6 @@
.SH FILES
.I /etc/rc.local
.SH "SEE ALSO"
-.BR simpleinit (8),
.BR init (8)
.SH AUTHOR
Peter Orbaek (poe@daimi.aau.dk)

View file

@ -1,23 +0,0 @@
--- util-linux-ng-2.13-rc3/disk-utils/fdformat.8.xxx 2007-07-03 01:56:04.000000000 +0200
+++ util-linux-ng-2.13-rc3/disk-utils/fdformat.8 2007-08-13 12:07:58.000000000 +0200
@@ -45,6 +45,10 @@
.BR setfdprm (8)
to load the disk parameters.
+For ATAPI IDE floppy driver (also known as LS-120 drives or "Superdisk"
+drives) you have to use the
+.BR floppy (8).
+
.SH OPTIONS
.TP
.B \-n
@@ -54,7 +58,8 @@
.BR fd (4),
.BR setfdprm (8),
.BR mkfs (8),
-.BR emkfs (8)
+.BR emkfs (8),
+.BR floppy (8)
.SH AUTHOR
Werner Almesberger (almesber@nessie.cs.id.ethz.ch)
.SH AVAILABILITY

View file

@ -1,11 +0,0 @@
--- util-linux-ng-2.13-rc3/fdisk/fdisk.c.kzak 2007-07-16 23:15:33.000000000 +0200
+++ util-linux-ng-2.13-rc3/fdisk/fdisk.c 2007-08-13 12:15:42.000000000 +0200
@@ -2588,7 +2588,7 @@
*/
sector_size = atoi(optarg);
if (sector_size != 512 && sector_size != 1024 &&
- sector_size != 2048)
+ sector_size != 2048 && sector_size != 4096)
fatal(usage);
sector_offset = 2;
user_set_sector_size = 1;

View file

@ -1,102 +0,0 @@
--- util-linux-2.12p/floppy-0.16/floppyfloppy.c.generic 2001-02-13 01:15:38.000000000 +0100
+++ util-linux-2.12p/floppy-0.16/floppyfloppy.c 2005-09-30 15:38:08.000000000 +0200
@@ -264,6 +264,33 @@
#endif
}
+/* -1=error, 1=true, 0=false */
+static int check_generic(const char *dev, int n)
+{
+ struct floppy_struct param;
+ int fd;
+
+ if ((fd=open(dev, O_RDONLY)) < 0)
+ {
+ perror(dev);
+ return -1;
+ }
+ if (ioctl(fd,FDGETPRM,(long) &param) < 0)
+ {
+ perror(dev);
+ close(fd);
+ return -1;
+ }
+ close(fd);
+
+ if (param.sect==floppy_type[n].sectors &&
+ param.head==floppy_type[n].heads &&
+ param.track==floppy_type[n].tracks)
+ /* generic device uses expected format */
+ return 1;
+
+ return 0;
+}
static int do_format(const char *dev, int fmtnum,
int (*fmt_func)(const char *, int), int flags)
@@ -275,6 +302,7 @@
struct format_descr curtrack;
int pct;
struct stat stat_buf;
+ int gen = 0;
int i, j;
char *devname;
@@ -297,23 +325,52 @@
strcat(strcpy(devname, dev), floppy_type[fmtnum].dev);
+ if (stat(devname, &stat_buf)==-1 && errno==ENOENT)
+ {
+ /* /dev/fd0xxxxx doesn't exist ...try to use generic device
+ *
+ * Note: we needn't size specific device if the generic device uses
+ * right floppy format (FDGETPRM). -- Karel Zak [30/09/2005]
+ */
+ if ((gen = check_generic(dev, fmtnum))==1) /* true */
+ {
+ fprintf(stderr, _("WARNING: size specific device %s doesn't exist, using generic device: %s\n"),
+ devname, dev);
+ strcpy(devname, dev);
+ }
+ else if (gen==0) /* false */
+ {
+ fprintf(stderr, _("ERROR: size specific device %1$s doesn't exist. Use \"MAKEDEV %1$s\" and try it again.\n"), devname);
+ return (1);
+ }
+ else /* error -- no floppy medium or device? */
+ return(1);
+ }
fd=open(devname, O_WRONLY);
if (fd < 0)
{
perror(devname);
return (1);
}
-
- if (fstat(fd, &stat_buf) ||
- !S_ISBLK(stat_buf.st_mode) ||
- MINOR_DEV(stat_buf.st_rdev) != fmtnum)
+ if (fstat(fd, &stat_buf) < 0)
+ {
+ perror(devname);
+ close(fd);
+ return (1);
+ }
+ if (!S_ISBLK(stat_buf.st_mode))
+ {
+ fprintf(stderr,_("%s: not a block device\n"), devname);
+ close(fd);
+ return (1);
+ }
+ if (gen==0 && MINOR_DEV(stat_buf.st_rdev) != fmtnum)
{
errno=EINVAL;
perror(devname);
close(fd);
return (1);
}
-
if (ioctl(fd, FDGETPRM, &geo) < 0)
{
perror(devname);

View file

@ -1,10 +0,0 @@
--- util-linux-ng-2.13-rc3/floppy-0.16/superfloppy.c.kzak 2001-07-14 05:26:16.000000000 +0200
+++ util-linux-ng-2.13-rc3/floppy-0.16/superfloppy.c 2007-08-13 13:14:53.000000000 +0200
@@ -12,6 +12,7 @@
#include <errno.h>
#include <popt.h>
#include <libintl.h>
+#include <locale.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

View file

@ -1,56 +0,0 @@
--- util-linux-ng-2.13-rc3/sys-utils/ipcs.c.kzak 2007-04-25 14:43:38.000000000 +0200
+++ util-linux-ng-2.13-rc3/sys-utils/ipcs.c 2007-08-13 12:21:15.000000000 +0200
@@ -253,6 +253,26 @@
printf(" %-10d\n", ipcp->gid);
}
+static unsigned long long
+shminfo_from_proc(const char *name, unsigned long def)
+{
+ char path[256];
+ char buf[64];
+ FILE *f;
+ unsigned long long res = def;
+
+ if (!name)
+ return res;
+
+ snprintf(path, sizeof(path), "/proc/sys/kernel/%s", name);
+
+ if (!(f = fopen(path, "r")))
+ return res;
+ if (fgets(buf, sizeof(buf), f))
+ res = atoll(buf);
+ fclose(f);
+ return res;
+}
void do_shm (char format)
{
@@ -268,7 +288,7 @@
printf (_("kernel not configured for shared memory\n"));
return;
}
-
+
switch (format) {
case LIMITS:
printf (_("------ Shared Memory Limits --------\n"));
@@ -276,12 +296,12 @@
return;
/* glibc 2.1.3 and all earlier libc's have ints as fields
of struct shminfo; glibc 2.1.91 has unsigned long; ach */
- printf (_("max number of segments = %lu\n"),
- (unsigned long) shminfo.shmmni);
- printf (_("max seg size (kbytes) = %lu\n"),
- (unsigned long) (shminfo.shmmax >> 10));
+ printf (_("max number of segments = %llu\n"),
+ shminfo_from_proc("shmmni", shminfo.shmmni));
+ printf (_("max seg size (kbytes) = %llu\n"),
+ (shminfo_from_proc("shmmax", shminfo.shmmax) >> 10));
printf (_("max total shared memory (kbytes) = %llu\n"),
- sysconf(_SC_PAGESIZE) / 1024 * (unsigned long long) shminfo.shmall);
+ sysconf(_SC_PAGESIZE) / 1024 * shminfo_from_proc("shmall", shminfo.shmall));
printf (_("min seg size (bytes) = %lu\n"),
(unsigned long) shminfo.shmmin);
return;

View file

@ -1,11 +0,0 @@
--- util-linux-ng-2.13-rc3/login-utils/login.c.xxx 2007-08-13 12:11:14.000000000 +0200
+++ util-linux-ng-2.13-rc3/login-utils/login.c 2007-08-13 12:12:24.000000000 +0200
@@ -1402,7 +1402,7 @@
struct lastlog ll;
int fd;
- if ((fd = open(_PATH_LASTLOG, O_RDWR, 0)) >= 0) {
+ if ((fd = open(_PATH_LASTLOG, O_RDWR|O_CREAT, 0)) >= 0) {
lseek(fd, (off_t)pwd->pw_uid * sizeof(ll), SEEK_SET);
if (!quiet) {
if (read(fd, (char *)&ll, sizeof(ll)) == sizeof(ll) &&

View file

@ -1,11 +0,0 @@
--- util-linux-ng-2.13-rc3/login-utils/login.c.kzak 2007-06-29 01:13:51.000000000 +0200
+++ util-linux-ng-2.13-rc3/login-utils/login.c 2007-08-13 11:32:10.000000000 +0200
@@ -546,7 +546,7 @@
* Therefore, we are safe not setting it to anything
*/
- retcode = pam_start("login",username, &conv, &pamh);
+ retcode = pam_start(hflag?"remote":"login",username, &conv, &pamh);
if(retcode != PAM_SUCCESS) {
fprintf(stderr, _("login: PAM Failure, aborting: %s\n"),
pam_strerror(pamh, retcode));

View file

@ -1,60 +0,0 @@
From 53ca67faf2aa1d742119c3510ef5064e0761ed90 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Thu, 11 Oct 2007 16:18:29 +0200
Subject: [PATCH] mount: -L|-U segfault when label or uuid doesn't exist
# mount -L foo
Segmentation fault
mount(8) calls strcmp() with NULL argument.
Signed-off-by: Karel Zak <kzak@redhat.com>
---
mount/mount.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/mount/mount.c b/mount/mount.c
index 5bc2b30..96776db 100644
--- a/mount/mount.c
+++ b/mount/mount.c
@@ -1699,6 +1699,9 @@ getfs(const char *spec, const char *uuid, const char *label)
struct mntentchn *mc = NULL;
const char *devname = NULL;
+ if (!spec && !uuid && !label)
+ return NULL;
+
/*
* A) 99% of all cases, the spec on cmdline matches
* with spec in fstab
@@ -1761,7 +1764,7 @@ getfs(const char *spec, const char *uuid, const char *label)
* Earlier mtab was tried first, but this would sometimes try the
* wrong mount in case mtab had the root device entry wrong.
*/
- if (!mc)
+ if (!mc && (devname || spec))
mc = getmntfile (devname ? devname : spec);
if (devname)
@@ -1981,12 +1984,17 @@ main(int argc, char *argv[]) {
case 1:
/* mount [-nfrvw] [-o options] special | node
+ * mount -L label (or -U uuid)
* (/etc/fstab is necessary)
*/
if (types != NULL)
usage (stderr, EX_USAGE);
- mc = getfs(*argv, uuid, label);
+ if (uuid || label)
+ mc = getfs(NULL, uuid, label);
+ else
+ mc = getfs(*argv, NULL, NULL);
+
if (!mc) {
if (uuid || label)
die (EX_USAGE, _("mount: no such partition found"));
--
1.5.3.1

View file

@ -1,11 +0,0 @@
--- util-linux-ng-2.13-rc3/mount/mount.c.xxx 2007-08-07 01:20:15.000000000 +0200
+++ util-linux-ng-2.13-rc3/mount/mount.c 2007-08-13 11:58:45.000000000 +0200
@@ -182,6 +182,8 @@
{ "norelatime", 0, 1, MS_RELATIME }, /* Update access time without regard
to mtime/ctime */
#endif
+ { "kudzu", 0, 0, MS_COMMENT }, /* Silently remove this option (backwards compat use only - deprecated) */
+ { "managed", 0, 0, MS_COMMENT }, /* Silently remove this option */
{ NULL, 0, 0, 0 }
};

View file

@ -1,138 +0,0 @@
--- util-linux-ng-2.13-rc3/mount/umount.c.xxx 2007-05-30 10:18:12.000000000 +0200
+++ util-linux-ng-2.13-rc3/mount/umount.c 2007-08-13 12:02:07.000000000 +0200
@@ -434,7 +434,7 @@
umount_file (char *arg) {
struct mntentchn *mc, *fs;
const char *file, *options;
- int fstab_has_user, fstab_has_users, fstab_has_owner, fstab_has_group;
+ int fstab_has_user, fstab_has_users, fstab_has_owner, fstab_has_group, fstab_has_pamconsole;
int ok;
if (!*arg) { /* "" would be expanded to `pwd` */
@@ -521,13 +521,16 @@
fstab_has_users = contains(options, "users");
fstab_has_owner = contains(options, "owner");
fstab_has_group = contains(options, "group");
+ fstab_has_pamconsole = contains(options, "pamconsole");
ok = 0;
if (fstab_has_users)
ok = 1;
if (!ok && (fstab_has_user || fstab_has_owner ||
- fstab_has_group)) {
+ fstab_has_group || fstab_has_pamconsole)) {
+ char pamconsole_file_name[256];
+ struct stat sb;
char *user = getusername();
options = mc->m.mnt_opts;
@@ -537,6 +540,14 @@
if (user && mtab_user && streq (user, mtab_user))
ok = 1;
+
+ /*pam_console user check*/
+ if (user && fstab_has_pamconsole) {
+ snprintf (pamconsole_file_name, sizeof (pamconsole_file_name), "/var/run/console/%s", user);
+ if (stat (pamconsole_file_name, &sb) == 0) {
+ ok = 1;
+ }
+ }
}
if (!ok)
die (2, _("umount: only %s can unmount %s from %s"),
--- util-linux-ng-2.13-rc3/mount/fstab.5.xxx 2007-07-03 01:56:04.000000000 +0200
+++ util-linux-ng-2.13-rc3/mount/fstab.5 2007-08-13 12:02:07.000000000 +0200
@@ -156,10 +156,10 @@
.BR nfs (5).
Common for all types of file system are the options ``noauto''
(do not mount when "mount -a" is given, e.g., at boot time), ``user''
-(allow a user to mount), and ``owner''
-(allow device owner to mount), and ``comment''
+(allow a user to mount), ``owner''
+(allow device owner to mount), ``pamconsole'' (allow a user at the console to mount), and ``comment''
(e.g., for use by fstab-maintaining programs).
-The ``owner'' and ``comment'' options are Linux-specific.
+The ``owner'', ``pamconsole'' and ``comment'' options are Linux-specific.
For more details, see
.BR mount (8).
--- util-linux-ng-2.13-rc3/mount/mount.c.xxx 2007-08-13 12:00:15.000000000 +0200
+++ util-linux-ng-2.13-rc3/mount/mount.c 2007-08-13 12:05:15.000000000 +0200
@@ -108,14 +108,15 @@
#define MS_USER 0x20000000
#define MS_OWNER 0x10000000
#define MS_GROUP 0x08000000
+#define MS_PAMCONSOLE 0x04000000
#define MS_COMMENT 0x02000000
#define MS_LOOP 0x00010000
/* Options that we keep the mount system call from seeing. */
-#define MS_NOSYS (MS_NOAUTO|MS_USERS|MS_USER|MS_COMMENT|MS_LOOP)
+#define MS_NOSYS (MS_NOAUTO|MS_USERS|MS_USER|MS_COMMENT|MS_LOOP|MS_PAMCONSOLE)
/* Options that we keep from appearing in the options field in the mtab. */
-#define MS_NOMTAB (MS_REMOUNT|MS_NOAUTO|MS_USERS|MS_USER)
+#define MS_NOMTAB (MS_REMOUNT|MS_NOAUTO|MS_USERS|MS_USER|MS_PAMCONSOLE)
#define MS_PROPAGATION (MS_SHARED|MS_SLAVE|MS_UNBINDABLE|MS_PRIVATE)
@@ -155,6 +156,8 @@
{ "comment", 0, 0, MS_COMMENT}, /* fstab comment only (kudzu,_netdev)*/
/* add new options here */
+ { "pamconsole", 0, 0, MS_PAMCONSOLE }, /* Allow users at console to mount */
+ { "nopamconsole", 0, 1, MS_PAMCONSOLE }, /* Console user has no special privs */
#ifdef MS_NOSUB
{ "sub", 0, 1, MS_NOSUB }, /* allow submounts */
{ "nosub", 0, 0, MS_NOSUB }, /* don't allow submounts */
@@ -379,7 +382,7 @@
*mask &= ~om->mask;
else
*mask |= om->mask;
- if ((om->mask == MS_USER || om->mask == MS_USERS)
+ if ((om->mask == MS_USER || om->mask == MS_USERS || om->mask == MS_PAMCONSOLE)
&& !om->inv)
*mask |= MS_SECURE;
if ((om->mask == MS_OWNER || om->mask == MS_GROUP)
@@ -807,7 +810,29 @@
}
}
- /* James Kehl <mkehl@gil.com.au> came with a similar patch:
+ /* Red Hat patch: allow users at console to mount when fstab
+ contains the console option. This option should not be used
+ in a high security environment but is useful to give console
+ users the possibility of using locally attached devices
+ such as USB keychains and USB harddisks where it is now suitable
+ to give the console owner write access to the device node */
+ if (*flags & MS_PAMCONSOLE) {
+ char *username;
+ char pamconsole_file_name[256];
+ struct stat sb;
+
+ username = getusername ();
+
+ if (username != NULL) {
+ snprintf (pamconsole_file_name, sizeof (pamconsole_file_name),
+ "/var/run/console/%s", username);
+ if (stat (pamconsole_file_name, &sb) == 0) {
+ *flags |= MS_USER;
+ }
+ }
+ }
+
+ /* James Kehl <mkehl@gil.com.au> came with a similar patch:
allow an arbitrary user to mount when he is the owner of
the mount-point and has write-access to the device.
This is even less secure. Let me skip it for the time being;
@@ -823,7 +848,7 @@
*user = getusername();
}
- *flags &= ~(MS_OWNER | MS_GROUP);
+ *flags &= ~(MS_OWNER | MS_GROUP | MS_PAMCONSOLE);
}
static int

View file

@ -1,71 +0,0 @@
--- util-linux-ng-2.13-rc3/mount/fstab.c.kzak 2007-07-31 12:39:42.000000000 +0200
+++ util-linux-ng-2.13-rc3/mount/fstab.c 2007-08-13 12:24:40.000000000 +0200
@@ -264,6 +264,27 @@
return (ct == 1);
}
+/*
+ * Given the loop file LOOPFILE, and the mount point DIR, check that
+ * same file is already mounted on same directory
+ *
+ * Don't forget there's
+ * /path/loopfile /path/dir loop=/dev/loop0
+ * in mtab for loop devices.
+ */
+int
+is_mounted_same_loopfile(const char *loopfile, const char *dir) {
+ struct mntentchn *mc, *mc0;
+ int ct = 0;
+
+ mc0 = mtab_head();
+ for (mc = mc0->prev; mc && mc != mc0; mc = mc->prev)
+ if (streq(mc->m.mnt_fsname, loopfile) &&
+ streq(mc->m.mnt_dir, dir))
+ ct++;
+ return (ct == 1);
+}
+
/* Given the name FILE, try to find the option "loop=FILE" in mtab. */
struct mntentchn *
getmntoptfile (const char *file) {
--- util-linux-ng-2.13-rc3/mount/fstab.h.kzak 2007-05-30 10:18:12.000000000 +0200
+++ util-linux-ng-2.13-rc3/mount/fstab.h 2007-08-13 12:24:40.000000000 +0200
@@ -5,6 +5,7 @@
int mtab_is_writable(void);
int mtab_does_not_exist(void);
int is_mounted_once(const char *name);
+int is_mounted_same_loopfile(const char *loopfile, const char *dir);
struct mntentchn {
struct mntentchn *nxt, *prev;
--- util-linux-ng-2.13-rc3/mount/mount.c.kzak 2007-08-13 12:23:13.000000000 +0200
+++ util-linux-ng-2.13-rc3/mount/mount.c 2007-08-13 12:29:01.000000000 +0200
@@ -853,7 +853,7 @@
static int
loop_check(const char **spec, const char **type, int *flags,
- int *loop, const char **loopdev, const char **loopfile) {
+ int *loop, const char **loopdev, const char **loopfile, const char *dir) {
int looptype;
unsigned long long offset;
@@ -894,6 +894,10 @@
offset = opt_offset ? strtoull(opt_offset, NULL, 0) : 0;
+ if (is_mounted_same_loopfile(*loopfile, dir)) {
+ error(_("mount: %s already mounted on %s"), *loopfile, dir);
+ return EX_FAIL;
+ }
do {
if (!*loopdev || !**loopdev)
*loopdev = find_unused_loop_device();
@@ -1079,7 +1083,7 @@
* stale assignments of files to loop devices. Nasty when used for
* encryption.
*/
- res = loop_check(&spec, &types, &flags, &loop, &loopdev, &loopfile);
+ res = loop_check(&spec, &types, &flags, &loop, &loopdev, &loopfile, node);
if (res)
goto out;
}

View file

@ -1,59 +0,0 @@
From 1b1ff2d6edd2db321926f7243004937cb26f9f15 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Fri, 5 Oct 2007 12:22:13 +0200
Subject: [PATCH] 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.
Signed-off-by: Karel Zak <kzak@redhat.com>
---
misc-utils/script.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/misc-utils/script.c b/misc-utils/script.c
index d3272df..3b957d8 100644
--- a/misc-utils/script.c
+++ b/misc-utils/script.c
@@ -99,6 +99,7 @@ int tflg = 0;
static char *progname;
int die;
+int resized;
static void
die_if_link(char *fn) {
@@ -235,8 +236,14 @@ doinput() {
if (die == 0 && child && kill(child, 0) == -1 && errno == ESRCH)
die = 1;
- while (die == 0 && (cc = read(0, ibuf, BUFSIZ)) > 0)
- (void) write(master, ibuf, cc);
+ while (die == 0) {
+ if ((cc = read(0, ibuf, BUFSIZ)) > 0)
+ (void) write(master, ibuf, cc);
+ else if (cc == -1 && errno == EINTR && resized)
+ resized = 0;
+ else
+ break;
+ }
done();
}
@@ -255,11 +262,10 @@ finish(int dummy) {
void
resize(int dummy) {
+ resized = 1;
/* transmit window change information to the child */
(void) ioctl(0, TIOCGWINSZ, (char *)&win);
(void) ioctl(slave, TIOCSWINSZ, (char *)&win);
-
- kill(child, SIGWINCH);
}
/*
--
1.5.3.1

View file

@ -1,112 +0,0 @@
From db6041b3a569d78f5716baa5a134a3a857014337 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Wed, 30 May 2007 13:22:51 +0200
Subject: [PATCH] mount: automatically reinitialize swap with old swsuspend data
We have to reinitialize swap area with old (=useless) software suspend
data. The problem is that if we don't do it, then we get data
corruption the next time with suspended on.
Signed-off-by: Karel Zak <kzak@redhat.com>
---
mount/swapon.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 63 insertions(+), 0 deletions(-)
diff --git a/mount/swapon.c b/mount/swapon.c
index ed91afc..3f9b442 100644
--- a/mount/swapon.c
+++ b/mount/swapon.c
@@ -10,6 +10,9 @@
#include <errno.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <fcntl.h>
#include "xmalloc.h"
#include "swap_constants.h"
#include "nls.h"
@@ -17,6 +20,8 @@
#include "realpath.h"
#include "mount_paths.h"
+#define PATH_MKSWAP "/sbin/mkswap"
+
#ifdef HAVE_SYS_SWAP_H
# include <sys/swap.h>
#endif
@@ -158,6 +163,52 @@ display_summary(void)
}
static int
+swap_is_swsuspend(const char *device) {
+ const char *type = fsprobe_get_fstype_by_devname(device);
+
+ return (type && strcmp(type, "swsuspend") == 0) ? 1 : 0;
+}
+
+/* calls mkswap */
+static int
+swap_reinitialize(const char *device) {
+ const char *label = fsprobe_get_label_by_devname(device);
+ pid_t pid;
+ int status, ret;
+
+ switch((pid=fork())) {
+ case -1: /* fork error */
+ fprintf(stderr, _("%s: cannot fork: %s\n"),
+ progname, strerror(errno));
+ return -1;
+
+ case 0: /* child */
+ if (label && *label)
+ execl(PATH_MKSWAP, PATH_MKSWAP, "-L", label, device, NULL);
+ else
+ execl(PATH_MKSWAP, PATH_MKSWAP, device, NULL);
+ exit(1); /* error */
+
+ default: /* parent */
+ do {
+ if ((ret = waitpid(pid, &status, 0)) < 0
+ && errno == EINTR)
+ continue;
+ else if (ret < 0) {
+ fprintf(stderr, _("%s: waitpid: %s\n"),
+ progname, strerror(errno));
+ return -1;
+ }
+ } while (0);
+
+ /* mkswap returns: 0=suss, 1=error */
+ if (WIFEXITED(status) && WEXITSTATUS(status)==0)
+ return 0; /* ok */
+ }
+ return -1; /* error */
+}
+
+static int
do_swapon(const char *orig_special, int prio, int canonic) {
int status;
struct stat st;
@@ -179,6 +230,18 @@ do_swapon(const char *orig_special, int prio, int canonic) {
return -1;
}
+ /* We have to reinitialize swap with old (=useless) software suspend
+ * data. The problem is that if we don't do it, then we get data
+ * corruption the next time with suspended on.
+ */
+ if (swap_is_swsuspend(special)) {
+ fprintf(stdout, _("%s: %s: software suspend data detected. "
+ "Reinitializing the swap.\n"),
+ progname, special);
+ if (swap_reinitialize(special) < 0)
+ return -1;
+ }
+
/* people generally dislike this warning - now it is printed
only when `verbose' is set */
if (verbose) {
--
1.5.2.2

View file

@ -1,11 +0,0 @@
# This file and interface are deprecated.
# Applications needing raw device access should open regular
# block devices with O_DIRECT.
#
# Enter raw device bindings here.
#
# An example would be:
# ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N"
# to bind /dev/raw/raw1 to /dev/sda, or
# ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="1", RUN+="/bin/raw /dev/raw/raw2 %M %m"
# to bind /dev/raw/raw2 to the device with major 8, minor 1.

View file

@ -1,6 +0,0 @@
#%PAM-1.0
auth sufficient pam_rootok.so
auth include system-auth
account include system-auth
password include system-auth
session include system-auth

View file

@ -1,15 +0,0 @@
#%PAM-1.0
auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
auth include system-auth
account required pam_nologin.so
account include system-auth
password include system-auth
# pam_selinux.so close should be the first session rule
session required pam_selinux.so close
session optional pam_keyinit.so force revoke
session include system-auth
session required pam_loginuid.so
session optional pam_console.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session required pam_selinux.so open
session optional pam_ck_connector.so

View file

@ -1,15 +0,0 @@
#%PAM-1.0
auth required pam_securetty.so
auth include system-auth
account required pam_nologin.so
account include system-auth
password include system-auth
# pam_selinux.so close should be the first session rule
session required pam_selinux.so close
session optional pam_keyinit.so force revoke
session include system-auth
session required pam_loginuid.so
session optional pam_console.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session required pam_selinux.so open

File diff suppressed because it is too large Load diff