Compare commits
7 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8027d4fd80 | ||
|
|
fa5b149b5d | ||
|
|
dfde8dec4c | ||
|
|
caa3318d49 | ||
|
|
2093f601bb | ||
|
|
1fbd38ec35 | ||
|
|
20d9cb6488 |
37 changed files with 2725 additions and 3371 deletions
|
|
@ -1 +0,0 @@
|
||||||
1
|
|
||||||
88
.gitignore
vendored
88
.gitignore
vendored
|
|
@ -18,91 +18,3 @@
|
||||||
/util-linux-2.21.tar.xz
|
/util-linux-2.21.tar.xz
|
||||||
/util-linux-2.21.1.tar.xz
|
/util-linux-2.21.1.tar.xz
|
||||||
/util-linux-2.21.2.tar.xz
|
/util-linux-2.21.2.tar.xz
|
||||||
/util-linux-2.22-rc2.tar.xz
|
|
||||||
/util-linux-2.22.tar.xz
|
|
||||||
/util-linux-2.22.1.tar.xz
|
|
||||||
/util-linux-2.22.2.tar.xz
|
|
||||||
/util-linux-2.23-rc1.tar.xz
|
|
||||||
/util-linux-2.23-rc2.tar.xz
|
|
||||||
/util-linux-2.23.tar.xz
|
|
||||||
/util-linux-2.23.1.tar.xz
|
|
||||||
/util-linux-2.23.2.tar.xz
|
|
||||||
/util-linux-2.24-rc1.tar.xz
|
|
||||||
/util-linux-2.24.tar.xz
|
|
||||||
/util-linux-2.24.1.tar.xz
|
|
||||||
/util-linux-2.24.2.tar.xz
|
|
||||||
/util-linux-2.25-rc1.tar.xz
|
|
||||||
/util-linux-2.25-rc2.tar.xz
|
|
||||||
/util-linux-2.25.tar.xz
|
|
||||||
/util-linux-2.25.1-rc1.tar.xz
|
|
||||||
/util-linux-2.25.1.tar.xz
|
|
||||||
/util-linux-2.25.2.tar.xz
|
|
||||||
/util-linux-2.26-rc1.tar.xz
|
|
||||||
/util-linux-2.26-rc2.tar.xz
|
|
||||||
/util-linux-2.26.tar.xz
|
|
||||||
/util-linux-2.26.2.tar.xz
|
|
||||||
/util-linux-2.27-rc1.tar.xz
|
|
||||||
/util-linux-2.27-rc2.tar.xz
|
|
||||||
/util-linux-2.27.tar.xz
|
|
||||||
/util-linux-2.27.1.tar.xz
|
|
||||||
/util-linux-2.28-rc1.tar.xz
|
|
||||||
/util-linux-2.28-rc2.tar.xz
|
|
||||||
/util-linux-2.28.tar.xz
|
|
||||||
/util-linux-2.28.1.tar.xz
|
|
||||||
/util-linux-2.28.2.tar.xz
|
|
||||||
/util-linux-2.29-rc1.tar.xz
|
|
||||||
/util-linux-2.29-rc2.tar.xz
|
|
||||||
/util-linux-2.29.tar.xz
|
|
||||||
/util-linux-2.29.1.tar.xz
|
|
||||||
/util-linux-2.29.2.tar.xz
|
|
||||||
/util-linux-2.30-rc1.tar.xz
|
|
||||||
/util-linux-2.30.tar.xz
|
|
||||||
/util-linux-2.30.1.tar.xz
|
|
||||||
/util-linux-2.30.2.tar.xz
|
|
||||||
/util-linux-2.31-rc1.tar.xz
|
|
||||||
/util-linux-2.31-rc2.tar.xz
|
|
||||||
/util-linux-2.31.tar.xz
|
|
||||||
/util-linux-2.32-rc1.tar.xz
|
|
||||||
/util-linux-2.32.tar.xz
|
|
||||||
/util-linux-2.32.1.tar.xz
|
|
||||||
/util-linux-2.33-rc2.tar.xz
|
|
||||||
/util-linux-2.33.1.tar.xz
|
|
||||||
/util-linux-2.33.2.tar.xz
|
|
||||||
/util-linux-2.34-rc1.tar.xz
|
|
||||||
/util-linux-2.34-rc2.tar.xz
|
|
||||||
/util-linux-2.34.tar.xz
|
|
||||||
/util-linux-2.35-rc1.tar.xz
|
|
||||||
/util-linux-2.35-rc1-20-63f8.tar.xz
|
|
||||||
/util-linux-2.35-rc2.tar.xz
|
|
||||||
/util-linux-2.35.tar.xz
|
|
||||||
/util-linux-2.35.1.tar.xz
|
|
||||||
/util-linux-2.35.2.tar.xz
|
|
||||||
/util-linux-2.36.tar.xz
|
|
||||||
/util-linux-2.36.1.tar.xz
|
|
||||||
/util-linux-2.36.2.tar.xz
|
|
||||||
/util-linux-2.37-rc2.tar.xz
|
|
||||||
/util-linux-2.37.tar.xz
|
|
||||||
/util-linux-2.37.2.tar.xz
|
|
||||||
/util-linux-2.38-rc1.tar.xz
|
|
||||||
/util-linux-2.38-rc3.tar.xz
|
|
||||||
/util-linux-2.38.tar.xz
|
|
||||||
/util-linux-2.38.1.tar.xz
|
|
||||||
/util-linux-2.39-rc1.tar.xz
|
|
||||||
/util-linux-2.39-rc2.tar.xz
|
|
||||||
/util-linux-2.39-rc3.tar.xz
|
|
||||||
/util-linux-2.39.tar.xz
|
|
||||||
/util-linux-2.39.1.tar.xz
|
|
||||||
/util-linux-2.39.2.tar.xz
|
|
||||||
/util-linux-2.39.3.tar.xz
|
|
||||||
/util-linux-2.40-rc1.tar.xz
|
|
||||||
/util-linux-2.40.tar.xz
|
|
||||||
/util-linux-2.40.1.tar.xz
|
|
||||||
/util-linux-2.40.2.tar.xz
|
|
||||||
/util-linux-2.40.4.tar.xz
|
|
||||||
/util-linux-2.41.tar.xz
|
|
||||||
/util-linux-2.41.1.tar.xz
|
|
||||||
/util-linux-2.41.2.tar.xz
|
|
||||||
/util-linux-2.41.3.tar.xz
|
|
||||||
/util-linux-2.42.tar.xz
|
|
||||||
/util-linux-2.42.1.tar.xz
|
|
||||||
/util-linux-2.42.2.tar.xz
|
|
||||||
|
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
From a2357184ff3dc3beb001fcb12e1e4c0dcf8d0dbd Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karel Zak <kzak@redhat.com>
|
|
||||||
Date: Tue, 2 Dec 2025 16:15:44 +0100
|
|
||||||
Subject: login: use O_CREAT on lastlog
|
|
||||||
|
|
||||||
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=151635
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
---
|
|
||||||
login-utils/login.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/login-utils/login.c b/login-utils/login.c
|
|
||||||
index 321f9d6ce..edc69fd9a 100644
|
|
||||||
--- a/login-utils/login.c
|
|
||||||
+++ b/login-utils/login.c
|
|
||||||
@@ -682,7 +682,7 @@ static void log_lastlog(struct login_context *cxt)
|
|
||||||
sa.sa_handler = SIG_IGN;
|
|
||||||
sigaction(SIGXFSZ, &sa, &oldsa_xfsz);
|
|
||||||
|
|
||||||
- fd = open(_PATH_LASTLOG, O_RDWR, 0);
|
|
||||||
+ fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0);
|
|
||||||
if (fd < 0)
|
|
||||||
goto done;
|
|
||||||
offset = cxt->pwd->pw_uid * sizeof(ll);
|
|
||||||
--
|
|
||||||
2.51.1
|
|
||||||
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
From 617a887a6ec7e433f6a9f4c60592ed38b12b9f18 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karel Zak <kzak@redhat.com>
|
|
||||||
Date: Tue, 2 Dec 2025 16:17:55 +0100
|
|
||||||
Subject: login: add /run/motd.d` to the hardcoded MOTD_FILE
|
|
||||||
|
|
||||||
Addresses: https://github.com/coreos/console-login-helper-messages/issues/60
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
---
|
|
||||||
include/pathnames.h | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/include/pathnames.h b/include/pathnames.h
|
|
||||||
index 34ba11ca3..c91a077e1 100644
|
|
||||||
--- a/include/pathnames.h
|
|
||||||
+++ b/include/pathnames.h
|
|
||||||
@@ -41,7 +41,7 @@
|
|
||||||
#ifndef _PATH_MAILDIR
|
|
||||||
# define _PATH_MAILDIR "/var/spool/mail"
|
|
||||||
#endif
|
|
||||||
-#define _PATH_MOTDFILE "/usr/share/misc/motd:/run/motd:/etc/motd"
|
|
||||||
+#define _PATH_MOTDFILE "/usr/share/misc/motd:/run/motd:/run/motd.d:/etc/motd:/etc/motd.d"
|
|
||||||
#ifndef _PATH_NOLOGIN
|
|
||||||
# define _PATH_NOLOGIN "/etc/nologin"
|
|
||||||
#endif
|
|
||||||
--
|
|
||||||
2.51.1
|
|
||||||
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
srpm util-linux
|
|
||||||
mcd $BUILDDIR/$1
|
|
||||||
cat <<EOF > config.cache
|
|
||||||
ax_cv_have_tls=yes
|
|
||||||
scanf_cv_alloc_modifier=ms
|
|
||||||
EOF
|
|
||||||
$SRC/${1}-*/configure $TCONFIGARGS --without-ncurses --without-tinfo \
|
|
||||||
--prefix=/usr --libexecdir=/usr/lib${SUFFIX} --libdir=/usr/lib${SUFFIX} \
|
|
||||||
--disable-wall --cache-file=config.cache --without-python --without-systemd
|
|
||||||
notparallel
|
|
||||||
make $J V=1
|
|
||||||
make $J install DESTDIR=${ROOTFS}
|
|
||||||
2
adjtime
2
adjtime
|
|
@ -1,2 +0,0 @@
|
||||||
0.0 0 0.0
|
|
||||||
0
|
|
||||||
30
hexdump-do-not-segfault-when-iterating-over-an-empty.patch
Normal file
30
hexdump-do-not-segfault-when-iterating-over-an-empty.patch
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
diff --git a/text-utils/parse.c b/text-utils/parse.c
|
||||||
|
index 5f1e2bd..bd96961 100644
|
||||||
|
--- a/text-utils/parse.c
|
||||||
|
+++ b/text-utils/parse.c
|
||||||
|
@@ -421,13 +421,15 @@ isint2: switch(fu->bcnt) {
|
||||||
|
!(fu->flags&F_SETREP) && fu->bcnt)
|
||||||
|
fu->reps += (blocksize - fs->bcnt) / fu->bcnt;
|
||||||
|
if (fu->reps > 1) {
|
||||||
|
- for (pr = fu->nextpr;; pr = pr->nextpr)
|
||||||
|
- if (!pr->nextpr)
|
||||||
|
- break;
|
||||||
|
- for (p1 = pr->fmt, p2 = NULL; *p1; ++p1)
|
||||||
|
- p2 = isspace((unsigned char)*p1) ? p1 : NULL;
|
||||||
|
- if (p2)
|
||||||
|
- pr->nospace = p2;
|
||||||
|
+ if (fu->nextpr) {
|
||||||
|
+ for (pr = fu->nextpr; ; pr = pr->nextpr)
|
||||||
|
+ if (!pr->nextpr)
|
||||||
|
+ break;
|
||||||
|
+ for (p1 = pr->fmt, p2 = NULL; *p1; ++p1)
|
||||||
|
+ p2 = isspace((unsigned char)*p1) ? p1 : NULL;
|
||||||
|
+ if (p2)
|
||||||
|
+ pr->nospace = p2;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
1.8.1
|
||||||
|
|
||||||
81
mount-add-verbose-messages.patch
Normal file
81
mount-add-verbose-messages.patch
Normal file
|
|
@ -0,0 +1,81 @@
|
||||||
|
diff -up util-linux-2.21.2/sys-utils/mount.c.orig util-linux-2.21.2/sys-utils/mount.c
|
||||||
|
--- util-linux-2.21.2/sys-utils/mount.c.orig 2013-02-03 17:33:05.248888432 +0100
|
||||||
|
+++ util-linux-2.21.2/sys-utils/mount.c 2013-02-03 17:34:31.856571865 +0100
|
||||||
|
@@ -238,6 +238,29 @@ static int mount_all(struct libmnt_conte
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void success_message(struct libmnt_context *cxt)
|
||||||
|
+{
|
||||||
|
+ unsigned long mflags = 0;
|
||||||
|
+ const char *tgt, *src;
|
||||||
|
+
|
||||||
|
+ if (mnt_context_helper_executed(cxt)
|
||||||
|
+ || mnt_context_get_status(cxt) != 1)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ mnt_context_get_mflags(cxt, &mflags);
|
||||||
|
+ tgt = mnt_context_get_target(cxt);
|
||||||
|
+ src = mnt_context_get_source(cxt);
|
||||||
|
+
|
||||||
|
+ if (mflags & MS_MOVE)
|
||||||
|
+ warnx(_("%s moved to %s"), src, tgt);
|
||||||
|
+ else if (mflags & MS_BIND)
|
||||||
|
+ warnx(_("%s binded on %s"), src, tgt);
|
||||||
|
+ else if (mflags & MS_PROPAGATION)
|
||||||
|
+ warnx(_("%s propagation flags changed"), tgt);
|
||||||
|
+ else
|
||||||
|
+ warnx(_("%s mounted on %s"), src, tgt);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* Handles generic errors like ENOMEM, ...
|
||||||
|
*
|
||||||
|
@@ -913,6 +936,8 @@ int main(int argc, char **argv)
|
||||||
|
rc = mnt_context_mount(cxt);
|
||||||
|
rc = mk_exit_code(cxt, rc);
|
||||||
|
|
||||||
|
+ if (rc == MOUNT_EX_SUCCESS && mnt_context_is_verbose(cxt))
|
||||||
|
+ success_message(cxt);
|
||||||
|
done:
|
||||||
|
free(srcbuf);
|
||||||
|
mnt_free_context(cxt);
|
||||||
|
diff -up util-linux-2.21.2/sys-utils/umount.c.orig util-linux-2.21.2/sys-utils/umount.c
|
||||||
|
--- util-linux-2.21.2/sys-utils/umount.c.orig 2012-05-25 11:44:59.043195664 +0200
|
||||||
|
+++ util-linux-2.21.2/sys-utils/umount.c 2013-02-03 17:33:05.266888574 +0100
|
||||||
|
@@ -119,6 +119,25 @@ static void __attribute__((__noreturn__)
|
||||||
|
errx(MOUNT_EX_USAGE, _("only root can do that"));
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void success_message(struct libmnt_context *cxt)
|
||||||
|
+{
|
||||||
|
+ const char *tgt, *src;
|
||||||
|
+
|
||||||
|
+ if (mnt_context_helper_executed(cxt)
|
||||||
|
+ || mnt_context_get_status(cxt) != 1)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ tgt = mnt_context_get_target(cxt);
|
||||||
|
+ if (!tgt)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ src = mnt_context_get_source(cxt);
|
||||||
|
+ if (src)
|
||||||
|
+ warnx(_("%s (%s) unmounted"), tgt, src);
|
||||||
|
+ else
|
||||||
|
+ warnx(_("%s unmounted"), tgt);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* Handles generic errors like ENOMEM, ...
|
||||||
|
*
|
||||||
|
@@ -273,6 +292,9 @@ static int umount_one(struct libmnt_cont
|
||||||
|
rc = mnt_context_umount(cxt);
|
||||||
|
rc = mk_exit_code(cxt, rc);
|
||||||
|
|
||||||
|
+ if (rc == MOUNT_EX_SUCCESS && mnt_context_is_verbose(cxt))
|
||||||
|
+ success_message(cxt);
|
||||||
|
+
|
||||||
|
mnt_reset_context(cxt);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
63
nologin.8
Normal file
63
nologin.8
Normal 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
58
nologin.c
Normal 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);
|
||||||
|
}
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
summary: Basic smoke test
|
|
||||||
discover:
|
|
||||||
how: fmf
|
|
||||||
execute:
|
|
||||||
how: tmt
|
|
||||||
3
sources
3
sources
|
|
@ -1 +1,2 @@
|
||||||
SHA512 (util-linux-2.42.2.tar.xz) = 7415add0be2930654e322830808dde03ff6d511bd357f0679e6b6287a13ca79fe58ce4ac05edef86b76fb381b3a36ca2da9d3c31b5dc0a1d889c203156a57277
|
10d940dec87902bff7e6f9f2adcd0236 util-linux-2.21.2.tar.xz
|
||||||
|
a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2
|
||||||
|
|
|
||||||
|
|
@ -1,64 +0,0 @@
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# Makefile of /CoreOS/util-linux/various
|
|
||||||
# Description: This test groups small sanity and regression tests for util-linux
|
|
||||||
# Author: Miroslav Vadkerti <mvadkert@redhat.com>
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
|
|
||||||
#
|
|
||||||
# This copyrighted material is made available to anyone wishing
|
|
||||||
# to use, modify, copy, or redistribute it subject to the terms
|
|
||||||
# and conditions of the GNU General Public License version 2.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be
|
|
||||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
|
||||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
||||||
# PURPOSE. See the GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public
|
|
||||||
# License along with this program; if not, write to the Free
|
|
||||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
# Boston, MA 02110-1301, USA.
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
export TEST=/CoreOS/util-linux/Sanity/various
|
|
||||||
export TESTVERSION=1.0
|
|
||||||
|
|
||||||
BUILT_FILES=
|
|
||||||
|
|
||||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
|
||||||
|
|
||||||
.PHONY: all install download clean
|
|
||||||
|
|
||||||
run: $(FILES) build
|
|
||||||
./runtest.sh
|
|
||||||
|
|
||||||
build: $(BUILT_FILES)
|
|
||||||
test -x runtest.sh || chmod a+x runtest.sh
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *~ $(BUILT_FILES)
|
|
||||||
|
|
||||||
|
|
||||||
include /usr/share/rhts/lib/rhts-make.include
|
|
||||||
|
|
||||||
$(METADATA): Makefile
|
|
||||||
@echo "Owner: Miroslav Vadkerti <mvadkert@redhat.com>" > $(METADATA)
|
|
||||||
@echo "Name: $(TEST)" >> $(METADATA)
|
|
||||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
|
||||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
|
||||||
@echo "Description: This test groups small sanity and regression tests for util-linux" >> $(METADATA)
|
|
||||||
@echo "Type: Sanity" >> $(METADATA)
|
|
||||||
@echo "TestTime: 10m" >> $(METADATA)
|
|
||||||
@echo "RunFor: util-linux" >> $(METADATA)
|
|
||||||
@echo "Requires: util-linux util-linux-user" >> $(METADATA)
|
|
||||||
@echo "Priority: Normal" >> $(METADATA)
|
|
||||||
@echo "License: GPLv2" >> $(METADATA)
|
|
||||||
@echo "Confidential: no" >> $(METADATA)
|
|
||||||
@echo "Destructive: no" >> $(METADATA)
|
|
||||||
@echo "Releases: -RHEL3 -RHEL4 -RHEL5Server -RHEL5Client -RHEL6" >> $(METADATA)
|
|
||||||
|
|
||||||
rhts-lint $(METADATA)
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
PURPOSE of /CoreOS/util-linux/various
|
|
||||||
Description: This test groups small sanity and regression tests for util-linux
|
|
||||||
Author: Miroslav Vadkerti <mvadkert@redhat.com>
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
summary: This test groups small sanity and regression tests for util-linux
|
|
||||||
description: ''
|
|
||||||
contact: Miroslav Vadkerti <mvadkert@redhat.com>
|
|
||||||
component:
|
|
||||||
- util-linux
|
|
||||||
test: ./runtest.sh
|
|
||||||
framework: beakerlib
|
|
||||||
recommend:
|
|
||||||
- util-linux
|
|
||||||
- util-linux-user
|
|
||||||
duration: 10m
|
|
||||||
extra-summary: /CoreOS/util-linux/Sanity/various
|
|
||||||
extra-task: /CoreOS/util-linux/Sanity/various
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# runtest.sh of /CoreOS/util-linux/various
|
|
||||||
# Description: This test groups small sanity and regression tests for util-linux
|
|
||||||
# Author: Miroslav Vadkerti <mvadkert@redhat.com>
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
|
|
||||||
#
|
|
||||||
# This copyrighted material is made available to anyone wishing
|
|
||||||
# to use, modify, copy, or redistribute it subject to the terms
|
|
||||||
# and conditions of the GNU General Public License version 2.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be
|
|
||||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
|
||||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
||||||
# PURPOSE. See the GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public
|
|
||||||
# License along with this program; if not, write to the Free
|
|
||||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
# Boston, MA 02110-1301, USA.
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
# Include Beaker environment
|
|
||||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
|
||||||
|
|
||||||
PACKAGE="util-linux"
|
|
||||||
|
|
||||||
rlJournalStart
|
|
||||||
rlPhaseStartSetup
|
|
||||||
rlAssertRpm $PACKAGE
|
|
||||||
rlPhaseEnd
|
|
||||||
|
|
||||||
rlPhaseStartTest "return code of chfn should be always 1 in case failure"
|
|
||||||
rlRun "chfn -f a:b" 1
|
|
||||||
rlRun "chfn -o a:b" 1
|
|
||||||
rlRun "chfn -p a:b" 1
|
|
||||||
rlRun "chfn -h a:b" 1
|
|
||||||
rlRun "chfn -x a:b" 1
|
|
||||||
rlRun "chfn -f a -o b -p c -h d unknown-user" 1
|
|
||||||
rlPhaseEnd
|
|
||||||
|
|
||||||
rlPhaseStartCleanup
|
|
||||||
rlPhaseEnd
|
|
||||||
rlJournalPrintText
|
|
||||||
rlJournalEnd
|
|
||||||
103
util-linux-2.19-floppy-generic.patch
Normal file
103
util-linux-2.19-floppy-generic.patch
Normal file
|
|
@ -0,0 +1,103 @@
|
||||||
|
diff -up util-linux-2.19/floppy-0.18/floppyfloppy.c.kzak util-linux-2.19/floppy-0.18/floppyfloppy.c
|
||||||
|
--- util-linux-2.19/floppy-0.18/floppyfloppy.c.kzak 2009-09-24 03:36:33.000000000 +0200
|
||||||
|
+++ util-linux-2.19/floppy-0.18/floppyfloppy.c 2011-03-07 10:40:42.000000000 +0100
|
||||||
|
@@ -271,6 +271,33 @@ static RETSIGTYPE sighandler(int signum)
|
||||||
|
#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)
|
||||||
|
@@ -282,6 +309,7 @@ static int do_format(const char *dev, in
|
||||||
|
struct format_descr curtrack;
|
||||||
|
int pct;
|
||||||
|
struct stat stat_buf;
|
||||||
|
+ int gen = 0;
|
||||||
|
|
||||||
|
int i, j;
|
||||||
|
char *devname;
|
||||||
|
@@ -304,23 +332,52 @@ static int do_format(const char *dev, in
|
||||||
|
|
||||||
|
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);
|
||||||
11
util-linux-2.19-floppy-locale.patch
Normal file
11
util-linux-2.19-floppy-locale.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
diff -up util-linux-2.19/floppy-0.18/superfloppy.c.kzak util-linux-2.19/floppy-0.18/superfloppy.c
|
||||||
|
--- util-linux-2.19/floppy-0.18/superfloppy.c.kzak 2009-09-23 02:47:26.000000000 +0200
|
||||||
|
+++ util-linux-2.19/floppy-0.18/superfloppy.c 2011-03-07 10:37:20.000000000 +0100
|
||||||
|
@@ -13,6 +13,7 @@
|
||||||
|
#include <popt.h>
|
||||||
|
#include <locale.h>
|
||||||
|
#include <libintl.h>
|
||||||
|
+#include <locale.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <unistd.h>
|
||||||
25
util-linux-2.20-fdformat-man-ide.patch
Normal file
25
util-linux-2.20-fdformat-man-ide.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
diff -up util-linux-2.20-rc1/disk-utils/fdformat.8.orig util-linux-2.20-rc1/disk-utils/fdformat.8
|
||||||
|
--- util-linux-2.20-rc1/disk-utils/fdformat.8.orig 2011-07-20 21:55:23.000000000 +0200
|
||||||
|
+++ util-linux-2.20-rc1/disk-utils/fdformat.8 2011-07-29 21:08:57.558601033 +0200
|
||||||
|
@@ -43,6 +43,11 @@ when a non-standard format is being used
|
||||||
|
autodetected earlier. In this case, use
|
||||||
|
.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
|
||||||
|
\fB\-n\fR, \fB\-\-no\-verify\fR
|
||||||
|
@@ -58,7 +63,8 @@ Display help and exit.
|
||||||
|
.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
|
||||||
49
util-linux-2.21-ipcs-32bit.patch
Normal file
49
util-linux-2.21-ipcs-32bit.patch
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
diff -up util-linux-2.21-rc1/sys-utils/ipcs.c.kzak util-linux-2.21-rc1/sys-utils/ipcs.c
|
||||||
|
--- util-linux-2.21-rc1/sys-utils/ipcs.c.kzak 2012-01-19 13:31:26.328579820 +0100
|
||||||
|
+++ util-linux-2.21-rc1/sys-utils/ipcs.c 2012-01-19 13:33:40.968066006 +0100
|
||||||
|
@@ -262,6 +262,27 @@ static void print_perms (int id, struct
|
||||||
|
printf(" %-10u\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)
|
||||||
|
{
|
||||||
|
int maxid, shmid, id;
|
||||||
|
@@ -286,12 +307,12 @@ void do_shm (char format)
|
||||||
|
* 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;
|
||||||
36
util-linux-2.21-lscpu-SIGFPE.patch
Normal file
36
util-linux-2.21-lscpu-SIGFPE.patch
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
diff -up util-linux-2.21.2/sys-utils/lscpu.c.kzak util-linux-2.21.2/sys-utils/lscpu.c
|
||||||
|
--- util-linux-2.21.2/sys-utils/lscpu.c.kzak 2012-05-25 11:44:59.041195655 +0200
|
||||||
|
+++ util-linux-2.21.2/sys-utils/lscpu.c 2012-11-16 11:50:59.350150439 +0100
|
||||||
|
@@ -605,16 +605,26 @@ read_topology(struct lscpu_desc *desc, i
|
||||||
|
|
||||||
|
/* threads within one core */
|
||||||
|
nthreads = CPU_COUNT_S(setsize, thread_siblings);
|
||||||
|
+ if (!nthreads)
|
||||||
|
+ nthreads = 1;
|
||||||
|
+
|
||||||
|
/* cores within one socket */
|
||||||
|
ncores = CPU_COUNT_S(setsize, core_siblings) / nthreads;
|
||||||
|
- /* number of sockets within one book.
|
||||||
|
- * Because of odd / non-present cpu maps and to keep
|
||||||
|
- * calculation easy we make sure that nsockets and
|
||||||
|
- * nbooks is at least 1.
|
||||||
|
+ if (!ncores)
|
||||||
|
+ ncores = 1;
|
||||||
|
+
|
||||||
|
+ /* number of sockets within one book. Because of odd /
|
||||||
|
+ * non-present cpu maps and to keep calculation easy we make
|
||||||
|
+ * sure that nsockets and nbooks is at least 1.
|
||||||
|
*/
|
||||||
|
- nsockets = desc->ncpus / nthreads / ncores ?: 1;
|
||||||
|
+ nsockets = desc->ncpus / nthreads / ncores;
|
||||||
|
+ if (!nsockets)
|
||||||
|
+ nsockets = 1;
|
||||||
|
+
|
||||||
|
/* number of books */
|
||||||
|
- nbooks = desc->ncpus / nthreads / ncores / nsockets ?: 1;
|
||||||
|
+ nbooks = desc->ncpus / nthreads / ncores / nsockets;
|
||||||
|
+ if (!nbooks)
|
||||||
|
+ nbooks = 1;
|
||||||
|
|
||||||
|
/* all threads, see also read_basicinfo()
|
||||||
|
* -- fallback for kernels without
|
||||||
36
util-linux-2.21-mount-commas.patch
Normal file
36
util-linux-2.21-mount-commas.patch
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
From 5e7b834002aa0ce97a1b0104e8710664ad954595 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dave Reisner <dreisner@archlinux.org>
|
||||||
|
Date: Sun, 3 Jun 2012 12:25:47 -0400
|
||||||
|
Subject: [PATCH] libmount: trim leading commas from each options string
|
||||||
|
|
||||||
|
Fixes a bug in option string parsing wherein a line such as:
|
||||||
|
|
||||||
|
ro,relatime,,nosuid,nodev
|
||||||
|
|
||||||
|
Will be seen as only the tokens "ro" and "relatime" after the parser
|
||||||
|
encounters a zero length (and erroneously declared NULL) option.
|
||||||
|
|
||||||
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
||||||
|
---
|
||||||
|
libmount/src/optstr.c | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/libmount/src/optstr.c b/libmount/src/optstr.c
|
||||||
|
index af5953b..66d2a06 100644
|
||||||
|
--- a/libmount/src/optstr.c
|
||||||
|
+++ b/libmount/src/optstr.c
|
||||||
|
@@ -62,6 +62,11 @@ static int mnt_optstr_parse_next(char **optstr, char **name, size_t *namesz,
|
||||||
|
if (valsz)
|
||||||
|
*valsz = 0;
|
||||||
|
|
||||||
|
+ /* trim leading commas as to not invalidate option
|
||||||
|
+ * strings with multiple consecutive commas */
|
||||||
|
+ while (optstr0 && *optstr0 == ',')
|
||||||
|
+ optstr0++;
|
||||||
|
+
|
||||||
|
for (p = optstr0; p && *p; p++) {
|
||||||
|
if (!start)
|
||||||
|
start = p; /* begin of the option item */
|
||||||
|
--
|
||||||
|
1.7.11.7
|
||||||
|
|
||||||
27
util-linux-2.21-mount-sloppy.patch
Normal file
27
util-linux-2.21-mount-sloppy.patch
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
From e26de525e21677c680d87f63e4dafbe4859365bf Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karel Zak <kzak@redhat.com>
|
||||||
|
Date: Thu, 14 Jun 2012 14:43:21 +0200
|
||||||
|
Subject: [PATCH] mount: (new) allow sloppy for non-root
|
||||||
|
|
||||||
|
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=825836
|
||||||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||||
|
---
|
||||||
|
sys-utils/mount.c | 2 +-
|
||||||
|
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/sys-utils/mount.c b/sys-utils/mount.c
|
||||||
|
index 2b8843c..9cc2db3 100644
|
||||||
|
--- a/sys-utils/mount.c
|
||||||
|
+++ b/sys-utils/mount.c
|
||||||
|
@@ -731,7 +731,7 @@ int main(int argc, char **argv)
|
||||||
|
longopts, NULL)) != -1) {
|
||||||
|
|
||||||
|
/* only few options are allowed for non-root users */
|
||||||
|
- if (mnt_context_is_restricted(cxt) && !strchr("hlLUVvpri", c))
|
||||||
|
+ if (mnt_context_is_restricted(cxt) && !strchr("hlLUVvpris", c))
|
||||||
|
exit_non_root(option_to_longopt(c, longopts));
|
||||||
|
|
||||||
|
switch(c) {
|
||||||
|
--
|
||||||
|
1.7.7.6
|
||||||
|
|
||||||
26
util-linux-2.21-uuidd-rundir.patch
Normal file
26
util-linux-2.21-uuidd-rundir.patch
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
From 1425948c8ceaf128c9cfcf4db680be4144f89314 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karel Zak <kzak@redhat.com>
|
||||||
|
Date: Mon, 18 Jun 2012 15:46:20 +0200
|
||||||
|
Subject: [PATCH] uuidd: move from /var/run/uuidd to /run/uuidd
|
||||||
|
|
||||||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||||
|
---
|
||||||
|
libuuid/src/uuidd.h | 2 +-
|
||||||
|
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libuuid/src/uuidd.h b/libuuid/src/uuidd.h
|
||||||
|
index 27b79c2..ff7e6d7 100644
|
||||||
|
--- a/libuuid/src/uuidd.h
|
||||||
|
+++ b/libuuid/src/uuidd.h
|
||||||
|
@@ -35,7 +35,7 @@
|
||||||
|
#ifndef _UUID_UUIDD_H
|
||||||
|
#define _UUID_UUIDD_H
|
||||||
|
|
||||||
|
-#define UUIDD_DIR "/var/run/uuidd"
|
||||||
|
+#define UUIDD_DIR "/run/uuidd"
|
||||||
|
#define UUIDD_SOCKET_PATH UUIDD_DIR "/request"
|
||||||
|
#define UUIDD_PIDFILE_PATH UUIDD_DIR "/uuidd.pid"
|
||||||
|
#define UUIDD_PATH "/usr/sbin/uuidd"
|
||||||
|
--
|
||||||
|
1.7.7.6
|
||||||
|
|
||||||
8
util-linux-60-raw.rules
Normal file
8
util-linux-60-raw.rules
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
#
|
||||||
|
# Enter raw device bindings here.
|
||||||
|
#
|
||||||
|
# An example would be:
|
||||||
|
# ACTION=="add", KERNEL=="sda", RUN+="/usr/bin/raw /dev/raw/raw1 %N"
|
||||||
|
# to bind /dev/raw/raw1 to /dev/sda, or
|
||||||
|
# ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="1", RUN+="/usr/bin/raw /dev/raw/raw2 %M %m"
|
||||||
|
# to bind /dev/raw/raw2 to the device with major 8, minor 1.
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#%PAM-1.0
|
#%PAM-1.0
|
||||||
|
auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
|
||||||
auth substack system-auth
|
auth substack system-auth
|
||||||
auth include postlogin
|
auth include postlogin
|
||||||
account required pam_nologin.so
|
account required pam_nologin.so
|
||||||
|
|
@ -7,6 +8,7 @@ password include system-auth
|
||||||
# pam_selinux.so close should be the first session rule
|
# pam_selinux.so close should be the first session rule
|
||||||
session required pam_selinux.so close
|
session required pam_selinux.so close
|
||||||
session required pam_loginuid.so
|
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
|
# 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_selinux.so open
|
||||||
session required pam_namespace.so
|
session required pam_namespace.so
|
||||||
|
|
|
||||||
11
util-linux-ng-2.21-login-lastlog.patch
Normal file
11
util-linux-ng-2.21-login-lastlog.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
diff -up util-linux-2.21-rc1/login-utils/login.c.kzak util-linux-2.21-rc1/login-utils/login.c
|
||||||
|
--- util-linux-2.21-rc1/login-utils/login.c.kzak 2012-01-19 13:19:54.886299587 +0100
|
||||||
|
+++ util-linux-2.21-rc1/login-utils/login.c 2012-01-19 13:20:40.853451212 +0100
|
||||||
|
@@ -499,7 +499,7 @@ static void log_lastlog(struct login_con
|
||||||
|
if (!cxt->pwd)
|
||||||
|
return;
|
||||||
|
|
||||||
|
- fd = open(_PATH_LASTLOG, O_RDWR, 0);
|
||||||
|
+ fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0);
|
||||||
|
if (fd < 0)
|
||||||
|
return;
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#%PAM-1.0
|
#%PAM-1.0
|
||||||
|
auth required pam_securetty.so
|
||||||
auth substack password-auth
|
auth substack password-auth
|
||||||
auth include postlogin
|
auth include postlogin
|
||||||
account required pam_nologin.so
|
account required pam_nologin.so
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
#%PAM-1.0
|
|
||||||
auth include runuser
|
|
||||||
session optional pam_keyinit.so force revoke
|
|
||||||
-session optional pam_systemd.so
|
|
||||||
session include runuser
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
#%PAM-1.0
|
|
||||||
auth sufficient pam_rootok.so
|
|
||||||
session optional pam_keyinit.so revoke
|
|
||||||
session required pam_limits.so
|
|
||||||
session required pam_unix.so
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
#%PAM-1.0
|
|
||||||
auth include su
|
|
||||||
account include su
|
|
||||||
password include su
|
|
||||||
session optional pam_keyinit.so force revoke
|
|
||||||
session include su
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
#%PAM-1.0
|
|
||||||
auth required pam_env.so
|
|
||||||
auth sufficient pam_rootok.so
|
|
||||||
# Uncomment the following line to implicitly trust users in the "wheel" group.
|
|
||||||
#auth sufficient pam_wheel.so trust use_uid
|
|
||||||
# Uncomment the following line to require a user to be in the "wheel" group.
|
|
||||||
#auth required pam_wheel.so use_uid
|
|
||||||
auth substack system-auth
|
|
||||||
auth include postlogin
|
|
||||||
account sufficient pam_succeed_if.so uid = 0 use_uid quiet
|
|
||||||
account include system-auth
|
|
||||||
password include system-auth
|
|
||||||
session include system-auth
|
|
||||||
session include postlogin
|
|
||||||
session optional pam_xauth.so
|
|
||||||
2820
util-linux.spec
2820
util-linux.spec
File diff suppressed because it is too large
Load diff
|
|
@ -1 +0,0 @@
|
||||||
d /run/uuidd 2775 uuidd uuidd
|
|
||||||
117
uuidd.init
Executable file
117
uuidd.init
Executable file
|
|
@ -0,0 +1,117 @@
|
||||||
|
#!/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 $?
|
||||||
1
uuidd.tmpfiles
Normal file
1
uuidd.tmpfiles
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
d /run/uuidd 0710 uuidd uuidd -
|
||||||
Loading…
Add table
Add a link
Reference in a new issue