summaryrefslogtreecommitdiff
path: root/sysutils/blimitd
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/blimitd')
-rw-r--r--sysutils/blimitd/Makefile34
-rw-r--r--sysutils/blimitd/distinfo2
-rw-r--r--sysutils/blimitd/files/blimitd.sh36
-rw-r--r--sysutils/blimitd/files/extra-patch-utmpx71
-rw-r--r--sysutils/blimitd/files/patch-aa11
-rw-r--r--sysutils/blimitd/files/patch-ab47
-rw-r--r--sysutils/blimitd/pkg-descr3
-rw-r--r--sysutils/blimitd/pkg-plist2
8 files changed, 0 insertions, 206 deletions
diff --git a/sysutils/blimitd/Makefile b/sysutils/blimitd/Makefile
deleted file mode 100644
index 6cffb445b103..000000000000
--- a/sysutils/blimitd/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-# Created by: Andrew Stevenson <andrew@ugh.net.au>
-# $FreeBSD$
-
-PORTNAME= blimitd
-PORTVERSION= 0.1
-PORTREVISION= 1
-CATEGORIES= sysutils
-MASTER_SITES= ftp://ftp.ugh.net.au/pub/unix/blimitd/
-
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Daemon to enforce login.conf limits
-
-DEPRECATED= No more public distfiles
-EXPIRATION_DATE= 2014-03-10
-
-WRKSRC= ${WRKDIR}/blimitd
-
-MAN8= blimitd.8
-MANCOMPRESSED= maybe
-
-NO_STAGE= yes
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 900007
-EXTRA_PATCHES+= ${FILESDIR}/extra-patch-utmpx
-.endif
-
-post-install:
- @if [ ! -f ${PREFIX}/etc/rc.d/blimitd.sh ]; then \
- ${ECHO} "Installing ${PREFIX}/etc/rc.d/blimitd.sh startup file."; \
- ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/blimitd.sh ${PREFIX}/etc/rc.d/blimitd.sh; \
- fi
-
-.include <bsd.port.post.mk>
diff --git a/sysutils/blimitd/distinfo b/sysutils/blimitd/distinfo
deleted file mode 100644
index 6f7a4caf4717..000000000000
--- a/sysutils/blimitd/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA256 (blimitd-0.1.tar.gz) = c9425de098a88bd5ec5b56ac5081eec2a1d48db61d2733182810c56a1d56dacb
-SIZE (blimitd-0.1.tar.gz) = 9813
diff --git a/sysutils/blimitd/files/blimitd.sh b/sysutils/blimitd/files/blimitd.sh
deleted file mode 100644
index b7228d96c8b1..000000000000
--- a/sysutils/blimitd/files/blimitd.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-
-# $FreeBSD$
-
-if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
- echo "$0: Cannot determine the PREFIX" >&2
- exit 1
-fi
-
-case $1 in
-start)
- [ -x ${PREFIX}/sbin/blimitd ] &&
- echo -n ' blimitd' &&
- ${PREFIX}/sbin/blimitd
- ;;
-stop)
- [ -f /var/run/blimitd.pid ] &&
- echo -n ' blimitd' &&
- kill `cat /var/run/blimitd.pid`
- ;;
-status)
- if [ -f /var/run/blimitd.pid ]; then
- ps -uxwwp `cat /var/run/blimitd.pid`
- else
- echo 'blimitd may not be running...possible processes below...'
- echo
- ps -auxww | egrep -e '^USER|blimitd' | egrep -v "($0|grep)"
- fi
- ;;
-*)
- echo "usage: `basename $0` {start|stop|status}" >&2
- exit 64
- ;;
-esac
-
-exit 0
diff --git a/sysutils/blimitd/files/extra-patch-utmpx b/sysutils/blimitd/files/extra-patch-utmpx
deleted file mode 100644
index a6bd694a4622..000000000000
--- a/sysutils/blimitd/files/extra-patch-utmpx
+++ /dev/null
@@ -1,71 +0,0 @@
---- blimitd.c
-+++ blimitd.c
-@@ -15,7 +15,7 @@
- #include <sysexits.h>
- #include <syslog.h>
- #include <unistd.h>
--#include <utmp.h>
-+#include <utmpx.h>
-
- #include "blimitd.h"
- #include "config.h"
-@@ -35,7 +35,7 @@
- pid_t pid;
- char *name;
- FILE *utmp_fh;
-- struct utmp utmp_record;
-+ struct utmpx *utmp_record;
- struct passwd *pw;
- struct user_instance ui;
-
-@@ -115,23 +115,19 @@
-
- /* actually do stuff */
- while (sig_no == 0) {
-- /* get the logged in users */
-- if ((utmp_fh = fopen(_PATH_UTMP, "r")) == NULL) {
-- syslog(LOG_ERR, "failed to open %s for reading: %m", _PATH_UTMP);
-- continue;
-- }
- /* prepare for pw access */
- if (! setpassent(1)) {
- syslog(LOG_ERR, "setpassent: %m");
- }
- /* for each entry */
-- while (fread(&utmp_record, sizeof(utmp_record), 1, utmp_fh)) {
-- if (utmp_record.ut_name[0] == '\0') {
-+ setutxent();
-+ while ((utmp_record = getutxent()) != NULL) {
-+ if (utmp_record->ut_type != USER_PROCESS) {
- /* this entry has been removed */
- continue;
- }
- /* get their name in a char *\0 */
-- if ((name = strndup(utmp_record.ut_name, UT_NAMESIZE)) == NULL) {
-+ if ((name = strndup(utmp_record->ut_user, sizeof utmp_record->ut_user)) == NULL) {
- syslog(LOG_ERR, "strndup failed: %m");
- continue;
- }
-@@ -150,7 +146,7 @@
-
- /* initialise ui for passing to enforcement functions */
- ui.pw = pw;
-- if ((ui.tty = find_tty(utmp_record.ut_line, UT_LINESIZE)) == NULL) {
-+ if ((ui.tty = find_tty(utmp_record->ut_line, sizeof utmp_record->ut_line)) == NULL) {
- syslog(LOG_ERR, "find_tty failed: %m");
- continue;
- }
-@@ -163,12 +159,7 @@
- free(ui.tty);
- }
-
-- if (ferror(utmp_fh)) {
-- syslog(LOG_ERR, "error reading from %s: %m", _PATH_UTMP);
-- }
-- if (fclose(utmp_fh) != 0) {
-- syslog(LOG_ERR, "error closing %s: %m", _PATH_UTMP);
-- }
-+ endutxent();
-
- /* finished with the password database till next time */
- endpwent();
diff --git a/sysutils/blimitd/files/patch-aa b/sysutils/blimitd/files/patch-aa
deleted file mode 100644
index e90f21d382c6..000000000000
--- a/sysutils/blimitd/files/patch-aa
+++ /dev/null
@@ -1,11 +0,0 @@
---- config.h Sat Aug 4 15:11:31 2001
-+++ config.h.new Wed Oct 23 16:46:47 2002
-@@ -13,7 +13,7 @@
- #define SYSLOG_IDENT "blimitd"
-
- /* location of pid file */
--#define PID_FILE _PATH_VARRUN ## "blimitd.pid"
-+#define PID_FILE _PATH_VARRUN "blimitd.pid"
-
- /* how often to check for infringements (in seconds). NB warnings can't be
- * sent more frequently than this figure either */
diff --git a/sysutils/blimitd/files/patch-ab b/sysutils/blimitd/files/patch-ab
deleted file mode 100644
index e9b721631c02..000000000000
--- a/sysutils/blimitd/files/patch-ab
+++ /dev/null
@@ -1,47 +0,0 @@
---- kill.c Sat Aug 4 15:11:31 2001
-+++ kill.c.new Fri Oct 25 04:53:40 2002
-@@ -143,6 +143,7 @@
- */
-
- /* copy the session structure to our address space */
-+#if __FreeBSD_version <= 500023
- if (kvm_read(kd, (unsigned long)processes[0].kp_eproc.e_tsess, &tty_session, sizeof(tty_session)) != sizeof(tty_session)) {
- syslog(LOG_ERR, "kvm_read failed (%s:%d): %s", __FILE__, __LINE__, kvm_geterr(kd));
- goto failure;
-@@ -162,7 +163,36 @@
- /* success? well possibly..we don't actually check the process went */
- return_value = 1;
- }
-+#else /* if __FreeBSD_version >= 500023 */
-+ if (kvm_read(kd, (unsigned long) processes[0].ki_paddr->p_session, &tty_session,
-+ sizeof(tty_session)) != sizeof(tty_session)) {
-+ syslog(LOG_ERR, "kvm_read failed (%s:%d): %s",
-+ __FILE__, __LINE__, kvm_geterr(kd));
-+ goto failure;
-+ }
-+
-+ /* copy the session leader's structp proc to our address space */
-+ if (processes[0].ki_kiflag & KI_SLEADER) {
-+ if (kvm_read(kd, (unsigned long)tty_session.s_leader,
-+ &session_leader, sizeof(session_leader)) !=
-+ sizeof(session_leader)) {
-+ syslog(LOG_ERR, "kvm_read failed (%s:%d): %s",
-+ __FILE__, __LINE__, kvm_geterr(kd));
-+ goto failure;
-+ }
-
-+ /* send a hangup signal to the shell */
-+ if (kill(session_leader.p_pid, SIGHUP) != 0) {
-+ syslog(LOG_ERR, "kill failed (%s:%d): %m", __FILE__,
-+ __LINE__);
-+ goto failure;
-+ } else {
-+ /* success? well possibly.. we don't know actually
-+ * check where the process went */
-+ return_value = 1;
-+ }
-+ }
-+#endif
- /* we skip to here if things fail so we always close the kvm interface.
- * we could have used massive if staements or do/while(0) and break but
- * we didn't */
diff --git a/sysutils/blimitd/pkg-descr b/sysutils/blimitd/pkg-descr
deleted file mode 100644
index 898c6f068323..000000000000
--- a/sysutils/blimitd/pkg-descr
+++ /dev/null
@@ -1,3 +0,0 @@
-This program is designed to enforce some of the user limits that can be
-configured in login.conf. It currently only supports the idletime
-capability.
diff --git a/sysutils/blimitd/pkg-plist b/sysutils/blimitd/pkg-plist
deleted file mode 100644
index dfb284819b8b..000000000000
--- a/sysutils/blimitd/pkg-plist
+++ /dev/null
@@ -1,2 +0,0 @@
-etc/rc.d/blimitd.sh
-sbin/blimitd