Author: archaic
Date: 2005-10-08 08:58:36 -0600 (Sat, 08 Oct 2005)
New Revision: 1177

Added:
   trunk/util-linux/util-linux-2.12q-PIC-1.patch
   trunk/util-linux/util-linux-2.12q-hardened_cflags-1.patch
   trunk/util-linux/util-linux-2.12q-nologin-1.patch
Removed:
   trunk/hlfs/util-linux-2.12q-PIC-1.patch
   trunk/hlfs/util-linux-2.12q-hardened_cflags-1.patch
   trunk/hlfs/util-linux-2.12q-nologin-1.patch
Log:
Moved old util-linux patches.

Deleted: trunk/hlfs/util-linux-2.12q-PIC-1.patch
===================================================================
--- trunk/hlfs/util-linux-2.12q-PIC-1.patch     2005-10-08 14:56:54 UTC (rev 
1176)
+++ trunk/hlfs/util-linux-2.12q-PIC-1.patch     2005-10-08 14:58:36 UTC (rev 
1177)
@@ -1,49 +0,0 @@
-Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
-Date: 2005-03-08
-Initial Package Version: 2.12q
-Origin: Based on:
-http://ftp.belnet.be/linux/gentoo-portage/sys-apps/util-linux/files/\
-        util-linux-2.12b-pic.patch
-Upstream Status: Submitted
-Description: This is needed for Grsec. http://www..grsecurity.net/
-Util linux doesn't build with position independence without this patch.
-
-Also see:
-http://www.linuxfromscratch.org/hlfs/
-
-diff -Naur util-linux-2.12q.orig/fdisk/llseek.c util-linux-2.12q/fdisk/llseek.c
---- util-linux-2.12q.orig/fdisk/llseek.c       2003-07-13 21:13:33.000000000 
+0000
-+++ util-linux-2.12q/fdisk/llseek.c    2005-03-08 22:07:24.980010824 +0000
-@@ -19,7 +19,7 @@
- 
- #else /* HAVE_LLSEEK */
- 
--#if defined(__alpha__) || defined(__ia64__) || defined(__s390x__)
-+#if (defined(__PIC__) || (__pic__) || (__alpha__) || (__ia64__) || 
(__s390x__)|| (__hppa__))
- 
- #define my_llseek lseek
- 
-diff -Naur util-linux-2.12q.orig/fdisk/sfdisk.c util-linux-2.12q/fdisk/sfdisk.c
---- util-linux-2.12q.orig/fdisk/sfdisk.c       2005-01-04 22:31:57.000000000 
+0000
-+++ util-linux-2.12q/fdisk/sfdisk.c    2005-03-08 22:09:42.121162200 +0000
-@@ -172,7 +172,7 @@
-  * Note: we use 512-byte sectors here, irrespective of the hardware ss.
-  */
- #undef use_lseek
--#if defined (__alpha__) || defined (__ia64__) || defined (__x86_64__) || 
defined (__s390x__)
-+#if (defined(__PIC__) || (__pic__) || (__alpha__) || (__ia64__) || 
(__x86_64__) || (__s390x__))
- #define use_lseek
- #endif
- 
-diff -Naur util-linux-2.12q.orig/partx/partx.c util-linux-2.12q/partx/partx.c
---- util-linux-2.12q.orig/partx/partx.c        2004-08-23 20:13:27.000000000 
+0000
-+++ util-linux-2.12q/partx/partx.c     2005-03-08 22:11:32.108441592 +0000
-@@ -333,7 +333,7 @@
- /*
-  * sseek: seek to specified sector
-  */
--#if !defined (__alpha__) && !defined (__ia64__) && !defined (__s390x__) && 
!defined(__x86_64__)
-+#if !(defined(__PIC__) || (__pic__) || (__alpha__) || (__ia64__) || 
(__s390x__) || (__x86_64__))
- #define NEED__llseek
- #endif
- 

