Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d59979fa05 | ||
|
|
6c69926dbf | ||
|
|
334e0e7abe | ||
|
|
39ece656f3 |
21 changed files with 5 additions and 3035 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,2 +1,5 @@
|
|||
floppy-0.16.tar.bz2
|
||||
util-linux-ng-2.18.tar.bz2
|
||||
*~
|
||||
*.rpm
|
||||
*.log
|
||||
|
|
|
|||
2
dead.package
Normal file
2
dead.package
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
util-linux-ng has been renamed to util-linux
|
||||
51
mount.tmpfs
51
mount.tmpfs
|
|
@ -1,51 +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]
|
||||
#
|
||||
|
||||
case $1 in
|
||||
-h|--help|-?)
|
||||
echo "mount.tmpfs is a private mount(8) wrapper for tmpfs."
|
||||
echo "Don't use it directly!"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
restricted=1
|
||||
|
||||
if [ $UID -eq 0 ] && [ $UID -eq $EUID ]; then
|
||||
restricted=0
|
||||
fi
|
||||
|
||||
# mount(8) in restricted mode (for non-root users) does not allow to use any
|
||||
# mount options, types or so on command line. We have to call mount(8) with
|
||||
# mountpoint only. All necessary options have to be defined in /etc/fstab.
|
||||
#
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=615719
|
||||
#
|
||||
if [ $restricted -eq 1 ]; then
|
||||
exec /bin/mount -i "$2"
|
||||
fi
|
||||
|
||||
# Remount with context mount options is unsupported
|
||||
# http://bugzilla.redhat.com/show_bug.cgi?id=563267
|
||||
#
|
||||
if ! echo "$@" | grep -q -E '\-o.*remount'; then
|
||||
|
||||
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
|
||||
|
||||
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 @@
|
|||
7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2
|
||||
2f5f71e6af969d041d73ab778c141a77 util-linux-ng-2.18.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,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;
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
---
|
||||
misc-utils/blkid.8 | 4 ++--
|
||||
misc-utils/blkid.c | 2 +-
|
||||
shlibs/blkid/libblkid.3 | 6 +++---
|
||||
shlibs/blkid/src/blkidP.h | 2 +-
|
||||
4 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
--- util-linux-ng-2.18-rc1.orig/misc-utils/blkid.8
|
||||
+++ util-linux-ng-2.18-rc1/misc-utils/blkid.8
|
||||
@@ -81,7 +81,7 @@ same meaning as "KiB") or decimal (10^N)
|
||||
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 .
|
||||
@@ -228,7 +228,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
|
||||
--- util-linux-ng-2.18-rc1.orig/misc-utils/blkid.c
|
||||
+++ util-linux-ng-2.18-rc1/misc-utils/blkid.c
|
||||
@@ -65,7 +65,7 @@ static void usage(int error)
|
||||
" [-o format] <dev> [dev ...]\n\n"
|
||||
" %1$s -i [-s <tag>] [-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"
|
||||
--- util-linux-ng-2.18-rc1.orig/shlibs/blkid/libblkid.3
|
||||
+++ util-linux-ng-2.18-rc1/shlibs/blkid/libblkid.3
|
||||
@@ -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
|
||||
--- util-linux-ng-2.18-rc1.orig/shlibs/blkid/src/blkidP.h
|
||||
+++ util-linux-ng-2.18-rc1/shlibs/blkid/src/blkidP.h
|
||||
@@ -279,7 +279,7 @@ extern int blkid_fstatat(DIR *dir, const
|
||||
extern int blkid_openat(DIR *dir, const char *dirname, const char *filename,
|
||||
int flags);
|
||||
|
||||
-#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
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
From 9fcaa8826c180273829cf03e5fe34e08daef721f Mon Sep 17 00:00:00 2001
|
||||
From: Karel Zak <kzak@redhat.com>
|
||||
Date: Mon, 12 Jul 2010 11:57:55 +0200
|
||||
Subject: [PATCH] aggety: don't wipe CLOCAL flag
|
||||
|
||||
gettey should not clear the flag. It seems that the flag is
|
||||
automatically enabled for serial consoles tht don't use CD signal.
|
||||
|
||||
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=598631
|
||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||
---
|
||||
login-utils/agetty.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/login-utils/agetty.c b/login-utils/agetty.c
|
||||
index 39a1fd3..0cb00db 100644
|
||||
--- a/login-utils/agetty.c
|
||||
+++ b/login-utils/agetty.c
|
||||
@@ -706,7 +706,7 @@ termio_init(tp, speed, op)
|
||||
/* flush input and output queues, important for modems! */
|
||||
(void) tcflush(0, TCIOFLUSH);
|
||||
|
||||
- tp->c_cflag = CS8 | HUPCL | CREAD;
|
||||
+ tp->c_cflag = CS8 | HUPCL | CREAD | (tp->c_cflag & CLOCAL);
|
||||
cfsetispeed(tp, speed);
|
||||
cfsetospeed(tp, speed);
|
||||
if (op->flags & F_LOCAL) {
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
diff -up util-linux-ng-2.17.2/mount/mount.c.kzak util-linux-ng-2.17.2/mount/mount.c
|
||||
--- util-linux-ng-2.17.2/mount/mount.c.kzak 2010-03-22 09:10:56.000000000 +0100
|
||||
+++ util-linux-ng-2.17.2/mount/mount.c 2010-07-29 16:15:28.000000000 +0200
|
||||
@@ -1090,7 +1090,8 @@ loop_check(const char **spec, const char
|
||||
if (verbose)
|
||||
printf(_("mount: skipping the setup of a loop device\n"));
|
||||
} else {
|
||||
- int loop_opts = SETLOOP_AUTOCLEAR; /* always attempt autoclear */
|
||||
+ /* use autoclear loopdev on system without regular mtab only */
|
||||
+ int loop_opts = mtab_is_writable() ? 0 : SETLOOP_AUTOCLEAR;
|
||||
int res;
|
||||
|
||||
if (*flags & MS_RDONLY)
|
||||
@@ -1759,6 +1760,50 @@ mounted (const char *spec0, const char *
|
||||
return ret;
|
||||
}
|
||||
|
||||
+/* returns 0 if not mounted, 1 if mounted and -1 in case of error */
|
||||
+static int
|
||||
+is_fstab_entry_mounted(struct mntentchn *mc, int verbose)
|
||||
+{
|
||||
+ struct stat st;
|
||||
+
|
||||
+ if (mounted(mc->m.mnt_fsname, mc->m.mnt_dir))
|
||||
+ goto yes;
|
||||
+
|
||||
+ /* extra care for loop devices */
|
||||
+ if ((strstr(mc->m.mnt_opts, "loop=") ||
|
||||
+ (stat(mc->m.mnt_fsname, &st) == 0 && S_ISREG(st.st_mode)))) {
|
||||
+
|
||||
+ char *p = strstr(mc->m.mnt_opts, "offset=");
|
||||
+ uintmax_t offset = 0;
|
||||
+
|
||||
+ if (p && *(p + 7)) {
|
||||
+ char *end = NULL;
|
||||
+
|
||||
+ p += 7;
|
||||
+ errno = 0;
|
||||
+ offset = strtoumax(p, &end, 0);
|
||||
+
|
||||
+ if (end == p || (errno != 0 &&
|
||||
+ (offset == UINTMAX_MAX || offset == 0))) {
|
||||
+ if (verbose)
|
||||
+ printf(_("mount: ignore %s "
|
||||
+ "(unparsable offset= option)\n"),
|
||||
+ mc->m.mnt_fsname);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ }
|
||||
+ if (is_mounted_same_loopfile(mc->m.mnt_dir, mc->m.mnt_fsname, offset))
|
||||
+ goto yes;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+yes:
|
||||
+ if (verbose)
|
||||
+ printf(_("mount: %s already mounted on %s\n"),
|
||||
+ mc->m.mnt_fsname, mc->m.mnt_dir);
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
/* avoid using stat() on things we are not going to mount anyway.. */
|
||||
static int
|
||||
has_noauto (const char *opts) {
|
||||
@@ -1804,16 +1849,8 @@ do_mount_all (char *types, char *options
|
||||
if (matching_type (mc->m.mnt_type, types)
|
||||
&& matching_opts (mc->m.mnt_opts, test_opts)
|
||||
&& !streq (mc->m.mnt_dir, "/")
|
||||
- && !streq (mc->m.mnt_dir, "root")) {
|
||||
-
|
||||
- if (mounted (mc->m.mnt_fsname, mc->m.mnt_dir)) {
|
||||
- if (verbose)
|
||||
- printf(_("mount: %s already mounted "
|
||||
- "on %s\n"),
|
||||
- mc->m.mnt_fsname,
|
||||
- mc->m.mnt_dir);
|
||||
- continue;
|
||||
- }
|
||||
+ && !streq (mc->m.mnt_dir, "root")
|
||||
+ && !is_fstab_entry_mounted(mc, verbose)) {
|
||||
|
||||
mtmp = (struct mntentchn *) xmalloc(sizeof(*mtmp));
|
||||
*mtmp = *mc;
|
||||
|
|
@ -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,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
|
||||
2300
util-linux-ng.spec
2300
util-linux-ng.spec
File diff suppressed because it is too large
Load diff
117
uuidd.init
117
uuidd.init
|
|
@ -1,117 +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
|
||||
|
||||
[ -e /etc/sysconfig/uuidd ] && . /etc/sysconfig/uuidd
|
||||
|
||||
DAEMON=uuidd
|
||||
exec=/usr/sbin/uuidd
|
||||
prog=uuidd
|
||||
user=uuidd
|
||||
lockfile=/var/lock/subsys/$DAEMON
|
||||
pidfile=/var/run/uuidd/uuidd.pid
|
||||
|
||||
check() {
|
||||
# Check that we're a privileged user
|
||||
[ $(id -u) -eq 0 ] || exit 4
|
||||
|
||||
# Check if daemon binary is executable
|
||||
[ -x $exec ] || exit 5
|
||||
}
|
||||
|
||||
start () {
|
||||
check
|
||||
echo -n $"Starting $prog: "
|
||||
daemon --user $user --pidfile $pidfile $DAEMON
|
||||
retval=$?
|
||||
echo
|
||||
[ $retval -eq 0 ] && touch $lockfile
|
||||
return $retval
|
||||
}
|
||||
|
||||
stop () {
|
||||
check
|
||||
echo -n $"Stopping $prog: "
|
||||
killproc $DAEMON
|
||||
retval=$?
|
||||
echo
|
||||
[ $retval -eq 0 ] && rm -f $lockfile
|
||||
return $retval
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
reload() {
|
||||
restart
|
||||
}
|
||||
|
||||
force_reload() {
|
||||
restart
|
||||
}
|
||||
|
||||
rh_status() {
|
||||
status -p $pidfile $DAEMON
|
||||
}
|
||||
|
||||
rh_status_q() {
|
||||
rh_status >/dev/null 2>&1
|
||||
}
|
||||
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
rh_status_q && exit 0
|
||||
$1
|
||||
;;
|
||||
stop)
|
||||
rh_status_q || exit 0
|
||||
$1
|
||||
;;
|
||||
restart)
|
||||
$1
|
||||
;;
|
||||
reload)
|
||||
rh_status_q || exit 7
|
||||
$1
|
||||
;;
|
||||
force-reload)
|
||||
force_reload
|
||||
;;
|
||||
status)
|
||||
rh_status
|
||||
;;
|
||||
condrestart|try-restart)
|
||||
rh_status_q || exit 0
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
|
||||
exit 2
|
||||
esac
|
||||
exit $?
|
||||
Loading…
Add table
Add a link
Reference in a new issue