From 6393d0df648cf631dad46c6f004a05c50c7c0f4b Mon Sep 17 00:00:00 2001 From: Kris Kennaway Date: Fri, 25 Oct 2002 07:53:06 +0000 Subject: Oops, committed an earlier version of the previous patch. Submitted by: Hiten Pandya --- sysutils/blimitd/files/patch-ab | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'sysutils/blimitd') 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; + } + } -- cgit v1.2.3