Deleted: trunk/hlfs/util-linux-2.12q-hardened_cflags-1.patch
===================================================================
--- trunk/hlfs/util-linux-2.12q-hardened_cflags-1.patch 2005-10-08 14:56:54 UTC 
(rev 1176)
+++ trunk/hlfs/util-linux-2.12q-hardened_cflags-1.patch 2005-10-08 14:58:36 UTC 
(rev 1177)
@@ -1,261 +0,0 @@
-Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
-Date: 2005-02-04
-Initial Package Version: 2.12q
-Upstream Status: Not submitted
-Origin: None
-Description: Check for gcc -fpie, -fpic, -fstack-protector, and ld -pie,
--z relro, -z now. Use whatever works.
-
-See:
-http://www.linuxfromscratch.org/~robert/Homogenic/
-
-diff -Naur util-linux-2.12q.orig/MCONFIG util-linux-2.12q/MCONFIG
---- util-linux-2.12q.orig/MCONFIG      2005-02-04 18:36:36.428647272 +0000
-+++ util-linux-2.12q/MCONFIG   2005-02-04 18:36:43.938571992 +0000
-@@ -226,6 +226,28 @@
- NLSFLAGS = -DDISABLE_NLS
- endif
- 
-+EXE_CFLAGS :=
-+EXE_LDFLAGS :=
-+EXTRA_CFLAGS :=
-+EXTRA_LDFLAGS :=
-+
-+ifeq "$(HAVE_PIE)" "yes"
-+EXE_CFLAGS += -pie -fpie
-+EXE_LDFLAGS += -pie
-+endif
-+
-+ifeq "$(HAVE_SSP)" "yes"
-+EXTRA_CFLAGS += -fstack-protector-all
-+endif
-+
-+ifeq "$(HAVE_RELRO)" "yes"
-+EXTRA_LDFLAGS += -z relro
-+endif
-+
-+ifeq "$(HAVE_NOW)" "yes"
-+EXTRA_LDFLAGS += -z now
-+endif
-+
- CFLAGS := $(OPT) -I$(LIB) $(WARNFLAGS) \
-                       $(CURSESFLAGS) $(SLANGFLAGS) $(NLSFLAGS) \
-                       -D_FILE_OFFSET_BITS=64 \
-@@ -234,8 +256,9 @@
-                       -DLOGDIR=\"$(LOG_DIR)\" \
-                       -DVARPATH=\"$(VAR_PATH)\" \
-                       -DLOCALEDIR=\"$(LOCALE_DIR)\" \
--                      $(CFLAGS)
-+                      $(EXTRA_CFLAGS) $(CFLAGS)
- 
-+LDFLAGS := $(EXTRA_LDFLAGS) $(LDFLAGS)
- 
- %.o: %.c
-       $(CC) -c $(CFLAGS) $< -o $@
-diff -Naur util-linux-2.12q.orig/configure util-linux-2.12q/configure
---- util-linux-2.12q.orig/configure    2005-02-04 18:36:36.429646120 +0000
-+++ util-linux-2.12q/configure 2005-02-04 18:40:00.939623280 +0000
-@@ -747,3 +747,89 @@
-         echo "You don't have blkid"
- fi
- rm -f conftest conftest.c
-+
-+#
-+# 16. Do we have -pie -fpie?
-+#
-+echo '
-+#include <stdio.h>
-+int main(){ exit(0); }
-+' > conftest.c
-+ORIG_CFLAGS=${CFLAGS}
-+CFLAGS="${CFLAGS} -pie -fpie -Wl,-pie"
-+eval $compile
-+CFLAGS=${ORIG_CFLAGS}
-+if test -s conftest; then
-+        echo "HAVE_PIE=yes" >> make_include
-+        echo "Your compiler accepts -pie -fpie"
-+else
-+        echo "HAVE_PIE=no" >> make_include
-+        echo "Your compiler does not accept -pie -fpie"
-+fi
-+unset ORIG_CFLAGS
-+rm -f conftest conftest.c
-+
-+#
-+# 17. Do we have -fstack-protector-all?
-+#
-+echo '
-+#include <stdio.h>
-+int main(){ exit(0); }
-+' > conftest.c
-+ORIG_CFLAGS=${CFLAGS}
-+CFLAGS="${CFLAGS} -fstack-protector-all"
-+eval $compile
-+CFLAGS=${ORIG_CFLAGS}
-+if test -s conftest; then
-+        echo "HAVE_SSP=yes" >> make_include
-+        echo "Your compiler accepts -fstack-protector-all"
-+else
-+        echo "HAVE_SSP=no" >> make_include
-+        echo "Your compiler does not accept -fstack-protector-all"
-+fi
-+unset ORIG_CFLAGS
-+rm -f conftest conftest.c
-+
-+
-+#
-+# 18. Do we have -z relro?
-+#
-+echo '
-+#include <stdio.h>
-+int main(){ exit(0); }
-+' > conftest.c
-+ORIG_CFLAGS=${CFLAGS}
-+CFLAGS="${CFLAGS} -Wl,-z,relro"
-+eval $compile
-+CFLAGS=${ORIG_CFLAGS}
-+if test -s conftest; then
-+        echo "HAVE_RELRO=yes" >> make_include
-+        echo "Your linker accepts -z relro"
-+else
-+        echo "HAVE_RELRO=no" >> make_include
-+        echo "Your linker does not accept -z relro"
-+fi
-+unset ORIG_CFLAGS
-+rm -f conftest conftest.c
-+
-+#
-+# 19. Do we have -z now?
-+#
-+echo '
-+#include <stdio.h>
-+int main(){ exit(0); }
-+' > conftest.c
-+ORIG_CFLAGS=${CFLAGS}
-+CFLAGS="${CFLAGS} -Wl,-z,now"
-+eval $compile
-+CFLAGS=${ORIG_CFLAGS}
-+if test -s conftest; then
-+        echo "HAVE_NOW=yes" >> make_include
-+        echo "Your linker accepts -z now"
-+else
-+        echo "HAVE_NOW=no" >> make_include
-+        echo "Your linker does not accept -z now"
-+fi
-+unset ORIG_CFLAGS
-+rm -f conftest conftest.c
-+
-diff -Naur util-linux-2.12q.orig/disk-utils/Makefile 
util-linux-2.12q/disk-utils/Makefile
---- util-linux-2.12q.orig/disk-utils/Makefile  2005-02-04 18:36:36.436638056 
+0000
-+++ util-linux-2.12q/disk-utils/Makefile       2005-02-04 18:36:43.943571232 
+0000
-@@ -6,6 +6,9 @@
- include ../make_include
- include ../MCONFIG
- 
-+CFLAGS := $(EXE_CFLAGS) $(CFLAGS)
-+LDFLAGS := $(EXE_LDFLAGS) $(LDFLAGS)
-+
- # Where to put man pages?
- 
- MAN8=         blockdev.8 fdformat.8 isosize.8 mkfs.8 mkswap.8 elvtune.8 \
-diff -Naur util-linux-2.12q.orig/fdisk/Makefile util-linux-2.12q/fdisk/Makefile
---- util-linux-2.12q.orig/fdisk/Makefile       2005-02-04 18:36:36.456615016 
+0000
-+++ util-linux-2.12q/fdisk/Makefile    2005-02-04 18:36:43.945570928 +0000
-@@ -6,6 +6,9 @@
- include ../make_include
- include ../MCONFIG
- 
-+CFLAGS := $(EXE_CFLAGS) $(CFLAGS)
-+LDFLAGS := $(EXE_LDFLAGS) $(LDFLAGS)
-+
- MAN8=
- SBIN=
- CFDISK=cfdisk
-diff -Naur util-linux-2.12q.orig/hwclock/Makefile 
util-linux-2.12q/hwclock/Makefile
---- util-linux-2.12q.orig/hwclock/Makefile     2005-02-04 18:36:36.486580456 
+0000
-+++ util-linux-2.12q/hwclock/Makefile  2005-02-04 18:36:43.947570624 +0000
-@@ -3,6 +3,9 @@
- include ../make_include
- include ../MCONFIG
- 
-+CFLAGS := $(EXE_CFLAGS) $(CFLAGS)
-+LDFLAGS := $(EXE_LDFLAGS) $(LDFLAGS)
-+
- # Where to put man pages?
- 
- MAN8=                 hwclock.8
-diff -Naur util-linux-2.12q.orig/login-utils/Makefile 
util-linux-2.12q/login-utils/Makefile
---- util-linux-2.12q.orig/login-utils/Makefile 2005-02-04 18:36:36.501563176 
+0000
-+++ util-linux-2.12q/login-utils/Makefile      2005-02-04 18:36:43.950570168 
+0000
-@@ -9,6 +9,9 @@
- include ../make_include
- include ../MCONFIG
- 
-+CFLAGS := $(EXE_CFLAGS) $(CFLAGS)
-+LDFLAGS := $(EXE_LDFLAGS) $(LDFLAGS)
-+
- # Where to put man pages?
- 
- MAN1.MISC=    last.1 mesg.1 wall.1
-diff -Naur util-linux-2.12q.orig/misc-utils/Makefile 
util-linux-2.12q/misc-utils/Makefile
---- util-linux-2.12q.orig/misc-utils/Makefile  2005-02-04 18:36:36.525535528 
+0000
-+++ util-linux-2.12q/misc-utils/Makefile       2005-02-04 18:36:43.952569864 
+0000
-@@ -7,6 +7,9 @@
- include ../make_include
- include ../MCONFIG
- 
-+CFLAGS := $(EXE_CFLAGS) $(CFLAGS)
-+LDFLAGS := $(EXE_LDFLAGS) $(LDFLAGS)
-+
- # scriptreplay not added yet
- 
- # Where to put man pages?
-diff -Naur util-linux-2.12q.orig/mount/Makefile util-linux-2.12q/mount/Makefile
---- util-linux-2.12q.orig/mount/Makefile       2005-02-04 18:36:36.546511336 
+0000
-+++ util-linux-2.12q/mount/Makefile    2005-02-04 18:36:43.954569560 +0000
-@@ -1,6 +1,9 @@
- include ../make_include
- include ../MCONFIG
- 
-+CFLAGS := $(EXE_CFLAGS) $(CFLAGS)
-+LDFLAGS := $(EXE_LDFLAGS) $(LDFLAGS)
-+
- DEFINES = -DHAVE_NFS $(BLKID_DEFINE)
- 
- RPCSVCDIR = rpcsvc
-diff -Naur util-linux-2.12q.orig/partx/Makefile util-linux-2.12q/partx/Makefile
---- util-linux-2.12q.orig/partx/Makefile       2005-02-04 18:36:36.575477928 
+0000
-+++ util-linux-2.12q/partx/Makefile    2005-02-04 18:36:43.956569256 +0000
-@@ -1,3 +1,6 @@
-+CFLAGS := $(EXE_CFLAGS) $(CFLAGS)
-+LDFLAGS := $(EXE_LDFLAGS) $(LDFLAGS)
-+
- OBJ = bsd.o dos.o partx.o solaris.o unixware.o gpt.o crc32.o
- CFLAGS += -Wall
- 
-diff -Naur util-linux-2.12q.orig/sys-utils/Makefile 
util-linux-2.12q/sys-utils/Makefile
---- util-linux-2.12q.orig/sys-utils/Makefile   2005-02-04 18:36:36.676361576 
+0000
-+++ util-linux-2.12q/sys-utils/Makefile        2005-02-04 18:36:43.958568952 
+0000
-@@ -6,6 +6,9 @@
- include ../make_include
- include ../MCONFIG
- 
-+CFLAGS := $(EXE_CFLAGS) $(CFLAGS)
-+LDFLAGS := $(EXE_LDFLAGS) $(LDFLAGS)
-+
- # Where to put man pages?
- 
- MAN1=         arch.1 flock.1 readprofile.1
-diff -Naur util-linux-2.12q.orig/text-utils/Makefile 
util-linux-2.12q/text-utils/Makefile
---- util-linux-2.12q.orig/text-utils/Makefile  2005-02-04 18:36:36.693341992 
+0000
-+++ util-linux-2.12q/text-utils/Makefile       2005-02-04 18:36:43.960568648 
+0000
-@@ -6,6 +6,9 @@
- include ../make_include
- include ../MCONFIG
- 
-+CFLAGS := $(EXE_CFLAGS) $(CFLAGS)
-+LDFLAGS := $(EXE_LDFLAGS) $(LDFLAGS)
-+
- MAN1=                 col.1 colcrt.1 colrm.1 column.1 hexdump.1 rev.1 line.1 
tailf.1
- 
- USRBIN=               col colcrt colrm column hexdump rev line tailf

