Compare commits

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

32 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
26 changed files with 7 additions and 3007 deletions

View file

@ -1,2 +0,0 @@
util-linux-ng-2.16.tar.bz2
floppy-0.16.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,20 +0,0 @@
#! /bin/bash
#
# Copyright (C) 2009 Eric Paris <eparis@redhat.com>
# Daniel Walsh <dwalsh@redhat.com>
# Karel Zak <kzak@redhat.com>
#
# http://bugzilla.redhat.com/show_bug.cgi?id=476964
#
# Usage:
# /sbin/mount.tmpfs spec dir [-sfnv] [-o options]
#
if ! echo "$@" | grep -q -E '(fs|def|root)?context='; then
con=$(ls --scontext -d "$2" | cut -f 1 -d ' ')
if [ -n "$con" ] && [ "$con" != "?" ] && [ "$con" != "unlabeled" ]; then
exec /bin/mount "$@" -o "rootcontext=\"$con\"" -i -t tmpfs
fi
fi
exec /bin/mount "$@" -i -t tmpfs

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 @@
9623380641b0c2e0449f5b1ecc567663 util-linux-ng-2.16.tar.bz2
7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2

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,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,13 +0,0 @@
Index: util-linux-ng-2.14.2-rc1/login-utils/login.c
===================================================================
--- util-linux-ng-2.14.2-rc1.orig/login-utils/login.c
+++ util-linux-ng-2.14.2-rc1/login-utils/login.c
@@ -1415,7 +1415,7 @@ dolastlog(int quiet) {
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,93 +0,0 @@
diff -up util-linux-ng-2.14-rc3/disk-utils/blockdev.c.rm util-linux-ng-2.14-rc3/disk-utils/blockdev.c
--- util-linux-ng-2.14-rc3/disk-utils/blockdev.c.rm 2008-04-22 10:59:53.000000000 +0200
+++ util-linux-ng-2.14-rc3/disk-utils/blockdev.c 2008-05-19 12:31:52.000000000 +0200
@@ -10,6 +10,7 @@
#include <unistd.h>
#include <sys/ioctl.h>
#include <errno.h>
+#include <linux/blkpg.h>
#include "nls.h"
#include "blkdev.h"
@@ -47,8 +48,11 @@ struct bdc {
{ "--setfra", "BLKFRASET", BLKFRASET, ARGINTA, 0, "FSREADAHEAD", N_("set filesystem readahead") },
{ "--getfra", "BLKFRAGET", BLKFRAGET, ARGLINTG, -1, NULL, N_("get filesystem readahead") },
{ "--flushbufs", "BLKFLSBUF", BLKFLSBUF, ARGNONE, 0, NULL, N_("flush buffers") },
- { "--rereadpt", "BLKRRPART", BLKRRPART, ARGNONE, 0, NULL,
- N_("reread partition table") },
+ { "--rereadpt", "BLKRRPART", BLKRRPART, ARGNONE, 0, NULL, N_("reread partition table") },
+#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]))
@@ -89,6 +93,40 @@ find_cmd(char *s) {
return -1;
}
+#ifdef BLKPG
+static int
+disable_partition(int fd, int partno) {
+ struct blkpg_partition part = {
+ .pno = partno,
+ .start = 0,
+ .length = 0,
+ .devname[0] = 0,
+ .volname[0] = 0,
+ };
+ struct blkpg_ioctl_arg io = {
+ .op = BLKPG_DEL_PARTITION,
+ .datalen = sizeof(part),
+ .data = &part,
+ .flags = 0,
+ };
+ 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);
@@ -206,6 +244,12 @@ do_commands(int fd, char **argv, int d)
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:
@@ -223,6 +267,13 @@ do_commands(int fd, char **argv, int d)
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,54 +0,0 @@
From 1f1614f6a89de4b06e1843d0fadbca3f8a5521fe Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Fri, 11 Sep 2009 14:00:50 +0200
Subject: [PATCH 1/2] sfdisk: dump has to be $LANG insensitive
This stupid bug has been introduced by:
commit add5133f4ad5136aac3ce7627e615d14893d0aeb
Author: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Date: Fri Oct 3 08:52:35 2008 +0200
fdisk: several strings without gettext calls
... so it shows that we need to improve our review process... :-(
Address-Red-Hat-Bug: #522718
Signed-off-by: Karel Zak <kzak@redhat.com>
---
fdisk/sfdisk.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c
index 8fae5bb..427cb40 100644
--- a/fdisk/sfdisk.c
+++ b/fdisk/sfdisk.c
@@ -930,8 +930,8 @@ get_disksize(int format) {
static void
out_partition_header(char *dev, int format, struct geometry G) {
if (dump) {
- printf(_("# partition table of %s\n"), dev);
- printf(_("unit: sectors\n\n"));
+ printf("# partition table of %s\n", dev);
+ printf("unit: sectors\n\n");
return;
}
@@ -1059,12 +1059,12 @@ out_partition(char *dev, int format, struct part_desc *p,
size = p->size;
if (dump) {
- printf(_(" start=%9lu"), start);
- printf(_(", size=%9lu"), size);
+ printf(" start=%9lu", start);
+ printf(", size=%9lu", size);
if (p->ptype == DOS_TYPE) {
printf(", Id=%2x", p->p.sys_type);
if (p->p.bootable == 0x80)
- printf(_(", bootable"));
+ printf(", bootable");
}
printf("\n");
return;
--
1.6.2.5

View file

@ -1,48 +0,0 @@
diff -up util-linux-ng-2.15.1-rc1/sys-utils/ipcs.c.kzak util-linux-ng-2.15.1-rc1/sys-utils/ipcs.c
--- util-linux-ng-2.15.1-rc1/sys-utils/ipcs.c.kzak 2009-03-25 13:19:08.000000000 +0100
+++ util-linux-ng-2.15.1-rc1/sys-utils/ipcs.c 2009-06-04 15:22:48.000000000 +0200
@@ -243,6 +243,26 @@ print_perms (int id, struct ipc_perm *ip
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)
{
@@ -266,12 +286,12 @@ void do_shm (char format)
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"),
- getpagesize() / 1024 * (unsigned long long) shminfo.shmall);
+ getpagesize() / 1024 * shminfo_from_proc("shmall", shminfo.shmall));
printf (_("min seg size (bytes) = %lu\n"),
(unsigned long) shminfo.shmmin);
return;

View file

@ -1,75 +0,0 @@
diff -up util-linux-ng-2.16/misc-utils/blkid.8.kzak util-linux-ng-2.16/misc-utils/blkid.8
--- util-linux-ng-2.16/misc-utils/blkid.8.kzak 2009-07-04 01:20:01.000000000 +0200
+++ util-linux-ng-2.16/misc-utils/blkid.8 2009-07-16 00:41:28.000000000 +0200
@@ -64,7 +64,7 @@ more devices.
Read from
.I cachefile
instead of reading from the default cache file
-.IR /etc/blkid.tab .
+.IR /etc/blkid/blkid.tab .
If you want to start with a clean cache (i.e. don't report devices previously
scanned but not necessarily available at this time), specify
.IR /dev/null .
@@ -179,7 +179,7 @@ Display version number and exit.
Write the device cache to
.I writecachefile
instead of writing it to the default cache file
-.IR /etc/blkid.tab .
+.IR /etc/blkid/blkid.tab .
If you don't want to save the cache to the default file, specify
.IR /dev/null.
If not specified it will be the same file as that given by the
diff -up util-linux-ng-2.16/misc-utils/blkid.c.kzak util-linux-ng-2.16/misc-utils/blkid.c
--- util-linux-ng-2.16/misc-utils/blkid.c.kzak 2009-07-04 01:20:01.000000000 +0200
+++ util-linux-ng-2.16/misc-utils/blkid.c 2009-07-16 00:41:28.000000000 +0200
@@ -60,7 +60,7 @@ static void usage(int error)
" [-t <token>] [-w <file>] [dev ...]\n\n"
" %1$s -p [-O <offset>] [-S <size>] [-o format] <dev> [dev ...]\n\n"
"Options:\n"
- " -c <file> cache file (default: /etc/blkid.tab, /dev/null = none)\n"
+ " -c <file> cache file (default: /etc/blkid/blkid.tab, /dev/null = none)\n"
" -h print this usage message and exit\n"
" -g garbage collect the blkid cache\n"
" -o <format> output format; can be one of:\n"
diff -up util-linux-ng-2.16/shlibs/blkid/libblkid.3.kzak util-linux-ng-2.16/shlibs/blkid/libblkid.3
--- util-linux-ng-2.16/shlibs/blkid/libblkid.3.kzak 2009-07-04 01:20:03.000000000 +0200
+++ util-linux-ng-2.16/shlibs/blkid/libblkid.3 2009-07-16 00:40:13.000000000 +0200
@@ -24,7 +24,7 @@ A common use is to allow use of LABEL= a
specific block device names into configuration files.
.P
Block device information is normally kept in a cache file
-.I /etc/blkid.tab
+.I /etc/blkid/blkid.tab
and is verified to still be valid before being returned to the user
(if the user has read permission on the raw block device, otherwise not).
The cache file also allows unprivileged users (normally anyone other
@@ -59,7 +59,7 @@ symlink does not match with LABEL or UUI
.I CACHE_FILE=<path>
Overrides the standard location of the cache file. This setting can be
overridden by the environment variable BLKID_FILE. Default is
-.I /etc/blkid.tab.
+.I /etc/blkid/blkid.tab.
.TP
.I EVALUATE=<methods>
Defines LABEL and UUID evaluation method(s). Currently, the libblkid library
@@ -77,7 +77,7 @@ from Ted Ts'o. The library was subseque
The low-level probing code was rewritten by Karel Zak.
.SH FILES
.TP 18
-.I /etc/blkid.tab
+.I /etc/blkid/blkid.tab
caches data extracted from each recognized block device
.TP
.I /etc/blkid.conf
diff -up util-linux-ng-2.16/shlibs/blkid/src/blkidP.h.kzak util-linux-ng-2.16/shlibs/blkid/src/blkidP.h
--- util-linux-ng-2.16/shlibs/blkid/src/blkidP.h.kzak 2009-07-13 20:30:36.000000000 +0200
+++ util-linux-ng-2.16/shlibs/blkid/src/blkidP.h 2009-07-16 00:40:13.000000000 +0200
@@ -223,7 +223,7 @@ struct blkid_struct_cache
extern char *blkid_strdup(const char *s);
extern char *blkid_strndup(const char *s, const int length);
-#define BLKID_CACHE_FILE "/etc/blkid.tab"
+#define BLKID_CACHE_FILE "/etc/blkid/blkid.tab"
#define BLKID_CONFIG_FILE "/etc/blkid.conf"
#define BLKID_ERR_IO 5

View file

@ -1,26 +0,0 @@
From 71cd5d8a775d98e93f7583210a5b53c52b4ec34f Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Mon, 14 Sep 2009 10:24:07 +0200
Subject: [PATCH] libblkid: fix typo (swsupend -> swsuspend)
Signed-off-by: Karel Zak <kzak@redhat.com>
---
shlibs/blkid/src/probers/swap.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/shlibs/blkid/src/probers/swap.c b/shlibs/blkid/src/probers/swap.c
index 86eb94c..c289488 100644
--- a/shlibs/blkid/src/probers/swap.c
+++ b/shlibs/blkid/src/probers/swap.c
@@ -118,7 +118,7 @@ const struct blkid_idinfo swap_idinfo =
const struct blkid_idinfo swsuspend_idinfo =
{
- .name = "swsupend",
+ .name = "swsuspend",
.usage = BLKID_USAGE_OTHER,
.probefunc = probe_swsuspend,
.magics =
--
1.6.2.5

View file

@ -1,57 +0,0 @@
From e94e99523d8a3d0218fe16b0a7a2c5886ccbc652 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Sun, 23 Aug 2009 20:33:10 +0200
Subject: [PATCH] libblkid: add *.ko.gz support to modules.dep parser
Address-Red-Hat-Bug: #518572
Signed-off-by: Karel Zak <kzak@redhat.com>
---
shlibs/blkid/src/probers/ext.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/shlibs/blkid/src/probers/ext.c b/shlibs/blkid/src/probers/ext.c
index a4d35d1..c27411d 100644
--- a/shlibs/blkid/src/probers/ext.c
+++ b/shlibs/blkid/src/probers/ext.c
@@ -224,8 +224,8 @@ static int check_for_modules(const char *fs_name)
#ifdef __linux__
struct utsname uts;
FILE *f;
- char buf[1024], *cp, *t;
- int i;
+ char buf[1024], *cp;
+ int namesz;
if (uname(&uts))
return 0;
@@ -234,6 +234,9 @@ static int check_for_modules(const char *fs_name)
f = fopen(buf, "r");
if (!f)
return 0;
+
+ namesz = strlen(fs_name);
+
while (!feof(f)) {
if (!fgets(buf, sizeof(buf), f))
break;
@@ -244,13 +247,10 @@ static int check_for_modules(const char *fs_name)
if ((cp = strrchr(buf, '/')) == NULL)
continue;
cp++;
- i = strlen(cp);
- if (i > 3) {
- t = cp + i - 3;
- if (!strcmp(t, ".ko"))
- *t = 0;
- }
- if (!strcmp(cp, fs_name)) {
+
+ if (!strncmp(cp, fs_name, namesz) &&
+ (!strcmp(cp + namesz, ".ko") ||
+ !strcmp(cp + namesz, ".ko.gz"))) {
fclose(f);
return 1;
}
--
1.6.2.5

View file

@ -1,51 +0,0 @@
From 92cf3ab964266603cf36272d0eec96cd07fa083c Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Thu, 13 Aug 2009 21:55:43 +0200
Subject: [PATCH] libblkid: fix ext2 detection on systems with ext4 only
Address-Red-Hat-Bug: #513104
Signed-off-by: Karel Zak <kzak@redhat.com>
---
shlibs/blkid/src/probers/ext.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/shlibs/blkid/src/probers/ext.c b/shlibs/blkid/src/probers/ext.c
index 671e556..a4d35d1 100644
--- a/shlibs/blkid/src/probers/ext.c
+++ b/shlibs/blkid/src/probers/ext.c
@@ -483,11 +483,6 @@ static int probe_ext4(blkid_probe pr, const struct blkid_idmag *mag)
if (fi & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)
return -BLKID_ERR_PARAM;
- /* Ext4 has at least one feature which ext3 doesn't understand */
- if (!(frc & EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) &&
- !(fi & EXT3_FEATURE_INCOMPAT_UNSUPPORTED))
- return -BLKID_ERR_PARAM;
-
/*
* If the filesystem does not have a journal and ext2 is not
* present, then force this to be detected as an ext2
@@ -498,6 +493,12 @@ static int probe_ext4(blkid_probe pr, const struct blkid_idmag *mag)
get_linux_version() >= EXT4_SUPPORTS_EXT2)
goto force_ext4;
+ /* Ext4 has at least one feature which ext3 doesn't understand */
+ if (!(frc & EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) &&
+ !(fi & EXT3_FEATURE_INCOMPAT_UNSUPPORTED))
+ return -BLKID_ERR_PARAM;
+
+force_ext4:
/*
* If the filesystem is a OK for use by in-development
* filesystem code, and ext4dev is supported or ext4 is not
@@ -513,7 +514,6 @@ static int probe_ext4(blkid_probe pr, const struct blkid_idmag *mag)
return -BLKID_ERR_PARAM;
}
-force_ext4:
ext_get_info(pr, 4, es);
return 0;
}
--
1.6.2.5

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,16 +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 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 required pam_namespace.so
session optional pam_keyinit.so force revoke
session include system-auth
-session optional pam_ck_connector.so

View file

@ -1,14 +0,0 @@
#%PAM-1.0
auth required pam_securetty.so
auth include password-auth
account required pam_nologin.so
account include password-auth
password include password-auth
# pam_selinux.so close should be the first session rule
session required pam_selinux.so close
session required pam_loginuid.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 required pam_namespace.so
session optional pam_keyinit.so force revoke
session include password-auth

File diff suppressed because it is too large Load diff

View file

@ -1,74 +0,0 @@
#!/bin/bash
#
# uuidd uuidd daemon for unique time-based UUID generation
#
# Author: Eric Sandeen <sandeen@redhat.com>
#
# chkconfig: - 60 99
#
# description: uuidd is a helper daemon to guarantee uniqueness of \
# time-based UUIDs when using libuuid.
# processname: uuidd
# pidfile: /var/lib/libuuid/uuidd.pid
#
### BEGIN INIT INFO
# Provides: uuidd
# Required-Start: $time $local_fs
# Required-Stop: $time $local_fs
# Default-Stop: 0 1 6
# Short-Description: UUID daemon
# Description: Daemon which guarantees uniqueness of time-based UUIDS
# when using libuuid.
### END INIT INFO
# source function library
. /etc/rc.d/init.d/functions
RETVAL=0
DAEMON=uuidd
start() {
echo -n $"Starting uuidd: "
daemon --user uuidd --pidfile /var/run/uuidd/uuidd.pid /usr/sbin/uuidd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/uuidd
}
stop() {
echo -n $"Stopping uuidd: "
killproc uuidd
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/uuidd
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|force-reload|reload)
restart
;;
condrestart)
[ -f /var/lock/subsys/uuidd ] && restart
;;
status)
status -p /var/run/uuidid/uuidd.pid uuidd uuidd
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
exit 1
esac
exit $RETVAL