aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2009-02-11 07:15:03 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2009-02-11 07:15:03 +0800
commitd948965ff286454aa7dcec985f523d66f77fd21c (patch)
tree3085520cfc24ada0ece2a19b98b736c98220a59b /sysutils
parent6fa335f4c9e2abbb6b2bf0d2082bcf6d88bf0849 (diff)
downloadfreebsd-ports-gnome-d948965ff286454aa7dcec985f523d66f77fd21c.tar.gz
freebsd-ports-gnome-d948965ff286454aa7dcec985f523d66f77fd21c.tar.zst
freebsd-ports-gnome-d948965ff286454aa7dcec985f523d66f77fd21c.zip
scprotect is implementation of system call for setting or unsetting
P_PROTECTED flag. It's similar to madvise(2) behaviour MADV_PROTECT, but may be used for already running processes. Also rc.d/scprotect scripts allow you to set protection flag even if process was restarted by user. WWW: http://dindin.ru/scprotect/ PR: 131423 Submitted by: Denis Barov <dindin at dindin dot ru>
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/scprotect/Makefile36
-rw-r--r--sysutils/scprotect/distinfo3
-rw-r--r--sysutils/scprotect/pkg-descr7
-rw-r--r--sysutils/scprotect/pkg-message13
-rw-r--r--sysutils/scprotect/pkg-plist5
6 files changed, 65 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index 9b1352512553..5c43ccb80ab8 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -665,6 +665,7 @@
SUBDIR += sbniconfig
SUBDIR += scan_ffs
SUBDIR += scanbuttond
+ SUBDIR += scprotect
SUBDIR += screen
SUBDIR += screenie
SUBDIR += sdd
diff --git a/sysutils/scprotect/Makefile b/sysutils/scprotect/Makefile
new file mode 100644
index 000000000000..c62de9878791
--- /dev/null
+++ b/sysutils/scprotect/Makefile
@@ -0,0 +1,36 @@
+# New ports collection Makefile for: scprotect
+# Date created: 5 Feb 2009
+# Whom: Denis Barov <dindin@dindin.ru>
+#
+# $FreeBSD$
+#
+
+PORTNAME= scprotect
+PORTVERSION= 20090209
+CATEGORIES= sysutils kld
+MASTER_SITES= http://dindin.ru/download/
+
+MAINTAINER= dindin@dindin.ru
+COMMENT= Protect process from killing when the swap space is exhausted
+
+NO_PACKAGE= Needs to be compiled for specific kernel
+
+KMODDIR?= /boot/modules
+SRC_BASE?= /usr/src
+
+PLIST_SUB= KMODDIR=${KMODDIR}
+WRKSRC= ${WRKDIR}/${PORTNAME}
+
+MAKE_ENV+= KMODDIR=${KMODDIR}
+
+MAN8= scprotect.8
+MANCOMPRESSED= maybe
+
+.if !exists(${SRC_BASE}/sys/Makefile)
+IGNORE= requires kernel sources
+.endif
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/sysutils/scprotect/distinfo b/sysutils/scprotect/distinfo
new file mode 100644
index 000000000000..ef8d5a16a6ee
--- /dev/null
+++ b/sysutils/scprotect/distinfo
@@ -0,0 +1,3 @@
+MD5 (scprotect-20090209.tar.gz) = 5a9cbc43c26e436754aa7dc06640d453
+SHA256 (scprotect-20090209.tar.gz) = e3d5a5581d69842aaeda549359ce24ea72f994b75de9e39e822a6cb96bf94e0d
+SIZE (scprotect-20090209.tar.gz) = 4653
diff --git a/sysutils/scprotect/pkg-descr b/sysutils/scprotect/pkg-descr
new file mode 100644
index 000000000000..0e08d6bcd895
--- /dev/null
+++ b/sysutils/scprotect/pkg-descr
@@ -0,0 +1,7 @@
+scprotect is implementation of system call for setting or unsetting
+P_PROTECTED flag. It's similar to madvise(2) behaviour MADV_PROTECT,
+but may be used for already running processes. Also rc.d/scprotect
+scripts allow you to set protection flag even if process was
+restarted by user.
+
+WWW: http://dindin.ru/scprotect/
diff --git a/sysutils/scprotect/pkg-message b/sysutils/scprotect/pkg-message
new file mode 100644
index 000000000000..b0a4fdff09f5
--- /dev/null
+++ b/sysutils/scprotect/pkg-message
@@ -0,0 +1,13 @@
+
+*******************************************************************************
+* This port contains a prebuilt kernel module. Due to the ever changing *
+* nature of FreeBSD it may be necessary to rebuild the module after a kernel *
+* source update. To do this reinstall the port. *
+*******************************************************************************
+
+Also you may set for example
+
+scprotect_enable="YES"
+scprotect_progs="sshd named"
+
+to protect those application even if they are restarted
diff --git a/sysutils/scprotect/pkg-plist b/sysutils/scprotect/pkg-plist
new file mode 100644
index 000000000000..d158b0c1ff96
--- /dev/null
+++ b/sysutils/scprotect/pkg-plist
@@ -0,0 +1,5 @@
+bin/scprotect
+etc/rc.d/scprotect
+@cwd /
+%%KMODDIR%%/scprotect.ko
+@unexec kldxref %%KMODDIR%%