summaryrefslogtreecommitdiff
path: root/sysutils/blimitd
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2002-10-25 07:53:06 +0000
committerKris Kennaway <kris@FreeBSD.org>2002-10-25 07:53:06 +0000
commit6393d0df648cf631dad46c6f004a05c50c7c0f4b (patch)
tree29eeb3c1a307270ed89570278d540501bbf654f3 /sysutils/blimitd
parentUpgrade to next version (diff)
Oops, committed an earlier version of the previous patch.
Submitted by: Hiten Pandya <hiten@angelica.unixdaemons.com>
Notes
Notes: svn path=/head/; revision=68781
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;
+ }
+ }