Compare commits
47 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d59979fa05 | ||
|
|
6c69926dbf | ||
|
|
334e0e7abe | ||
|
|
39ece656f3 | ||
|
|
f5753f26bf | ||
|
|
f5b82120dc | ||
|
|
ad6c4cead9 | ||
|
|
84c61844a0 | ||
|
|
a668ec5732 | ||
|
|
c8f122a16e | ||
|
|
aaefb1b1e9 | ||
|
|
719e877065 | ||
|
|
b5c0655ff7 | ||
|
|
ac8c6510b0 | ||
|
|
ad3276c60e | ||
|
|
c5424ee0fe | ||
|
|
b160158d1d | ||
|
|
3469b9156c | ||
|
|
ebf27ef6b1 | ||
|
|
895e26434c | ||
|
|
f2798a3ae7 | ||
|
|
23fc39cc0a | ||
|
|
508868f471 | ||
|
|
68cfaf1c07 | ||
|
|
8e0edf3045 | ||
|
|
0b5b5047d5 | ||
|
|
ad59cd7228 | ||
|
|
ad52cd8da8 | ||
|
|
9cc0805afc | ||
|
|
65b849d161 | ||
|
|
54801c4aa3 | ||
|
|
3d39c82c09 | ||
|
|
fdc66c57dc | ||
|
|
2b1c901a2f | ||
|
|
e9e0efc157 | ||
|
|
0c627b12a6 | ||
|
|
a462526bed | ||
|
|
203ba3aecb | ||
|
|
5cb38df8b7 | ||
|
|
dfa8a7f8fd | ||
|
|
2cdb3efbb1 | ||
|
|
dad65a571a | ||
|
|
70c61db862 | ||
|
|
0b806dd6f2 | ||
|
|
db3827f5de | ||
|
|
a5cc6153d9 | ||
|
|
46df5ca3c5 |
28 changed files with 7 additions and 2907 deletions
|
|
@ -1,2 +0,0 @@
|
|||
util-linux-ng-2.14.2.tar.bz2
|
||||
floppy-0.16.tar.bz2
|
||||
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
floppy-0.16.tar.bz2
|
||||
util-linux-ng-2.18.tar.bz2
|
||||
*~
|
||||
*.rpm
|
||||
*.log
|
||||
21
Makefile
21
Makefile
|
|
@ -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
2
dead.package
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
util-linux-ng has been renamed to util-linux
|
||||
20
mount.tmpfs
20
mount.tmpfs
|
|
@ -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
|
||||
63
nologin.8
63
nologin.8
|
|
@ -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 .
|
||||
58
nologin.c
58
nologin.c
|
|
@ -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);
|
||||
}
|
||||
2
sources
2
sources
|
|
@ -1,2 +0,0 @@
|
|||
b9d0053a22cfcbf0b9c0aa6d6eccfbc8 util-linux-ng-2.14.2.tar.bz2
|
||||
7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2
|
||||
|
|
@ -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)
|
||||
|
|
@ -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
|
||||
|
|
@ -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) ¶m) < 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);
|
||||
|
|
@ -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>
|
||||
|
|
@ -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) &&
|
||||
|
|
@ -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;
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
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
|
||||
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
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
|
||||
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
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
|
||||
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
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
|
||||
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
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;
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
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
|
||||
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
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 }
|
||||
};
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
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
|
||||
|
||||
|
|
@ -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.
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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 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
|
||||
1924
util-linux-ng.spec
1924
util-linux-ng.spec
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue