This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 3.x development tree".
The branch, master has been updated via 94fc0510d83ed869280495e63ac9690abf2d0133 (commit) via 3fda3057d54cd8fec31e25a3af839adc66744d2e (commit) via f8b4a3ba2ec115dd316b9e54d582de196632d4c9 (commit) via 27dc0ff7fe876ba84ae8f4b8570f89aae200f417 (commit) via 5fa9f2d9430aca108f8de3b1a29dd60502b526f6 (commit) via c3b815b0dbb6d2452e5ad2566ced6767a9774981 (commit) via bdbbdbffcfe33a8c9f8baa77b4e2d8c2158d8526 (commit) via d2ab169e2f8bbee2d5771a03ecf7bf72a144af9f (commit) via e337df8a6068f8710ea233abbe0c98595c12f1e4 (commit) from a3fe65752cfc3aa9f51e63a818b5207746ecbae2 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 94fc0510d83ed869280495e63ac9690abf2d0133 Author: Michael Tremer michael.tremer@ipfire.org Date: Tue Mar 22 15:32:58 2011 +0100
upower: util-linux-ng -> util-linux.
commit 3fda3057d54cd8fec31e25a3af839adc66744d2e Author: Michael Tremer michael.tremer@ipfire.org Date: Tue Mar 22 15:32:58 2011 +0100
udisks: util-linux-ng -> util-linux.
commit f8b4a3ba2ec115dd316b9e54d582de196632d4c9 Author: Michael Tremer michael.tremer@ipfire.org Date: Tue Mar 22 15:32:54 2011 +0100
nfs-utils: util-linux-ng -> util-linux.
commit 27dc0ff7fe876ba84ae8f4b8570f89aae200f417 Author: Michael Tremer michael.tremer@ipfire.org Date: Tue Mar 22 15:32:50 2011 +0100
initscripts: util-linux-ng -> util-linux.
commit 5fa9f2d9430aca108f8de3b1a29dd60502b526f6 Author: Michael Tremer michael.tremer@ipfire.org Date: Tue Mar 22 15:32:48 2011 +0100
dracut: util-linux-ng -> util-linux.
commit c3b815b0dbb6d2452e5ad2566ced6767a9774981 Author: Michael Tremer michael.tremer@ipfire.org Date: Tue Mar 22 15:32:47 2011 +0100
basesystem: util-linux-ng -> util-linux.
commit bdbbdbffcfe33a8c9f8baa77b4e2d8c2158d8526 Author: Michael Tremer michael.tremer@ipfire.org Date: Tue Mar 22 15:17:58 2011 +0100
util-linux: Renamed util-linux-ng and updated it to 2.19.
commit d2ab169e2f8bbee2d5771a03ecf7bf72a144af9f Author: Michael Tremer michael.tremer@ipfire.org Date: Tue Mar 22 14:46:51 2011 +0100
util-linux-ng: Add /etc/mtab.
References #149.
commit e337df8a6068f8710ea233abbe0c98595c12f1e4 Author: Michael Tremer michael.tremer@ipfire.org Date: Tue Mar 22 14:46:21 2011 +0100
build-essentials: Add whitelisting for symlinks.
-----------------------------------------------------------------------
Summary of changes: pkgs/basesystem/basesystem.nm | 2 +- pkgs/build-essentials/build-essentials.nm | 2 +- pkgs/build-essentials/buildsystem/Constants | 1 + .../quality-agent/quality-agent.d/002-bad-symlinks | 6 ++++ pkgs/dracut/dracut.nm | 2 +- pkgs/initscripts/initscripts.nm | 2 +- pkgs/nfs-utils/nfs-utils.nm | 2 +- pkgs/udisks/udisks.nm | 2 +- pkgs/upower/upower.nm | 2 +- pkgs/{util-linux-ng => util-linux}/nologin.8 | 0 pkgs/{util-linux-ng => util-linux}/nologin.c | 0 pkgs/{util-linux-ng => util-linux}/pam.d/login | 0 .../util-linux-ng.nm => util-linux/util-linux.nm} | 25 +++++++++++++------ 13 files changed, 31 insertions(+), 15 deletions(-) rename pkgs/{util-linux-ng => util-linux}/nologin.8 (100%) rename pkgs/{util-linux-ng => util-linux}/nologin.c (100%) rename pkgs/{util-linux-ng => util-linux}/pam.d/login (100%) rename pkgs/{util-linux-ng/util-linux-ng.nm => util-linux/util-linux.nm} (91%)
Difference in files: diff --git a/pkgs/basesystem/basesystem.nm b/pkgs/basesystem/basesystem.nm index 9377ee5..552aa57 100644 --- a/pkgs/basesystem/basesystem.nm +++ b/pkgs/basesystem/basesystem.nm @@ -42,7 +42,7 @@ PKG_BUILD_DEPS = # There are no build dependencies PKG_DEPS += /bin/sh /sbin/init \ coreutils file findutils gawk grep iana-etc initscripts kbd less \ module-init-tools network pakfire passwd procps psmisc sed setup \ - shadow system-release tar udev util-linux-ng vim + shadow system-release tar udev util-linux vim
define PKG_DESCRIPTION This package contains files that are needed to run basic \ diff --git a/pkgs/build-essentials/build-essentials.nm b/pkgs/build-essentials/build-essentials.nm index 6df0215..6509f73 100644 --- a/pkgs/build-essentials/build-essentials.nm +++ b/pkgs/build-essentials/build-essentials.nm @@ -26,7 +26,7 @@ include $(PKGROOT)/Include
PKG_NAME = build-essentials PKG_VER = $(DISTRO_VERSION) -PKG_REL = 12 +PKG_REL = 13 PKG_EPOCH = 1 PKG_ARCH = noarch
diff --git a/pkgs/build-essentials/buildsystem/Constants b/pkgs/build-essentials/buildsystem/Constants index dda1195..0bc56c1 100644 --- a/pkgs/build-essentials/buildsystem/Constants +++ b/pkgs/build-essentials/buildsystem/Constants @@ -157,3 +157,4 @@ export QUALITY_AGENT_WHITELIST_EXECSTACK export QUALITY_AGENT_WHITELIST_NX export QUALITY_AGENT_WHITELIST_RPATH export QUALITY_AGENT_WHITELIST_SONAME +export QUALITY_AGENT_WHITELIST_SYMLINK diff --git a/pkgs/build-essentials/quality-agent/quality-agent.d/002-bad-symlinks b/pkgs/build-essentials/quality-agent/quality-agent.d/002-bad-symlinks index 595a7c5..27e8558 100755 --- a/pkgs/build-essentials/quality-agent/quality-agent.d/002-bad-symlinks +++ b/pkgs/build-essentials/quality-agent/quality-agent.d/002-bad-symlinks @@ -9,12 +9,18 @@ log_debug "Search for absolute symlinks"
function check() { local failed=0 + local item
for link in $(find ${BUILDROOT} -type l); do if fgrep -q "/lib/udev/devices" <<<${link}; then continue fi
+ if listmatch "${link:${#BUILDROOT}}" ${QUALITY_AGENT_WHITELIST_SYMLINK}; then + log INFO "Symlink ${link} is on the whitelist." + continue + fi + destination=$(readlink ${link}) if [ "${destination:0:1}" = "/" ]; then log ERROR " Absolute symlink: ${link}" diff --git a/pkgs/dracut/dracut.nm b/pkgs/dracut/dracut.nm index 88695b6..ed5dc08 100644 --- a/pkgs/dracut/dracut.nm +++ b/pkgs/dracut/dracut.nm @@ -37,7 +37,7 @@ PKG_SUMMARY = Initramfs generator using udev.
PKG_DEPS += bash bzip2 cpio coreutils dmraid e2fsprogs eject gzip \ iproute2 iputils kbd less libselinux lvm2 mdadm multipath-tools \ - sysvinit udev util-linux-ng which + sysvinit udev util-linux which
define PKG_DESCRIPTION dracut is a new, event-driven initramfs infrastructure based around udev. diff --git a/pkgs/initscripts/initscripts.nm b/pkgs/initscripts/initscripts.nm index 08fbbb2..6dea941 100644 --- a/pkgs/initscripts/initscripts.nm +++ b/pkgs/initscripts/initscripts.nm @@ -35,7 +35,7 @@ PKG_LICENSE = GPLv3+ PKG_SUMMARY = The set of scripts that initalize the system.
PKG_DEPS += bash coreutils e2fsprogs grep iproute2 module-init-tools \ - procps sed system-release udev util-linux-ng + procps sed system-release udev util-linux
define PKG_DESCRIPTION The initscripts package contains the basic system scripts used to boot \ diff --git a/pkgs/nfs-utils/nfs-utils.nm b/pkgs/nfs-utils/nfs-utils.nm index d67254b..a9dca11 100644 --- a/pkgs/nfs-utils/nfs-utils.nm +++ b/pkgs/nfs-utils/nfs-utils.nm @@ -34,7 +34,7 @@ PKG_URL = http://nfs.sourceforge.net/ PKG_LICENSE = MIT and GPLv2 and GPLv2+ PKG_SUMMARY = NFS utilities and supporting clients and daemons for the NFS server.
-PKG_DEPS += libevent libnfsidmap libgssglue libcap util-linux-ng +PKG_DEPS += libevent libnfsidmap libgssglue libcap util-linux
define PKG_DESCRIPTION The nfs-utils package provides a daemon for the kernel NFS server \ diff --git a/pkgs/udisks/udisks.nm b/pkgs/udisks/udisks.nm index 3e9f3e9..5e9c3fd 100644 --- a/pkgs/udisks/udisks.nm +++ b/pkgs/udisks/udisks.nm @@ -37,7 +37,7 @@ PKG_SUMMARY = Storage Management Service. PKG_BUILD_DEPS+= dbus-devel dbus-glib-devel e2fsprogs-devel glib2-devel \ intltool libatasmart-devel libdevmapper-devel libudev-devel \ parted-devel polkit-devel pkg-config sg3-utils-devel -PKG_DEPS += dosfstools e2fsprogs mdadm parted udev util-linux-ng xfsprogs +PKG_DEPS += dosfstools e2fsprogs mdadm parted udev util-linux xfsprogs
define PKG_DESCRIPTION udisks provides a daemon, D-Bus API and command line tools \ diff --git a/pkgs/upower/upower.nm b/pkgs/upower/upower.nm index f3d5abe..b4fc020 100644 --- a/pkgs/upower/upower.nm +++ b/pkgs/upower/upower.nm @@ -36,7 +36,7 @@ PKG_SUMMARY = Power Management Service.
PKG_BUILD_DEPS+= bison dbus-devel dbus-glib-devel glib2-devel gettext intltool \ perl-XML-Parser pkg-config polkit-devel -PKG_DEPS += udev util-linux-ng +PKG_DEPS += udev util-linux
define PKG_DESCRIPTION udisks provides a daemon, D-Bus API and command line tools \ diff --git a/pkgs/util-linux-ng/nologin.8 b/pkgs/util-linux-ng/nologin.8 deleted file mode 100644 index 5cb1601..0000000 --- a/pkgs/util-linux-ng/nologin.8 +++ /dev/null @@ -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 . diff --git a/pkgs/util-linux-ng/nologin.c b/pkgs/util-linux-ng/nologin.c deleted file mode 100644 index 8a51ba9..0000000 --- a/pkgs/util-linux-ng/nologin.c +++ /dev/null @@ -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); -} diff --git a/pkgs/util-linux-ng/pam.d/login b/pkgs/util-linux-ng/pam.d/login deleted file mode 100644 index ba632dd..0000000 --- a/pkgs/util-linux-ng/pam.d/login +++ /dev/null @@ -1,9 +0,0 @@ -#%PAM-1.0 -auth include system-auth - -account required pam_nologin.so -account include system-auth - -password include system-auth - -session include system-auth diff --git a/pkgs/util-linux-ng/util-linux-ng.nm b/pkgs/util-linux-ng/util-linux-ng.nm deleted file mode 100644 index 129d32e..0000000 --- a/pkgs/util-linux-ng/util-linux-ng.nm +++ /dev/null @@ -1,165 +0,0 @@ -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# 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, see http://www.gnu.org/licenses/. # -# # -############################################################################### - -############################################################################### -# Definitions -############################################################################### - -include $(PKGROOT)/Include - -PKG_NAME = util-linux-ng -PKG_VER = 2.18 -PKG_REL = 2 - -PKG_MAINTAINER = -PKG_GROUPS = System/Base -PKG_GROUPS-$(PKG_NAME) = Base $(PKG_GROUPS) -PKG_URL = ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng -PKG_LICENSE = GPLv2 and GPLv2+ and BSD with advertising and Public Domain -PKG_SUMMARY = A collection of basic system utilities. - -PKG_BUILD_DEPS+= audit-devel gettext libcap-devel libselinux-devel \ - libsepol-devel ncurses-devel pam-devel zlib-devel - -define PKG_DESCRIPTION - The util-linux-ng package contains a large variety of low-level system \ - utilities that are necessary for a Linux system to function. Among \ - others, Util-linux contains the fdisk configuration tool and the login \ - program. -endef - -PKG_TARBALL = $(THISAPP).tar.gz - -PKG_PACKAGES += libblkid libblkid-devel libuuid libuuid-devel \ - libmount libmount-devel - -# Package information for libblkid -PKG_SUMMARY-libblkid = Block device ID library. -PKG_DESCRIPTION-libblkid = This is the block device identification library, \ - part of util-linux-ng. - -define PKG_FILES-libblkid - /lib/libblkid.* -endef - -# Package information for libblkid-devel -PKG_SUMMARY-libblkid-devel = Development library and header of libblkid. -PKG_DESCRIPTION-libblkid-devel = $(PKG_SUMMARY-libblkid-devel) - -define PKG_FILES-libblkid-devel - /usr/include/blkid/ \ - /usr/lib/libblkid.* \ - /usr/lib/pkgconfig/blkid.pc \ - /usr/share/man/man3/*blkid* -endef - -# Package information for libuuid -PKG_SUMMARY-libuuid = Universally unique ID library. -PKG_DESCRIPTION-libuuid = This is the universally unique ID library, \ - part of util-linux-ng. - -define PKG_FILES-libuuid - /lib/libuuid.* -endef - -# Package information for libuuid-devel -PKG_SUMMARY-libuuid-devel = Development library and header of libuuid. -PKG_DESCRIPTION-libuuid-devel = $(PKG_SUMMARY-libuuid-devel) - -define PKG_FILES-libuuid-devel - /usr/include/uuid/ \ - /usr/lib/libuuid.* \ - /usr/lib/pkgconfig/uuid.pc \ - /usr/share/man/man3/*uuid* -endef - -# Package information for libmount -PKG_SUMMARY-libmount = Device mounting library. -PKG_DESCRIPTION-libmount = This is the device mounting library, \ - part of util-linux-ng. - -define PKG_FILES-libmount - /lib/libmount.* -endef - -# Package information for libmount-devel -PKG_SUMMARY-libmount-devel = Development library and header of libmount. -PKG_DESCRIPTION-libmount-devel = $(PKG_SUMMARY-libmount-devel) - -define PKG_FILES-libmount-devel - /usr/include/mount/ \ - /usr/lib/libmount.* \ - /usr/lib/pkgconfig/mount.pc \ - /usr/share/man/man3/*mount* -endef - - -CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 - -CONFIGURE_OPTIONS += \ - --bindir=/bin \ - --sbindir=/sbin \ - --disable-wall \ - --enable-arch \ - --enable-kill \ - --enable-login-utils \ - --enable-partx \ - --enable-write \ - --with-selinux \ - --with-audit \ - --disable-makeinstall-chown \ - --disable-static - - -define STAGE_PREPARE_CMDS - cd $(DIR_APP) && sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \ - -i $$(grep -rl '/etc/adjtime' .) -endef - -define STAGE_BUILD_CMDS - # Build nologin - cd $(DIR_APP) && gcc $(CFLAGS) -o nologin $(DIR_SOURCE)/nologin.c -endef - -define STAGE_INSTALL_CMDS - -mkdir -pv $(BUILDROOT)/sbin \ - $(BUILDROOT)/var/lib/hwclock \ - $(BUILDROOT)/usr/share/man/man8 \ - $(BUILDROOT)/var/log - - install -m 755 $(DIR_APP)/nologin $(BUILDROOT)/sbin - install -m 644 $(DIR_SOURCE)/nologin.8 $(BUILDROOT)/usr/share/man/man8/ - - touch $(BUILDROOT)/var/log/lastlog - - # Remove deprecated commands - rm -fv $(BUILDROOT)/{sbin,usr/share/man/man*}/{fsck,mkfs}.{bfs,minix}* \ - $(BUILDROOT)/usr/bin/chkdupexe $(BUILDROOT)/usr/bin/vi{gr,pw} \ - $(BUILDROOT)/sbin/{sln,shutdown} $(BUILDROOT)/bin/{line,newgrp,pg} - rm -fv $(BUILDROOT)/usr/share/getopt/*.tcsh -endef - -define STAGE_INSTALL_POST - # Set capabilities - chmod -v -s $(BUILDROOT)/bin/mount - setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep $(BUILDROOT)/bin/mount - chmod -v -s $(BUILDROOT)/bin/umount - setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep $(BUILDROOT)/bin/umount -endef diff --git a/pkgs/util-linux/nologin.8 b/pkgs/util-linux/nologin.8 new file mode 100644 index 0000000..5cb1601 --- /dev/null +++ b/pkgs/util-linux/nologin.8 @@ -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 . diff --git a/pkgs/util-linux/nologin.c b/pkgs/util-linux/nologin.c new file mode 100644 index 0000000..8a51ba9 --- /dev/null +++ b/pkgs/util-linux/nologin.c @@ -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); +} diff --git a/pkgs/util-linux/pam.d/login b/pkgs/util-linux/pam.d/login new file mode 100644 index 0000000..ba632dd --- /dev/null +++ b/pkgs/util-linux/pam.d/login @@ -0,0 +1,9 @@ +#%PAM-1.0 +auth include system-auth + +account required pam_nologin.so +account include system-auth + +password include system-auth + +session include system-auth diff --git a/pkgs/util-linux/util-linux.nm b/pkgs/util-linux/util-linux.nm new file mode 100644 index 0000000..670624f --- /dev/null +++ b/pkgs/util-linux/util-linux.nm @@ -0,0 +1,174 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# 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, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = util-linux +PKG_VER = 2.19 +PKG_REL = 1 + +PKG_MAINTAINER = +PKG_GROUPS = System/Base +PKG_GROUPS-$(PKG_NAME) = Base $(PKG_GROUPS) +PKG_URL = http://kernel.org/~kzak/util-linux/ +PKG_LICENSE = GPLv2 and GPLv2+ and BSD with advertising and Public Domain +PKG_SUMMARY = A collection of basic system utilities. + +PKG_BUILD_DEPS+= audit-devel gettext libcap-devel libselinux-devel \ + libsepol-devel ncurses-devel pam-devel zlib-devel + +define PKG_DESCRIPTION + The util-linux package contains a large variety of low-level system \ + utilities that are necessary for a Linux system to function. Among \ + others, Util-linux contains the fdisk configuration tool and the login \ + program. +endef + +PKG_TARBALL = $(THISAPP).tar.gz + +PKG_PACKAGES += libblkid libblkid-devel libuuid libuuid-devel \ + libmount libmount-devel + +# This symlink is allowed to be absolute. +QUALITY_AGENT_WHITELIST_SYMLINK = /etc/mtab +PKG_REQUIRES_FILTER = /proc/.*/mounts + +# Package information for libblkid +PKG_SUMMARY-libblkid = Block device ID library. +PKG_DESCRIPTION-libblkid = This is the block device identification library, \ + part of util-linux. + +define PKG_FILES-libblkid + /lib/libblkid.* +endef + +# Package information for libblkid-devel +PKG_SUMMARY-libblkid-devel = Development library and header of libblkid. +PKG_DESCRIPTION-libblkid-devel = $(PKG_SUMMARY-libblkid-devel) + +define PKG_FILES-libblkid-devel + /usr/include/blkid/ \ + /usr/lib/libblkid.* \ + /usr/lib/pkgconfig/blkid.pc \ + /usr/share/man/man3/*blkid* +endef + +# Package information for libuuid +PKG_SUMMARY-libuuid = Universally unique ID library. +PKG_DESCRIPTION-libuuid = This is the universally unique ID library, \ + part of util-linux. + +define PKG_FILES-libuuid + /lib/libuuid.* +endef + +# Package information for libuuid-devel +PKG_SUMMARY-libuuid-devel = Development library and header of libuuid. +PKG_DESCRIPTION-libuuid-devel = $(PKG_SUMMARY-libuuid-devel) + +define PKG_FILES-libuuid-devel + /usr/include/uuid/ \ + /usr/lib/libuuid.* \ + /usr/lib/pkgconfig/uuid.pc \ + /usr/share/man/man3/*uuid* +endef + +# Package information for libmount +PKG_SUMMARY-libmount = Device mounting library. +PKG_DESCRIPTION-libmount = This is the device mounting library, \ + part of util-linux. + +define PKG_FILES-libmount + /lib/libmount.* +endef + +# Package information for libmount-devel +PKG_SUMMARY-libmount-devel = Development library and header of libmount. +PKG_DESCRIPTION-libmount-devel = $(PKG_SUMMARY-libmount-devel) + +define PKG_FILES-libmount-devel + /usr/include/mount/ \ + /usr/lib/libmount.* \ + /usr/lib/pkgconfig/mount.pc \ + /usr/share/man/man3/*mount* +endef + + +CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 + +CONFIGURE_OPTIONS += \ + --bindir=/bin \ + --sbindir=/sbin \ + --disable-wall \ + --enable-arch \ + --enable-kill \ + --enable-login-utils \ + --enable-partx \ + --enable-write \ + --enable-libmount-mount \ + --with-selinux \ + --with-audit \ + --disable-makeinstall-chown \ + --disable-static + + +define STAGE_PREPARE_CMDS + cd $(DIR_APP) && sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \ + -i $$(grep -rl '/etc/adjtime' .) +endef + +define STAGE_BUILD_CMDS + # Build nologin + cd $(DIR_APP) && gcc $(CFLAGS) -o nologin $(DIR_SOURCE)/nologin.c +endef + +define STAGE_INSTALL_CMDS + -mkdir -pv $(BUILDROOT)/sbin \ + $(BUILDROOT)/var/lib/hwclock \ + $(BUILDROOT)/usr/share/man/man8 \ + $(BUILDROOT)/var/log + + install -m 755 $(DIR_APP)/nologin $(BUILDROOT)/sbin + install -m 644 $(DIR_SOURCE)/nologin.8 $(BUILDROOT)/usr/share/man/man8/ + + touch $(BUILDROOT)/var/log/lastlog + + # Remove deprecated commands + rm -fv $(BUILDROOT)/{sbin,usr/share/man/man*}/{fsck,mkfs}.{bfs,minix}* \ + $(BUILDROOT)/usr/bin/chkdupexe $(BUILDROOT)/usr/bin/vi{gr,pw} \ + $(BUILDROOT)/sbin/{sln,shutdown} $(BUILDROOT)/bin/{line,newgrp,pg} + rm -fv $(BUILDROOT)/usr/share/getopt/*.tcsh + + # Create /etc/mtab symlink + -mkdir -pv $(BUILDROOT)/etc + ln -svf /proc/mounts $(BUILDROOT)/etc/mtab +endef + +define STAGE_INSTALL_POST + # Set capabilities + chmod -v -s $(BUILDROOT)/bin/mount + setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep $(BUILDROOT)/bin/mount + chmod -v -s $(BUILDROOT)/bin/umount + setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep $(BUILDROOT)/bin/umount +endef
hooks/post-receive -- IPFire 3.x development tree