aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/blimitd
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2002-10-25 15:53:06 +0800
committerkris <kris@FreeBSD.org>2002-10-25 15:53:06 +0800
commitea89f8d4c589a9ce84c156cede0e09282073b520 (patch)
tree60c251e3c05cfceee623c2b72fd5aeb967253c9a /sysutils/blimitd
parent781a2438cd2510b98b4178f5ceea1278b13507de (diff)
downloadfreebsd-ports-gnome-ea89f8d4c589a9ce84c156cede0e09282073b520.tar.gz
freebsd-ports-gnome-ea89f8d4c589a9ce84c156cede0e09282073b520.tar.zst
freebsd-ports-gnome-ea89f8d4c589a9ce84c156cede0e09282073b520.zip
Oops, committed an earlier version of the previous patch.
Submitted by: Hiten Pandya <hiten@angelica.unixdaemons.com>
Diffstat (limited to 'sysutils/blimitd')
-rw-r--r--sysutils/blimitd/files/patch-ab14
1 files changed, 11 insertions, 3 deletions
diff --git a/sysutils/blimitd/files/patch-ab b/sysutils/blimitd/files/patch-ab
index 3037fc2cd03a..e9b721631c02 100644
--- a/sysutils/blimitd/files/patch-ab
+++ b/sysutils/blimitd/files/patch-ab
@@ -1,5 +1,5 @@
--- kill.c Sat Aug 4 15:11:31 2001
-+++ kill.c.new Wed Oct 23 16:46:53 2002
++++ kill.c.new Fri Oct 25 04:53:40 2002
@@ -143,6 +143,7 @@
*/
@@ -8,11 +8,19 @@
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,28 @@
+@@ -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)) !=
@@ -29,7 +37,7 @@
+ goto failure;
+ } else {
+ /* success? well possibly.. we don't know actually
-+ * check the process went */
++ * check where the process went */
+ return_value = 1;
+ }
+ }