1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 09-lshw-privacy.dpatch by Darik Horn <dajhorn@vanadac.com>
4
## All lines beginning with `## DP:' are a description of the patch.
5
## DP: Prevents lshw from phoning home.
8
diff -dru lshw-02.12.01/src/core/version.cc lshw-02.12.01-privacy/src/core/version.cc
9
--- lshw-02.12.01/src/core/version.cc 2007-10-13 17:23:16.000000000 -0500
10
+++ lshw-02.12.01-privacy/src/core/version.cc 2008-02-19 11:57:29.000000000 -0600
15
-#include <netinet/in.h>
16
-#include <arpa/nameser.h>
18
#include <sys/types.h>
25
-static char *txtquery(const char *name, const char *domain, unsigned int *ttl)
27
- unsigned char answer[PACKETSZ], *pt;
28
- char host[128], *txt;
29
- int len, exp, cttl, size, txtlen, type;
34
- memset(answer, 0, PACKETSZ);
35
- if((len = res_querydomain(name, domain, C_IN, T_TXT, answer, PACKETSZ)) < 0)
38
- pt = answer + sizeof(HEADER);
40
- if((exp = dn_expand(answer, answer + len, pt, host, sizeof(host))) < 0)
49
- pt += INT16SZ; /* class */
51
- if((exp = dn_expand(answer, answer + len, pt, host, sizeof(host))) < 0)
59
- pt += INT16SZ; /* class */
66
- if(txtlen >= size || !txtlen)
69
- if(!(txt = (char*)malloc(txtlen + 1)))
73
- strncpy(txt, (char*)pt, txtlen);
79
const char * checkupdates()
81
- static char *latest = NULL;
84
- latest = txtquery(PACKAGE, "ezix.org", NULL);
87
+ // This disables the home phone function for user privacy.
90
diff -dru lshw-02.12.01/src/Makefile lshw-02.12.01-privacy/src/Makefile
91
--- lshw-02.12.01/src/Makefile 2007-10-13 17:23:16.000000000 -0500
92
+++ lshw-02.12.01-privacy/src/Makefile 2008-02-19 11:55:30.000000000 -0600
94
LDFLAGS+= -Wl,--as-needed
100
DATAFILES = pci.ids usb.ids oui.txt manuf.txt