Compare commits

..

6 commits

Author SHA1 Message Date
Fedora Release Engineering
0dcd13e80a dist-git conversion 2010-07-29 14:50:17 +00:00
Bill Nottingham
1c0240aae1 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:16:35 +00:00
kzak
208356187e - fix #501350 - there's no way to turn off the relatime filesystem mount
misfeature.
2009-09-17 10:39:40 +00:00
kzak
0758c79dc1 - fix #522718 - sfdisk -d /dev/xxx | sfdisk --force /dev/yyy fails when
LANG is set
2009-09-11 12:27:08 +00:00
kzak
6436e0def3 - #498984 - should man page for "mount" mention ext4? 2009-06-01 12:27:12 +00:00
Jesse Keating
0dae9adee6 Initialize branch F-11 for util-linux-ng 2009-04-15 07:22:03 +00:00
29 changed files with 3163 additions and 6 deletions

5
.gitignore vendored
View file

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

View file

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

20
mount.tmpfs Normal file
View file

@ -0,0 +1,20 @@
#! /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

63
nologin.8 Normal file
View file

@ -0,0 +1,63 @@
.\" $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 .

58
nologin.c Normal file
View file

@ -0,0 +1,58 @@
/* $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);
}

2
sources Normal file
View file

@ -0,0 +1,2 @@
b9d0053a22cfcbf0b9c0aa6d6eccfbc8 util-linux-ng-2.14.2.tar.bz2
7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2

View file

@ -0,0 +1,10 @@
--- 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

@ -0,0 +1,23 @@
--- 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

@ -0,0 +1,102 @@
--- 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

@ -0,0 +1,10 @@
--- 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

@ -0,0 +1,13 @@
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

@ -0,0 +1,93 @@
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

@ -0,0 +1,79 @@
From 11ea22d5a3dbb69557a4e1c7e3c862b0765102b5 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Thu, 8 Jan 2009 11:44:27 -0500
Subject: [PATCH] dmesg: Add -r (raw) option.
Useful for debugging which kernel messages are ruining your quiet
bootup.
Signed-off-by: Adam Jackson <ajax@redhat.com>
---
sys-utils/dmesg.1 | 5 ++++-
sys-utils/dmesg.c | 8 ++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/sys-utils/dmesg.1 b/sys-utils/dmesg.1
index d5dfa9d..33fd8b0 100644
--- a/sys-utils/dmesg.1
+++ b/sys-utils/dmesg.1
@@ -4,7 +4,7 @@
.SH NAME
dmesg \- print or control the kernel ring buffer
.SH SYNOPSIS
-.BI "dmesg [ \-c ] [ \-n " level " ] [ \-s " bufsize " ]"
+.BI "dmesg [ \-c ] [ -r ] [ \-n " level " ] [ \-s " bufsize " ]"
.SH DESCRIPTION
.B dmesg
is used to examine or control the kernel ring buffer.
@@ -22,6 +22,9 @@ file to whoever can debug their problem.
.B \-c
Clear the ring buffer contents after printing.
.TP
+.B \-r
+Print the raw message buffer, i.e., don't strip the log level prefixes.
+.TP
.BI \-s bufsize
Use a buffer of size
.I bufsize
diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c
index ac0535d..b634d86 100644
--- a/sys-utils/dmesg.c
+++ b/sys-utils/dmesg.c
@@ -56,13 +56,14 @@ main(int argc, char *argv[]) {
int level = 0;
int lastc;
int cmd = 3; /* Read all messages in the ring buffer */
+ int raw = 0;
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
progname = argv[0];
- while ((c = getopt(argc, argv, "cn:s:")) != -1) {
+ while ((c = getopt(argc, argv, "crn:s:")) != -1) {
switch (c) {
case 'c':
cmd = 4; /* Read and clear all messages */
@@ -71,6 +72,9 @@ main(int argc, char *argv[]) {
cmd = 8; /* Set level of messages */
level = atoi(optarg);
break;
+ case 'r':
+ raw = 1;
+ break;
case 's':
bufsize = atoi(optarg);
if (bufsize < 4096)
@@ -131,7 +135,7 @@ main(int argc, char *argv[]) {
lastc = '\n';
for (i = 0; i < n; i++) {
- if ((i == 0 || buf[i - 1] == '\n') && buf[i] == '<') {
+ if (!raw && (i == 0 || buf[i - 1] == '\n') && buf[i] == '<') {
i++;
while (buf[i] >= '0' && buf[i] <= '9')
i++;
--
1.6.0.6

View file

@ -0,0 +1,70 @@
From 10e3d0319a009a86a92c26da274e50850da0a9b3 Mon Sep 17 00:00:00 2001
From: Eric Sandeen <sandeen@redhat.com>
Date: Thu, 26 Feb 2009 09:53:09 +0100
Subject: [PATCH] fdisk: doesn't handle large (4KiB) sectors properly
fdisk (at least with the -u option) does not handle sector sizes other
than 512.
Address-Red-Hat-Bugzilla: #487227
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
---
fdisk/fdisk.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c
index 9504e7a..0c83747 100644
--- a/fdisk/fdisk.c
+++ b/fdisk/fdisk.c
@@ -212,6 +212,7 @@ unsigned long long sector_offset = 1, extended_offset = 0, sectors;
unsigned int heads,
cylinders,
sector_size = DEFAULT_SECTOR_SIZE,
+ sector_factor = 1,
user_set_sector_size = 0,
units_per_sector = 1,
display_in_cyl_units = 1;
@@ -905,11 +906,10 @@ get_partition_table_geometry(void) {
void
get_geometry(int fd, struct geom *g) {
- int sec_fac;
unsigned long long llsectors, llcyls;
get_sectorsize(fd);
- sec_fac = sector_size / 512;
+ sector_factor = sector_size / 512;
guess_device_type(fd);
heads = cylinders = sectors = 0;
kern_heads = kern_sectors = 0;
@@ -934,7 +934,7 @@ get_geometry(int fd, struct geom *g) {
if (dos_compatible_flag)
sector_offset = sectors;
- llcyls = total_number_of_sectors / (heads * sectors * sec_fac);
+ llcyls = total_number_of_sectors / (heads * sectors * sector_factor);
cylinders = llcyls;
if (cylinders != llcyls) /* truncated? */
cylinders = ~0;
@@ -1640,7 +1640,7 @@ list_disk_geometry(void) {
heads, sectors, cylinders);
if (units_per_sector == 1)
printf(_(", total %llu sectors"),
- total_number_of_sectors / (sector_size/512));
+ total_number_of_sectors / sector_factor);
printf("\n");
printf(_("Units = %s of %d * %d = %d bytes\n"),
str_units(PLURAL),
@@ -2030,7 +2030,7 @@ add_partition(int n, int sys) {
if (display_in_cyl_units || !total_number_of_sectors)
llimit = heads * sectors * cylinders - 1;
else
- llimit = total_number_of_sectors - 1;
+ llimit = (total_number_of_sectors / sector_factor) - 1;
limit = llimit;
if (limit != llimit)
limit = 0x7fffffff;
--
1.6.0.6

View file

@ -0,0 +1,63 @@
diff -up util-linux-ng-2.14.2/fdisk/fdisk.c.kzak util-linux-ng-2.14.2/fdisk/fdisk.c
--- util-linux-ng-2.14.2/fdisk/fdisk.c.kzak 2009-03-19 09:59:50.000000000 +0100
+++ util-linux-ng-2.14.2/fdisk/fdisk.c 2009-03-19 09:59:50.000000000 +0100
@@ -216,7 +216,7 @@ unsigned int heads,
units_per_sector = 1,
display_in_cyl_units = 1;
-unsigned long long total_number_of_sectors;
+unsigned long long total_number_of_sectors; /* (!) 512-byte sectors */
#define dos_label (!sun_label && !sgi_label && !aix_label && !mac_label && !osf_label)
int sun_label = 0; /* looking at sun disklabel */
@@ -892,7 +892,7 @@ get_partition_table_geometry(void) {
void
get_geometry(int fd, struct geom *g) {
- unsigned long long llsectors, llcyls;
+ unsigned long long llcyls;
get_sectorsize(fd);
sector_factor = sector_size / 512;
@@ -911,10 +911,8 @@ get_geometry(int fd, struct geom *g) {
pt_sectors ? pt_sectors :
kern_sectors ? kern_sectors : 63;
- if (blkdev_get_sectors(fd, &llsectors) == -1)
- llsectors = 0;
-
- total_number_of_sectors = llsectors;
+ if (blkdev_get_sectors(fd, &total_number_of_sectors) == -1)
+ total_number_of_sectors = 0;
sector_offset = 1;
if (dos_compatible_flag)
@@ -1922,7 +1920,8 @@ check(int n, unsigned int h, unsigned in
static void
verify(void) {
int i, j;
- unsigned long total = 1;
+ unsigned long long total = 1;
+ unsigned long long n_sectors = (total_number_of_sectors / sector_factor);
unsigned long long first[partitions], last[partitions];
struct partition *p;
@@ -1985,12 +1984,12 @@ verify(void) {
}
}
- if (total > total_number_of_sectors)
- printf(_("Total allocated sectors %ld greater than the maximum"
- " %lld\n"), total, total_number_of_sectors);
- else if (total < total_number_of_sectors)
- printf(_("%lld unallocated sectors\n"),
- total_number_of_sectors - total);
+ if (total > n_sectors)
+ printf(_("Total allocated sectors %llu greater than the maximum"
+ " %llu\n"), total, n_sectors);
+ else if (total < n_sectors)
+ printf(_("%lld unallocated %d-byte sectors\n"),
+ n_sectors - total, sector_size);
}
static void

View file

@ -0,0 +1,44 @@
From 8905beda2abb59b48ba00c5d521c934ead4df80b Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Mon, 9 Mar 2009 09:52:08 +0100
Subject: [PATCH] fdisk: support "-b 4096" option
The fdisk code is more ready for 4kB sectors and it makes sense to
support such sectr size for "-b" option.
Address-Red-Hat-Bugzilla: #218915
Signed-off-by: Karel Zak <kzak@redhat.com>
---
fdisk/fdisk.8 | 2 +-
fdisk/fdisk.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fdisk/fdisk.8 b/fdisk/fdisk.8
index aea8820..30ee9d4 100644
--- a/fdisk/fdisk.8
+++ b/fdisk/fdisk.8
@@ -166,7 +166,7 @@ program and Linux partitions with the Linux fdisk or Linux cfdisk program.
.SH OPTIONS
.TP
.BI "\-b " sectorsize
-Specify the sector size of the disk. Valid values are 512, 1024, or 2048.
+Specify the sector size of the disk. Valid values are 512, 1024, 2048 or 4096.
(Recent kernels know the sector size. Use this only on old kernels or
to override the kernel's ideas.)
.TP
diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c
index b7e517a..5593503 100644
--- a/fdisk/fdisk.c
+++ b/fdisk/fdisk.c
@@ -2612,7 +2612,7 @@ main(int argc, char **argv) {
*/
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;
--
1.6.0.6

View file

@ -0,0 +1,54 @@
From 841f86dbc2e35166fd43341c8eb144680b0c7ece Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Wed, 11 Mar 2009 12:49:50 +0100
Subject: [PATCH] flockc: segfaults when file name is not given
$ flock -s
Segmentation fault
ltrace:
__libc_start_main(0x8048870, 2, 0xbfe9f404, 0x8049070, 0x8049060 <unfinished ...>
getopt_long(2, 0xbfe9f404, "+sexnouw:hV?", 0x80494e0, 0xbfe9f354) = 115
getopt_long(2, 0xbfe9f404, "+sexnouw:hV?", 0x80494e0, 0xbfe9f354) = -1
strtol(0, 0xbfe9f34c, 10, 0x80494e0, 0xbfe9f354 <unfinished ...>
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
Addresses-Red-Had-Bugzilla: #489672
Signed-off-by: Karel Zak <kzak@redhat.com>
---
sys-utils/flock.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/sys-utils/flock.c b/sys-utils/flock.c
index 029e436..3386e15 100644
--- a/sys-utils/flock.c
+++ b/sys-utils/flock.c
@@ -217,7 +217,7 @@ int main(int argc, char *argv[])
EX_NOINPUT);
}
- } else {
+ } else if (optind < argc) {
/* Use provided file descriptor */
fd = (int)strtol(argv[optind], &eon, 10);
@@ -226,8 +226,15 @@ int main(int argc, char *argv[])
exit(EX_USAGE);
}
+ } else {
+ /* Bad options */
+
+ fprintf(stderr, "%s: requires file descriptor, file or directory\n",
+ program);
+ exit(EX_USAGE);
}
+
if ( have_timeout ) {
if ( timeout.it_value.tv_sec == 0 &&
timeout.it_value.tv_usec == 0 ) {
--
1.6.0.6

View file

@ -0,0 +1,57 @@
diff -up util-linux-ng-2.14.2-rc1/sys-utils/ipcs.c.kzak util-linux-ng-2.14.2-rc1/sys-utils/ipcs.c
--- util-linux-ng-2.14.2-rc1/sys-utils/ipcs.c.kzak 2008-12-22 18:53:06.000000000 +0100
+++ util-linux-ng-2.14.2-rc1/sys-utils/ipcs.c 2008-12-22 19:31:20.000000000 +0100
@@ -253,6 +253,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)
{
@@ -268,7 +288,7 @@ void do_shm (char format)
printf (_("kernel not configured for shared memory\n"));
return;
}
-
+
switch (format) {
case LIMITS:
printf (_("------ Shared Memory Limits --------\n"));
@@ -276,12 +296,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

@ -0,0 +1,55 @@
From 067f5343c86ed6dd135cdf57eb99aa3f982fceed Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Tue, 17 Mar 2009 21:00:42 +0100
Subject: [PATCH] login: use "remote" as a PAM service name for "login -h"
Signed-off-by: Karel Zak <kzak@redhat.com>
---
login-utils/login.1 | 10 ++++++++++
login-utils/login.c | 2 +-
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/login-utils/login.1 b/login-utils/login.1
index 9ddf25b..1227381 100644
--- a/login-utils/login.1
+++ b/login-utils/login.1
@@ -105,6 +105,14 @@ to pass the name of the remote host to
so that it may be placed in utmp and wtmp. Only the superuser may use
this option.
+Note that the \fB-h\fP option has impact on the \fBPAM service name\fP. The standard
+service name is "login", with the \fB-h\fP option the name is "remote". It's
+necessary to create a proper PAM config files (e.g.
+.I /etc/pam.d/login
+and
+.I /etc/pam.d/remote
+).
+
.SH "SPECIAL ACCESS RESTRICTIONS"
The file
.I /etc/securetty
@@ -297,6 +305,8 @@ are allowed to log in from anywhere as is standard behavior.
.I /etc/passwd
.I /etc/nologin
.I /etc/usertty
+.I /etc/pam.d/login
+.I /etc/pam.d/remote
.I .hushlogin
.fi
.SH "SEE ALSO"
diff --git a/login-utils/login.c b/login-utils/login.c
index d362113..c924a1f 100644
--- a/login-utils/login.c
+++ b/login-utils/login.c
@@ -552,7 +552,7 @@ main(int argc, char **argv)
* 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, _("%s: PAM failure, aborting: %s\n"),
"login", pam_strerror(pamh, retcode));
--
1.6.0.6

View file

@ -0,0 +1,127 @@
diff -up util-linux-ng-2.14.2/mount/mount.8.kzak util-linux-ng-2.14.2/mount/mount.8
--- util-linux-ng-2.14.2/mount/mount.8.kzak 2009-02-09 11:08:11.000000000 +0100
+++ util-linux-ng-2.14.2/mount/mount.8 2009-06-01 14:19:00.000000000 +0200
@@ -411,10 +411,12 @@ Mount the file system read-only. A synon
.BR "\-o ro" .
Note that, depending on the filesystem type, state and kernel behavior, the
-system may still write to the device. For example, Ext3 will replay its journal
-if the filesystem is dirty. To prevent this kind of write access, you may want
-to set the block device to read-only mode, see command
-.BR blockdev (8).
+system may still write to the device. For example, Ext3 or ext4 will replay its
+journal if the filesystem is dirty. To prevent this kind of write access, you
+may want to mount ext3 or ext4 filesystem with "ro,noload" mount options or
+set the block device to read-only mode, see command
+.BR blockdev (8)
+.
.TP
.B \-w
Mount the file system read/write. This is the default. A synonym is
@@ -1160,7 +1162,105 @@ manual page.
Enable POSIX Access Control Lists. See the
.BR acl (5)
manual page.
-
+
+.SH "Mount options for ext4"
+The `ext4' is an an advanced level of the ext3 filesystem which incorporates
+scalability and reliability enhancements for supporting large filesystem.
+
+The options
+.B journal_dev, noload, data, commit, orlov, oldalloc, [no]user_xattr
+.B [no]acl, bsddf, minixdf, debug, errors, data_err, grpid, bsdgroups, nogrpid
+.B sysvgroups, resgid, resuid, sb, quota, noquota, grpquota, usrquota
+and
+.B [no]bh
+are backwardly compatible with ext3 or ext2.
+.TP
+.BR journal_checksum
+Enable checksumming of the journal transactions. This will allow the recovery
+code in e2fsck and the kernel to detect corruption in the kernel. It is a
+compatible change and will be ignored by older kernels.
+.TP
+.BR journal_async_commit
+Commit block can be written to disk without waiting for descriptor blocks. If
+enabled older kernels cannot mount the device. This will enable
+'journal_checksum' internally.
+.TP
+.BR journal=update
+Update the ext4 file system's journal to the current format.
+.TP
+.BR barrier=0 " / " barrier=1 " / " barrier " / " nobarrier
+This enables/disables the use of write barriers in the jbd code. barrier=0
+disables, barrier=1 enables. This also requires an IO stack which can support
+barriers, and if jbd gets an error on a barrier write, it will disable again
+with a warning. Write barriers enforce proper on-disk ordering of journal
+commits, making volatile disk write caches safe to use, at some performance
+penalty. If your disks are battery-backed in one way or another, disabling
+barriers may safely improve performance. The mount options "barrier" and
+"nobarrier" can also be used to enable or disable barriers, for consistency
+with other ext4 mount options.
+.TP
+.BI inode_readahead= n
+This tuning parameter controls the maximum number of inode table blocks that
+ext4's inode table readahead algorithm will pre-read into the buffer cache.
+The default value is 32 blocks.
+.TP
+.BI stripe= n
+Number of filesystem blocks that mballoc will try to use for allocation size
+and alignment. For RAID5/6 systems this should be the number of data disks *
+RAID chunk size in file system blocks.
+.TP
+.BR delalloc
+Deferring block allocation until write-out time.
+.TP
+.BR nodelalloc
+Disable delayed allocation. Blocks are allocation when data is copied from user
+to page cache.
+.TP
+.BI max_batch_time= usec
+Maximum amount of time ext4 should wait for additional filesystem operations to
+be batch together with a synchronous write operation. Since a synchronous
+write operation is going to force a commit and then a wait for the I/O
+complete, it doesn't cost much, and can be a huge throughput win, we wait for a
+small amount of time to see if any other transactions can piggyback on the
+synchronous write. The algorithm used is designed to automatically tune for
+the speed of the disk, by measuring the amount of time (on average) that it
+takes to finish committing a transaction. Call this time the "commit time".
+If the time that the transactoin has been running is less than the commit time,
+ext4 will try sleeping for the commit time to see if other operations will join
+the transaction. The commit time is capped by the max_batch_time, which
+defaults to 15000us (15ms). This optimization can be turned off entirely by
+setting max_batch_time to 0.
+.TP
+.BI min_batch_time= usec
+This parameter sets the commit time (as described above) to be at least
+min_batch_time. It defaults to zero microseconds. Increasing this parameter
+may improve the throughput of multi-threaded, synchronous workloads on very
+fast disks, at the cost of increasing latency.
+.TP
+.BI journal_ioprio= prio
+The I/O priority (from 0 to 7, where 0 is the highest priorty) which should be
+used for I/O operations submitted by kjournald2 during a commit operation.
+This defaults to 3, which is a slightly higher priority than the default I/O
+priority.
+.TP
+.BR auto_da_alloc " / " noauto_da_alloc
+Many broken applications don't use fsync() when noauto_da_alloc
+replacing existing files via patterns such as
+
+fd = open("foo.new")/write(fd,..)/close(fd)/ rename("foo.new", "foo")
+
+or worse yet
+
+fd = open("foo", O_TRUNC)/write(fd,..)/close(fd).
+
+If auto_da_alloc is enabled, ext4 will detect the replace-via-rename and
+replace-via-truncate patterns and force that any delayed allocation blocks are
+allocated such that at the next journal commit, in the default data=ordered
+mode, the data blocks of the new file are forced to disk before the rename()
+operation is commited. This provides roughly the same level of guarantees as
+ext3, and avoids the "zero-length" problem that can happen when a system
+crashes before the delayed allocation blocks are forced to disk.
+
.SH "Mount options for fat"
(Note:
.I fat

View file

@ -0,0 +1,13 @@
Index: util-linux-ng-2.14.2-rc1/mount/mount.c
===================================================================
--- util-linux-ng-2.14.2-rc1.orig/mount/mount.c
+++ util-linux-ng-2.14.2-rc1/mount/mount.c
@@ -180,6 +180,8 @@ static const struct opt_map opt_map[] =
{ "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 */
{ "nofail", 0, 0, MS_COMMENT}, /* Do not fail if ENOENT on dev */
{ NULL, 0, 0, 0 }
};

View file

@ -0,0 +1,79 @@
This is backport of upstream patches:
From 96f3bfbc7cbe4a96be60337bb58c361042b6df68 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Fri, 11 Sep 2009 14:08:40 +0200
Subject: [PATCH] mount: more explicitly explain 'strictatime' in mount.
From ed64b8d0fc945ce49041f313c453b6b21d68b832 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg59@srcf.ucam.org>
Date: Fri, 27 Mar 2009 00:47:22 +0000
Subject: [PATCH] mount: Add strictatime support
diff -up util-linux-ng-2.14.2/mount/mount.8.kzak util-linux-ng-2.14.2/mount/mount.8
--- util-linux-ng-2.14.2/mount/mount.8.kzak 2009-09-17 12:30:54.000000000 +0200
+++ util-linux-ng-2.14.2/mount/mount.8 2009-09-17 12:33:32.000000000 +0200
@@ -658,7 +658,9 @@ All I/O to the file system should be don
option.)
.TP
.B atime
-Update inode access time for each access. This is the default.
+Update inode access time for each access. See also the
+.B strictatime
+mount option.
.TP
.B noatime
Do not update inode access times on this file system (e.g, for faster
@@ -794,8 +796,21 @@ since the last time it was modified.)
.B norelatime
Do not use
.B relatime
-feature (e.g, for systems where the feature is enabled by default, for
-more details see mount options in /proc/mounts).
+feature. See also the
+.B strictatime
+mount option.
+.TP
+.B strictatime
+Allows to explicitly requesting full atime updates. This makes it
+possible for kernel to defaults to
+.B relatime
+or
+.B noatime
+but still allow userspace to override it. For more details about the default
+system mount options see /proc/mounts.
+.TP
+.B nostrictatime
+Use the kernel's default behaviour for inode access time updates.
.TP
.B suid
Allow set-user-identifier or set-group-identifier bits to take
diff -up util-linux-ng-2.14.2/mount/mount.c.kzak util-linux-ng-2.14.2/mount/mount.c
--- util-linux-ng-2.14.2/mount/mount.c.kzak 2009-09-17 12:30:54.000000000 +0200
+++ util-linux-ng-2.14.2/mount/mount.c 2009-09-17 12:32:06.000000000 +0200
@@ -180,6 +180,10 @@ static const struct opt_map opt_map[] =
{ "norelatime", 0, 1, MS_RELATIME }, /* Update access time without regard
to mtime/ctime */
#endif
+#ifdef MS_STRICTATIME
+ { "strictatime", 0, 0, MS_STRICTATIME }, /* Strict atime semantics */
+ { "nostrictatime", 0, 1, MS_STRICTATIME }, /* kernel default atime */
+#endif
{ "kudzu", 0, 0, MS_COMMENT }, /* Silently remove this option (backwards compat use only - deprecated) */
{ "managed", 0, 0, MS_COMMENT }, /* Silently remove this option */
{ "nofail", 0, 0, MS_COMMENT}, /* Do not fail if ENOENT on dev */
diff -up util-linux-ng-2.14.2/mount/mount_constants.h.kzak util-linux-ng-2.14.2/mount/mount_constants.h
--- util-linux-ng-2.14.2/mount/mount_constants.h.kzak 2009-01-09 11:01:34.000000000 +0100
+++ util-linux-ng-2.14.2/mount/mount_constants.h 2009-09-17 12:31:21.000000000 +0200
@@ -59,6 +59,9 @@
#ifndef MS_I_VERSION
#define MS_I_VERSION (1<<23) /* update inode I_version field */
#endif
+#ifndef MS_STRICTATIME
+#define MS_STRICTATIME (1<<24) /* strict atime semantics */
+#endif
/*
* Magic mount flag number. Had to be or-ed to the flag values.
*/

View file

@ -0,0 +1,83 @@
From 7cfbafda9c484a8cadefc47ee115086e803d9391 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Mon, 9 Mar 2009 21:09:50 +0100
Subject: [PATCH] renice: add -n option for compatibility with POSIX
The -n option is required by POSIX.1-200x.
Signed-off-by: Karel Zak <kzak@redhat.com>
---
sys-utils/renice.1 | 7 ++++++-
sys-utils/renice.c | 12 +++++++++---
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/sys-utils/renice.1 b/sys-utils/renice.1
index 3c20d6e..32a23e1 100644
--- a/sys-utils/renice.1
+++ b/sys-utils/renice.1
@@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)renice.8 8.1 (Berkeley) 6/9/93
+.\" @(#)renice.8 8.1 (Berkeley) 6/9/93
.\"
.Dd June 9, 1993
.Dt RENICE 1
@@ -39,6 +39,7 @@
.Nd alter priority of running processes
.Sh SYNOPSIS
.Nm renice
+.Op Fl n
.Ar priority
.Oo
.Op Fl p
@@ -74,6 +75,10 @@ their process ID's.
Options supported by
.Nm renice :
.Bl -tag -width Ds
+.It Fl n, Fl Fl priority
+The scheduling
+.Ar priority
+of the process, process group, or user.
.It Fl g, Fl Fl pgrp
Force
.Ar who
diff --git a/sys-utils/renice.c b/sys-utils/renice.c
index ac05d25..879e8bd 100644
--- a/sys-utils/renice.c
+++ b/sys-utils/renice.c
@@ -51,14 +51,15 @@ int donice(int,int,int);
void usage(int rc)
{
printf( _("\nUsage:\n"
- " renice priority [-p|--pid] pid [... pid]\n"
- " renice priority -g|--pgrp pgrp [... pgrp]\n"
- " renice priority -u|--user user [... user]\n"
+ " renice [-n] priority [-p|--pid] pid [... pid]\n"
+ " renice [-n] priority -g|--pgrp pgrp [... pgrp]\n"
+ " renice [-n] priority -u|--user user [... user]\n"
" renice -h | --help\n"
" renice -v | --version\n\n"));
exit(rc);
}
+
/*
* Change the priority (nice) of processes
* or groups of processes which are already
@@ -93,6 +94,11 @@ main(int argc, char **argv)
if (argc < 2)
usage(EXIT_FAILURE);
+ if (strcmp(*argv, "-n") == 0 || strcmp(*argv, "--priority") == 0) {
+ argc--;
+ argv++;
+ }
+
prio = strtol(*argv, &endptr, 10);
if (*endptr)
usage(EXIT_FAILURE);
--
1.6.0.6

View file

@ -0,0 +1,54 @@
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

@ -0,0 +1,11 @@
# 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

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

16
util-linux-ng-login.pamd Normal file
View file

@ -0,0 +1,16 @@
#%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

15
util-linux-ng-remote.pamd Normal file
View file

@ -0,0 +1,15 @@
#%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 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

1942
util-linux-ng.spec Normal file

File diff suppressed because it is too large Load diff