diff options
author | Kris Kennaway <kris@FreeBSD.org> | 2002-10-25 07:50:09 +0000 |
---|---|---|
committer | Kris Kennaway <kris@FreeBSD.org> | 2002-10-25 07:50:09 +0000 |
commit | 1bdbbbec311da6064d8e6de29d9e9d1a5a101fdb (patch) | |
tree | f057a3cea0bde996907c46bd01fe6b503c5631d1 /sysutils | |
parent | Upgrade to 0.0.8. (diff) |
Fix build on -current
Submitted by: Hiten Pandya <hiten@angelica.unixdaemons.com>
Notes
Notes:
svn path=/head/; revision=68779
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/blimitd/files/patch-aa | 11 | ||||
-rw-r--r-- | sysutils/blimitd/files/patch-ab | 39 |
2 files changed, 50 insertions, 0 deletions
diff --git a/sysutils/blimitd/files/patch-aa b/sysutils/blimitd/files/patch-aa new file mode 100644 index 000000000000..e90f21d382c6 --- /dev/null +++ b/sysutils/blimitd/files/patch-aa @@ -0,0 +1,11 @@ +--- 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 new file mode 100644 index 000000000000..3037fc2cd03a --- /dev/null +++ b/sysutils/blimitd/files/patch-ab @@ -0,0 +1,39 @@ +--- kill.c Sat Aug 4 15:11:31 2001 ++++ kill.c.new Wed Oct 23 16:46:53 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,28 @@ + /* success? well possibly..we don't actually check the process went */ + return_value = 1; + } ++#else /* if __FreeBSD_version >= 500023 */ ++ 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 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 */ |