Your message dated Tue, 27 Jan 2009 15:47:03 +0000
with message-id <[email protected]>
and subject line Bug#500485: fixed in hunt 1.5-5
has caused the Debian Bug report #500485,
regarding [patch] After the program is fisihed the terminal colors become grey
foreground, black background
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
500485: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=500485
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: hunt
Version: 1.5-4
Severity: minor
Tags: patch
After the program is fisihed the terminal colors become grey foreground, black
background because programmer supose that user will use a terminal with this
colors, but this is wrong since user can have a different color scheme.
I attach a patch which solve the problem and includes a better fix to #500170.
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-1-686 (SMP w/2 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages hunt depends on:
ii libc6 2.7-13 GNU C Library: Shared libraries
hunt recommends no packages.
hunt suggests no packages.
-- no debconf information
--- hunt-1.5.orig/main.c 2008-09-27 13:13:36.000000000 +0200
+++ hunt-1.5/main.c 2008-09-28 01:12:25.000000000 +0200
@@ -14,6 +14,11 @@
#include <string.h>
#include <pthread.h>
+#include <sys/ioctl.h>
+#include <net/if.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <string.h>
void logo(void)
{
@@ -436,7 +441,7 @@
void main_reset(void)
{
tap(eth_device, 0);
- set_tty_color(COLOR_LIGHTGRAY);
+ fprintf(stdout, "\033[0;0;0m");
printf("\ndone\n");
}
@@ -458,6 +463,9 @@
struct sigaction sac;
int run_it;
int c;
+ int skfd;
+ struct ifreq my_ifreq;
+ int r;
if (geteuid() || getuid()) {
fprintf(stderr, "UID or EUID of 0 needed\n");
@@ -480,6 +488,31 @@
exit(1);
}
}
+
+ //Checks if the network interface is up and have an IP address.
+ skfd = socket(AF_INET,SOCK_DGRAM,0);
+ if (skfd == -1){
+ fprintf(stderr, "IPv4 not supported\n");
+ exit(1);
+ }
+ memset(&my_ifreq, 0, sizeof(my_ifreq));
+ strncpy(my_ifreq.ifr_name, eth_device, IFNAMSIZ);
+ #ifdef SIOCGIFFLAGS
+ r = ioctl(skfd, SIOCGIFFLAGS, &my_ifreq);
+ if ((r != -1) && !((my_ifreq.ifr_flags & IFF_UP) == IFF_UP)){
+ fprintf(stderr, "Network interface %s is down\n", eth_device);
+ exit(1);
+ }
+ #endif
+ #ifdef SIOCGIFADDR
+ if (ioctl(skfd, SIOCGIFADDR, &my_ifreq)==-1){
+ fprintf(stderr, "Network interface %s does not have "\
+ "an ip address\n", eth_device);
+ exit(1);
+ }
+ #endif
+ close(skfd);
+
sigemptyset(&intr_mask);
sigaddset(&intr_mask, SIGINT);
--- End Message ---
--- Begin Message ---
Source: hunt
Source-Version: 1.5-5
We believe that the bug you reported is fixed in the latest version of
hunt, which is due to be installed in the Debian FTP archive:
hunt_1.5-5.diff.gz
to pool/main/h/hunt/hunt_1.5-5.diff.gz
hunt_1.5-5.dsc
to pool/main/h/hunt/hunt_1.5-5.dsc
hunt_1.5-5_i386.deb
to pool/main/h/hunt/hunt_1.5-5_i386.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Barry deFreese <[email protected]> (supplier of updated hunt package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Tue, 27 Jan 2009 09:44:34 -0500
Source: hunt
Binary: hunt
Architecture: source i386
Version: 1.5-5
Distribution: unstable
Urgency: low
Maintainer: Debian QA Group <[email protected]>
Changed-By: Barry deFreese <[email protected]>
Description:
hunt - Advanced packet sniffer and connection intrusion
Closes: 500170 500485
Changes:
hunt (1.5-5) unstable; urgency=low
.
* QA upload.
+ Set maintainer to Debian QA Group <[email protected]>.
* Version debhelper build-dep (>= 5.0.0).
* Add debian/compat and set to 5.
* Add ${misc:Depends}.
* Make clean not ignore errors.
* Clean up debian/copyright.
* Replace dh_installmanpages with dh_installman.
* Move file copies from rules to debian/install.
* Abort gracefully if interface is down. (Closes: #500170).
* Don't affect terminal colors when finished. (Closes: #500485).
+ Thanks to José Manuel Santamaría Lema for both fixes.
* Bump Standards Version to 3.8.0.
Checksums-Sha1:
d463d16e0fceff1ca37123af14d358ff2843d147 911 hunt_1.5-5.dsc
d67f54b3363cf980acfc6602833d0faa14c5eb6e 4280 hunt_1.5-5.diff.gz
d56f9d640d59e63706b02fb3f65f52aa3bc0e066 81630 hunt_1.5-5_i386.deb
Checksums-Sha256:
de540ae6b590529e1f07aef745cd4e55237ba026fc186ef716674f38b01d0f95 911
hunt_1.5-5.dsc
cb0f29aea24ef69c06f18930c07548b9338ed646a2941b11a2a81c3ce200ab74 4280
hunt_1.5-5.diff.gz
997605f38a22b9da4eb97132cc19c5858ebc5498b8418abf3ef5950d2f320bc6 81630
hunt_1.5-5_i386.deb
Files:
63ba667b1f4a8afda6ed38de8a3a75bb 911 net optional hunt_1.5-5.dsc
5acac6f39b53f143ca8535e38eb367e9 4280 net optional hunt_1.5-5.diff.gz
931e5cd412191bd3c48990f7fd33e850 81630 net optional hunt_1.5-5_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkl/KskACgkQ5ItltUs5T35AjACgxZfrUBbMqmg5rHFlucGPqABb
H20An2xm+nuUCJVXohN86qNa3PvZM+Vd
=hY60
-----END PGP SIGNATURE-----
--- End Message ---