Deleted: trunk/hlfs/util-linux-2.12q-nologin-1.patch
===================================================================
--- trunk/hlfs/util-linux-2.12q-nologin-1.patch 2005-10-08 14:56:54 UTC (rev 
1176)
+++ trunk/hlfs/util-linux-2.12q-nologin-1.patch 2005-10-08 14:58:36 UTC (rev 
1177)
@@ -1,209 +0,0 @@
-Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
-Date: 2005-01-26
-Initial Package Version: 2.12p
-Upstream Status: Not Submitted
-Origin: http://www.openbsd.org/cgi-bin/cvsweb/src/sbin/nologin/
-Description: This patch adds /sbin/nologin and 'man 8 nologin', for polite
-login refusal. nologin will try to read /etc/nologin.txt to use it for a
-message, if /etc/nologin.txt does not exist it will use a hardcoded message.
-If you do not want nologin to try to read /etc/nologin.txt at all then use:
-
-make NOLOGIN_TXT=no
-
-diff -Naur util-linux-2.12p.orig/MCONFIG util-linux-2.12p/MCONFIG
---- util-linux-2.12p.orig/MCONFIG      2005-01-26 14:59:48.050733892 +0000
-+++ util-linux-2.12p/MCONFIG   2005-01-26 16:05:24.442594819 +0000
-@@ -19,6 +19,12 @@
- CPU=$(shell uname -m)
- ARCH=$(shell echo $(CPU) | sed 's/i.86/intel/;s/arm.*/arm/')
- 
-+# If HAVE_NOLOGIN is set to "yes", then nologin will not be installed.
-+HAVE_NOLOGIN=no
-+
-+# If NOLOGIN_TXT is set to "no", then /etc/nologin.txt will not be used.
-+NOLOGIN_TXT=yes
-+
- # If HAVE_PAM is set to "yes", then login, chfn, chsh, and newgrp
- # will use PAM for authentication. Additionally, passwd will not be
- # installed as it is not PAM aware.
-diff -Naur util-linux-2.12p.orig/login-utils/Makefile 
util-linux-2.12p/login-utils/Makefile
---- util-linux-2.12p.orig/login-utils/Makefile 2005-01-26 14:59:48.086723790 
+0000
-+++ util-linux-2.12p/login-utils/Makefile      2005-01-26 16:01:08.417442675 
+0000
-@@ -11,6 +11,8 @@
- 
- # Where to put man pages?
- 
-+MAN8.NOLOGIN=   nologin.8
-+
- MAN1.MISC=    last.1 mesg.1 wall.1
- 
- MAN1.PUTILS=  chfn.1 chsh.1 login.1 newgrp.1
-@@ -26,6 +28,8 @@
- # Where to put binaries?
- # See the "install" rule for the links. . .
- 
-+SBIN.NOLOGIN=   nologin
-+
- SBIN.GETTY=   agetty
- 
- SBIN.INIT=    simpleinit shutdown initctl
-@@ -80,7 +84,16 @@
- WHAT_TO_INSTALL:=$(WHAT_TO_INSTALL) install-getty
- endif
- 
-+ifeq "$(HAVE_NOLOGIN)" "no"
-+WHAT_TO_BUILD:=$(WHAT_TO_BUILD) all-nologin
-+WHAT_TO_INSTALL:=$(WHAT_TO_INSTALL) install-nologin
-+ifeq "$(NOLOGIN_TXT)" "yes"
-+CFLAGS += -DNOLOGIN_TXT
-+endif
-+endif
-+
- all: $(WHAT_TO_BUILD)
-+all-nologin: $(SBIN.NOLOGIN)
- all-passwd: $(USRBIN.PASSWD)
- all-putils: $(BIN.PUTILS) $(USRBIN.PUTILS) $(USRSBIN.PUTILS)
- all-init: $(SBIN.INIT)
-@@ -173,6 +186,12 @@
- 
- install: all $(WHAT_TO_INSTALL)
- 
-+install-nologin: $(SBIN.NOLOGIN)
-+      $(INSTALLDIR) $(SBINDIR)
-+      $(INSTALLBIN) $(SBIN.NOLOGIN) $(SBINDIR)
-+      $(INSTALLDIR) $(MAN8DIR)
-+      $(INSTALLMAN) $(MAN8.NOLOGIN) $(MAN8DIR)
-+
- install-putils: $(BIN.PUTILS) $(USRBIN.PUTILS) $(USRSBIN.PUTILS)
-       $(INSTALLDIR) $(BINDIR) $(USRBINDIR) $(USRSBINDIR)
-       $(INSTALLBIN) $(BIN.PUTILS) $(BINDIR)
-@@ -227,4 +246,4 @@
- clean distclean:
-       -rm -f *.o *~ core $(BIN.PASSWD) $(SBIN.GETTY) $(SBIN.INIT) \
-               $(USRBIN.MISC) $(USRBIN.PASSWD) $(USRBIN.PUTILS) \
--              $(USRSBIN.PUTILS) $(BIN.PUTILS)
-+              $(USRSBIN.PUTILS) $(BIN.PUTILS) $(SBIN.NOLOGIN)
-diff -Naur util-linux-2.12p.orig/login-utils/nologin.8 
util-linux-2.12p/login-utils/nologin.8
---- util-linux-2.12p.orig/login-utils/nologin.8        1970-01-01 
00:00:00.000000000 +0000
-+++ util-linux-2.12p/login-utils/nologin.8     2005-01-26 15:59:19.186105166 
+0000
-@@ -0,0 +1,57 @@
-+.\"
-+.\" 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. 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 .
-diff -Naur util-linux-2.12p.orig/login-utils/nologin.c 
util-linux-2.12p/login-utils/nologin.c
---- util-linux-2.12p.orig/login-utils/nologin.c        1970-01-01 
00:00:00.000000000 +0000
-+++ util-linux-2.12p/login-utils/nologin.c     2005-01-26 16:07:49.941761790 
+0000
-@@ -0,0 +1,59 @@
-+/*
-+ * 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 <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <unistd.h>
-+
-+#ifdef NOLOGIN_TXT
-+#define _PATH_NOLOGIN_TXT     "/etc/nologin.txt"
-+#endif
-+#define DEFAULT_MESG  "This account is currently not available.\n"
-+
-+int main(int argc, char *argv[])
-+{
-+#ifdef _PATH_NOLOGIN_TXT
-+      int nfd;
-+      ssize_t nrd;
-+      char nbuf[BUFSIZ];
-+
-+      nfd = open(_PATH_NOLOGIN_TXT, O_RDONLY);
-+      if (nfd < 0) {
-+#endif
-+              write(STDOUT_FILENO, DEFAULT_MESG, strlen(DEFAULT_MESG));
-+              exit (1);
-+#ifdef _PATH_NOLOGIN_TXT
-+      }
-+
-+      while ((nrd = read(nfd, nbuf, sizeof(nbuf))) != -1 && nrd != 0)
-+              write(STDOUT_FILENO, nbuf, nrd);
-+      close (nfd);
-+
-+      exit (1);
-+#endif
-+}

Copied: trunk/util-linux/util-linux-2.12q-PIC-1.patch (from rev 1170, 
trunk/hlfs/util-linux-2.12q-PIC-1.patch)

Copied: trunk/util-linux/util-linux-2.12q-hardened_cflags-1.patch (from rev 
1170, trunk/hlfs/util-linux-2.12q-hardened_cflags-1.patch)

Copied: trunk/util-linux/util-linux-2.12q-nologin-1.patch (from rev 1170, 
trunk/hlfs/util-linux-2.12q-nologin-1.patch)

-- 
http://linuxfromscratch.org/mailman/listinfo/patches
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to