rpms/macchanger/devel macchanger-1.5.0-OUI-list-update.diff, NONE, 1.1 macchanger-1.5.0-dynamic-lists.diff, NONE, 1.1 macchanger-1.5.0-man-update.diff, NONE, 1.1 macchanger-1.5.0-random-seed.diff, NONE, 1.1 macchanger.spec, 1.5, 1.6

thoger thoger at fedoraproject.org
Wed Sep 2 19:10:44 UTC 2009


Author: thoger

Update of /cvs/pkgs/rpms/macchanger/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv551

Modified Files:
	macchanger.spec 
Added Files:
	macchanger-1.5.0-OUI-list-update.diff 
	macchanger-1.5.0-dynamic-lists.diff 
	macchanger-1.5.0-man-update.diff 
	macchanger-1.5.0-random-seed.diff 
Log Message:
1.5.0-8

- Fix pseudo random number generator seeding (RHBZ#520268)
- Update OUI list from IEEE, now more than 12000 items listed
- Update man page to list -s / --show
- Fix handling of internal mac lists where static array was still assumed,
  while dynamically allocated array was used


macchanger-1.5.0-OUI-list-update.diff:
 OUI.list | 6315 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 5873 insertions(+), 442 deletions(-)

--- NEW FILE macchanger-1.5.0-OUI-list-update.diff ---
Update OUI list from IEEE list:
  http://standards.ieee.org/regauth/oui/

Date: 2009-09-02

--- macchanger-1.5.0/data/OUI.list	2004-05-10 10:45:15.000000000 +0200
+++ macchanger-1.5.0/data/OUI.list.20090902	2009-09-02 17:57:00.000000000 +0200
@@ -97,9 +97,9 @@
 00 00 60 Kontron Elektronik Gmbh
 00 00 61 Gateway Communications
 00 00 62 Bull Hn Information Systems
-00 00 63 Dr.ing.seufert Gmbh
+00 00 63 Barco Control Rooms Gmbh
 00 00 64 Yokogawa Digital Computer Corp
-00 00 65 Network Associates, Inc.
+00 00 65 Network General Corporation
 00 00 66 Talaris Systems, Inc.
 00 00 67 Soft * Rite, Inc.
 00 00 68 Rosemount Controls
@@ -134,14 +134,14 @@
 00 00 85 Canon Inc.
 00 00 86 Megahertz Corporation
 00 00 87 Hitachi, Ltd.
-00 00 88 Computer Network Tech. Corp.
+00 00 88 Brocade Communications Systems, Inc.
 00 00 89 Cayman Systems Inc.
 00 00 8A Datahouse Information Systems
 00 00 8B Infotron
 00 00 8C Alloy Computer Products (australia) Pty Ltd
-00 00 8D Verdix Corporation
+00 00 8D Cryptek Inc.
 00 00 8E Solbourne Computer, Inc.
-00 00 8F Raytheon Company
+00 00 8F Raytheon
 00 00 90 Microcom
 00 00 91 Anritsu Corporation
 00 00 92 Cogent Data Technologies
@@ -149,7 +149,7 @@
 00 00 94 Asante Technologies
 00 00 95 Sony Tektronix Corp.
 00 00 96 Marconi Electronics Ltd.
-00 00 97 Epoch Systems
+00 00 97 Emc Corporation
 00 00 98 Crosscomm Corporation
 00 00 99 Mtx, Inc.
 00 00 9A Rc Computer A/s
@@ -158,7 +158,7 @@
 00 00 9D Locus Computing Corporation
 00 00 9E Marli S.a.
 00 00 9F Ameristar Technologies Inc.
-00 00 A0 Tokyo Sanyo Electric Co. Ltd.
+00 00 A0 Sanyo Electric Co., Ltd.
 00 00 A1 Marquette Electric Co.
 00 00 A2 Bay Networks
 00 00 A3 Network Application Technology
@@ -186,7 +186,7 @@
 00 00 B9 Mcdonnell Douglas Computer Sys
 00 00 BA Siig, Inc.
 00 00 BB Tri-data
-00 00 BC Allen-bradley Co. Inc.
+00 00 BC Rockwell Automation
 00 00 BD Mitsubishi Cable Company
 00 00 BE The Nti Group
 00 00 BF Symmetric Computer Systems
@@ -200,10 +200,10 @@
 00 00 C7 Arix Corporation
 00 00 C8 Altos Computer Systems
 00 00 C9 Emulex Corporation
-00 00 CA Applitek
+00 00 CA Arris International
 00 00 CB Compu-shack Electronic Gmbh
 00 00 CC Densan Co., Ltd.
-00 00 CD Allied Telesyn Research Ltd.
+00 00 CD Allied Telesis Labs Ltd
 00 00 CE Megadata Corp.
 00 00 CF Hayes Microcomputer Products
 00 00 D0 Develcon Electronics Ltd.
@@ -259,7 +259,7 @@
 00 01 02 3com Corporation
 00 01 03 3com Corporation
 00 01 04 Dvico Co., Ltd.
-00 01 05 Beckhoff Gmbh
+00 01 05 Beckhoff Automation Gmbh
 00 01 06 Tews Datentechnik Gmbh
 00 01 07 Leiser Gmbh
 00 01 08 Avlab Technology, Inc.
@@ -269,7 +269,7 @@
 00 01 0C System Talks Inc.
 00 01 0D Coreco, Inc.
 00 01 0E Bri-link Technologies Co., Ltd
-00 01 0F Nishan Systems, Inc.
+00 01 0F Brocade Communications Systems, Inc.
 00 01 10 Gotham Networks
 00 01 11 Idigm Inc.
 00 01 12 Shark Multimedia Inc.
@@ -279,7 +279,7 @@
 00 01 16 Netspect Technologies, Inc.
 00 01 17 Canal +
 00 01 18 Ez Digital Co., Ltd.
-00 01 19 Action Controls Pty. Ltd.
+00 01 19 Rtunet (australia)
 00 01 1A Eeh Datalink Gmbh
 00 01 1B Unizone Technologies, Inc.
 00 01 1C Universal Talkware Corporation
@@ -293,7 +293,7 @@
 00 01 24 Acer Incorporated
 00 01 25 Yaesu Musen Co., Ltd.
 00 01 26 Pac Labs
-00 01 27 The Open Group Limited
+00 01 27 Open Networks Pty Ltd
 00 01 28 Enjoyweb, Inc.
 00 01 29 Dfi Inc.
 00 01 2A Telematica Sistems Inteligente
@@ -306,7 +306,7 @@
 00 01 31 Detection Systems, Inc.
 00 01 32 Dranetz - Bmi
 00 01 33 Kyowa Electronic Instruments C
-00 01 34 Sig Positec Systems Ag
+00 01 34 Selectron Systems Ag
 00 01 35 Kdc Corp.
 00 01 36 Cybertan Technology, Inc.
 00 01 37 It Farm Corporation
@@ -322,7 +322,7 @@
 00 01 41 Cable Print
 00 01 42 Cisco Systems, Inc.
 00 01 43 Cisco Systems, Inc.
-00 01 44 Cereva Networks, Inc.
+00 01 44 Emc Corporation
 00 01 45 Winsystems, Inc.
 00 01 46 Tesco Controls, Inc.
 00 01 47 Zhone Technologies
@@ -333,7 +333,7 @@
 00 01 4C Berkeley Process Control
 00 01 4D Shin Kin Enterprises Co., Ltd
 00 01 4E Win Enterprises, Inc.
-00 01 4F Luminous Networks, Inc.
+00 01 4F Adtran Inc
 00 01 50 Gilat Communications, Ltd.
 00 01 51 Ensemble Communications
 00 01 52 Chromatek Inc.
@@ -365,11 +365,11 @@
 00 01 6C Foxconn
 00 01 6D Carriercomm Inc.
 00 01 6E Conklin Corporation
-00 01 6F Haitai Electronics Co., Ltd.
+00 01 6F Inkel Corp.
 00 01 70 Ese Embedded System Engineer'g
 00 01 71 Allied Data Technologies
 00 01 72 Technoland Co., Ltd.
-00 01 73 Jni Corporation
+00 01 73 Amcc
 00 01 74 Cyberoptics Corporation
 00 01 75 Radiant Communications Corp.
 00 01 76 Orient Silver Enterprises
@@ -388,7 +388,7 @@
 00 01 83 Anite Telecoms
 00 01 84 Sieb & Meyer Ag
 00 01 85 Aloka Co., Ltd.
-00 01 86 Disch Gmbh
+00 01 86 Uwe Disch
 00 01 87 I2se Gmbh
 00 01 88 Lxco Technologies Ag
 00 01 89 Refraction Technology, Inc.
@@ -429,7 +429,7 @@
 00 01 AC Sitara Networks, Inc.
 00 01 AD Coach Master International  D.b.a. Cmi Worldwide, Inc.
 00 01 AE Trex Enterprises
-00 01 AF Motorola Computer Group
+00 01 AF Emerson Network Power
 00 01 B0 Fulltek Technology Co., Ltd.
 00 01 B1 General Bandwidth
 00 01 B2 Digital Processing Systems, Inc.
@@ -458,7 +458,7 @@
 00 01 C8 Conrad Corp.
 00 01 C9 Cisco Systems, Inc.
 00 01 CA Geocast Network Systems, Inc.
-00 01 CB Netgame, Ltd.
+00 01 CB Evr
 00 01 CC Japan Total Design Communication Co., Ltd.
 00 01 CD Artem
 00 01 CE Custom Micro Products, Ltd.
@@ -469,7 +469,7 @@
 00 01 D3 Paxcomm, Inc.
 00 01 D4 Leisure Time, Inc.
 00 01 D5 Haedong Info & Comm Co., Ltd
-00 01 D6 Man Roland Druckmaschinen Ag
+00 01 D6 Manroland Ag
 00 01 D7 F5 Networks, Inc.
 00 01 D8 Teltronics, Inc.
 00 01 D9 Sigma, Inc.
@@ -525,7 +525,7 @@
 00 02 0B Native Networks, Inc.
 00 02 0C Metro-optix
 00 02 0D Micronpc.com
-00 02 0E Laurel Networks, Inc.
+00 02 0E Eci Telecom, Ltd., Nsd-us
 00 02 0F Aatr
 00 02 10 Fenecom
 00 02 11 Nature Worldwide Technology Corp.
[...8367 lines suppressed...]
 00 E0 4A Enhanced Messaging Systems, Inc
@@ -7112,7 +12442,7 @@
 00 E0 6C Aep Systems International Ltd
 00 E0 6D Compuware Corporation
 00 E0 6E Far Systems S.p.a.
-00 E0 6F Terayon Communications Systems
+00 E0 6F Motorola, Inc.
 00 E0 70 Dh Technology
 00 E0 71 Epis Microcomputer
 00 E0 72 Lynk
@@ -7155,7 +12485,7 @@
 00 E0 97 Carrier Access Corporation
 00 E0 98 Abocom Systems, Inc.
 00 E0 99 Samson Ag
-00 E0 9A Positron Industries, Inc.
+00 E0 9A Positron Inc.
 00 E0 9B Engage Networks, Inc.
 00 E0 9C Mii
 00 E0 9D Sarnoff Corporation
@@ -7178,7 +12508,7 @@
 00 E0 AE Xaqti Corporation
 00 E0 AF General Dynamics Information Systems
 00 E0 B0 Cisco Systems, Inc.
-00 E0 B1 Packet Engines, Inc.
+00 E0 B1 Alcatel-lucent, Enterprise Business Group
 00 E0 B2 Telmax Communications Corp.
 00 E0 B3 Etherwan Systems, Inc.
 00 E0 B4 Techno Scope Co., Ltd.
@@ -7214,17 +12544,17 @@
 00 E0 D2 Versanet Communications, Inc.
 00 E0 D3 Datentechnik Gmbh
 00 E0 D4 Excellent Computer
-00 E0 D5 Arcxel Technologies, Inc.
+00 E0 D5 Emulex Corporation
 00 E0 D6 Computer & Communication Research Lab.
 00 E0 D7 Sunshine Electronics, Inc.
 00 E0 D8 Lanbit Computer, Inc.
 00 E0 D9 Tazmo Co., Ltd.
-00 E0 DA Assured Access Technology, Inc.
+00 E0 DA Alcatel North America Esd
 00 E0 DB Viavideo Communications, Inc.
 00 E0 DC Nexware Corp.
 00 E0 DD Zenith Electronics Corporation
 00 E0 DE Datax Nv
-00 E0 DF Ke Kommunikations-electronik
+00 E0 DF Keymile Gmbh
 00 E0 E0 Si Electronics, Ltd.
 00 E0 E1 G2 Networks, Inc.
 00 E0 E2 Innova Corp.
@@ -7272,6 +12602,10 @@
 02 CF 1C Communication Machinery Corp.
 02 E6 D3 Nixdorf Computer Corporation
 04 0A E0 Xmit Ag Computer Networks
+04 1E 64 Apple, Inc
+04 4F AA Ruckus Wireless
+04 B3 B6 Seamap (uk) Ltd
+04 B4 66 Bsp Co., Ltd.
 04 E0 C4 Triumph-adler Ag
 08 00 01 Computervision Corporation
 08 00 02 Bridge Communications Inc.
@@ -7298,7 +12632,7 @@
 08 00 18 Pirelli Focom Networks
 08 00 19 General Electric Corporation
 08 00 1A Tiara/ 10net
-08 00 1B Data General
+08 00 1B Emc Corporation
 08 00 1C Kdd-kokusai Debnsin Denwa Co.
 08 00 1D Able Communications Inc.
 08 00 1E Apollo Computer Inc.
@@ -7343,7 +12677,7 @@
 08 00 43 Pixel Computer Inc.
 08 00 44 David Systems Inc.
 08 00 45 Concurrent Computer Corp.
-08 00 46 Sony Corporation Ltd.
+08 00 46 Sony Corporation
 08 00 47 Sequent Computer Systems Inc.
 08 00 48 Eurotherm Gauging Systems
 08 00 49 Univation
@@ -7407,7 +12741,7 @@
 08 00 85 Elxsi
 08 00 86 Konica Minolta Holdings, Inc.
 08 00 87 Xyplex
-08 00 88 Mcdata Corporation
+08 00 88 Brocade Communications Systems, Inc.
 08 00 89 Kinetics
 08 00 8A Performance Technology
 08 00 8B Pyramid Technology Corp.
@@ -7418,15 +12752,112 @@
 08 00 90 Sonoma Systems
 08 14 43 Unibrain S.a.
 08 BB CC Ak-nord Edv Vertriebsges. Mbh
+0C 60 76 Hon Hai Precision Ind. Co.,ltd.
+0C D7 C2 Axium Technologies, Inc.
+0C E7 09 Fox Crypto B.v.
+0C E9 36 Elimos Srl
+0C EE E6 Hon Hai Precision Ind. Co.,ltd.
 10 00 00 Private
 10 00 5A Ibm Corporation
 10 00 E8 National Semiconductor
+10 BA A5 Gana I&c Co., Ltd
 11 00 AA Private
+14 6E 0A Private
+18 01 E3 Elektrobit Wireless Communications Ltd
+18 86 AC Nokia Danmark A/s
+18 A9 05 Hewlett Packard
+1C 4B D6 Azurewave
+20 2C B7 Kong Yue Electronics & Information Industry (xinhui) Ltd.
+24 82 8A Prowave Technologies Ltd.
+24 CF 21 Shenzhen State Micro Technology Co., Ltd
+28 FB D3 Shanghai Ragentek Communication Technology Co.,ltd.
+30 32 D4 Hanilstm Co., Ltd.
+3C 2D B7 Texas Instruments
+40 15 97 Protect America, Inc.
+40 61 86 Micro-star Int'l Co.,ltd
+40 97 D1 Bk Electronics Cc
+40 EF 4C Fihonest Communication Co.,ltd
+40 F5 2E Leica Microsystems (schweiz) Ag
+44 56 8D Pnc Technologies  Co., Ltd.
+44 56 B7 Spawn Labs, Inc
+44 C9 A2 Greenwald Industries
+48 34 3D Iep Gmbh
+58 4C EE Digital One Technologies, Limited
+58 6E D6 Private
+58 F6 7B Xia Men Unioncore Technology Ltd.
+60 38 0E Alps Electric Co.,
+60 39 1F Abb Ltd
+60 9F 9D Cloudswitch
+60 D0 A9 Samsung Electronics Co.,ltd
+60 D3 0A Quatius Limited
+60 FB 42 Apple, Inc
+64 16 F0 Shehzhen Huawei Communication Technologies Co., Ltd.
+64 4B C3 Shanghai Woasis Telecommunications Ltd., Co.
+64 65 C0 Nuvon, Inc
+64 68 0C Comtrend
+64 7D 81 Yokota Industrial Co,.ltd
+64 A8 37 Juni Korea Co., Ltd
+64 BC 11 Combiq Ab
+64 C6 AF Axerra Networks Ltd
+64 ED 57 Motorola Mdb/broadband
+68 85 40 Igi Mobile, Inc.
+68 AA D2 Datecs Ltd.,
+68 CC 9C Mine Site Technologies
+6C 0E 0D Sony Ericsson Mobile Communications Ab
+6C 0F 6A Jdc Tech Co., Ltd.
+6C 8C DB Otus Technologies Ltd
+6C F0 49 Giga-byte Technology Co.,ltd.
+70 1A 04 Liteon Tech Corp.
+70 1A ED Advas Co., Ltd.
+74 E5 37 Radspin
+7C 1E B3 2n Telekomunikace A.s.
+7C 7B E4 Z'sedai Kenkyusho Corporation
+7C CF CF Shanghai Seari Intelligent System Co., Ltd
 80 00 10 Att Bell Laboratories
+88 91 DD Racktivity
+90 6D C8 Dlg Automação Industrial Ltda
+90 E6 BA Asustek Computer Inc.
+94 2E 63 Finsécur
+94 44 52 Belkin International, Inc.
+9C 18 74 Nokia Danmark A/s
+A0 07 98 Samsung Electronics
+A0 2E F3 United Integrated Services Co., Led.
 A0 6A 00 Verilink Corporation
+A0 73 32 Cashmaster International Limited
+A0 98 05 Openvox Communication Co Ltd
+A0 9A 5A Time Domain
+A4 DE 50 Total Walther Gmbh
+A4 E7 E4 Connex Gmbh
+A8 CE 90 Cvc
 AA 00 00 Digital Equipment Corporation
 AA 00 01 Digital Equipment Corporation
 AA 00 02 Digital Equipment Corporation
 AA 00 03 Digital Equipment Corporation
 AA 00 04 Digital Equipment Corporation
+AC 83 17 Shenzhen Furtunetel Communication Co., Ltd
+AC D1 80 Crexendo Business Solutions, Inc.
 AC DE 48 Private
+B0 C6 9A Juniper Networks
+B4 41 7A Shenzhen Gongjin Electronics Co.,ltd
+B4 B5 AF Minsung Electronics
+BC 9D A5 Dascom Europe Gmbh
+C0 22 50 Private
+C4 19 8B Dominion Voting Systems Corporation
+C8 3A 35 Tenda Technology Co., Ltd.
+C8 C1 3C Ruggedtek Hangzhou Co., Ltd
+C8 D2 C1 Jetlun (shenzhen) Corporation
+CC 00 80 Trust System Co.,
+CC CC 4E Sun Fountainhead Usa. Corp 
+D4 C7 66 Acentic Gmbh
+D8 D6 7E Gsk Cnc Equipment Co.,ltd
+DC 33 50 Techsat Gmbh
+E0 64 BB Digiview S.r.l.
+E0 91 53 Xavi Technologies Corp.
+E4 1F 13 Ibm
+E8 0B 13 Akib Systems Taiwan, Inc
+E8 A4 C1 Deep Sea Electronics Plc
+EC 30 91 Cisco Systems
+EC 6C 9F Chengdu Volans Technology Co.,ltd
+F0 BC C8 Maxid (pty) Ltd
+F0 DE 71 Shanghai Edo Technologies Co.,ltd.
+F4 AC C1 Cisco Systems

macchanger-1.5.0-dynamic-lists.diff:
 maclist.c |   35 +++++++++++++++++------------------
 maclist.h |    1 -
 2 files changed, 17 insertions(+), 19 deletions(-)

--- NEW FILE macchanger-1.5.0-dynamic-lists.diff ---
Fix computation of mac list lengths - in some places, code assumed static list
(computing length as sizeof(list)/sizeof(item)), while dynamic memory
allocation is used now.

diff -pruN macchanger-1.5.0.orig/src/maclist.c macchanger-1.5.0/src/maclist.c
--- macchanger-1.5.0.orig/src/maclist.c	2002-12-03 18:52:48.000000000 +0100
+++ macchanger-1.5.0/src/maclist.c	2009-09-02 20:20:10.000000000 +0200
@@ -32,6 +32,9 @@
 card_mac_list_item_t *list_others   = NULL; /* IEEE OUI */
 card_mac_list_item_t *list_wireless = NULL; /* Wireless cards */
 
+int list_others_len   = 0;
+int list_wireless_len = 0;
+
 
 static char *
 mc_maclist_get_cardname_from_list (const mac_t *mac, card_mac_list_item_t *list)
@@ -76,12 +79,9 @@ mc_maclist_get_cardname_with_default (co
 }
 
 static void
-mc_maclist_set_random_vendor_from_list (mac_t *mac, card_mac_list_item_t *list)
+mc_maclist_set_random_vendor_from_list (mac_t *mac, card_mac_list_item_t *list, int list_len)
 {
-	   int i, num = 0;
-
-	   /* Count */
-	   while (list[++num].name);
+	   int i, num = list_len;
 
 	   /* Choose one randomly */
 	   num = random()%num;
@@ -96,25 +96,23 @@ mc_maclist_set_random_vendor_from_list (
 void
 mc_maclist_set_random_vendor (mac_t *mac, mac_type_t type)
 {
-	   int total, num;
-	   total = LIST_LENGHT (list_others) +
-		   LIST_LENGHT (list_wireless);
+	   int num;
 
-	   num = random() % total;
+	   num = random() % ( list_others_len + list_wireless_len );
 	   
 	   switch (type) {
 	   case mac_is_anykind:
-			 if (num < LIST_LENGHT(list_others)) {
-				    mc_maclist_set_random_vendor_from_list (mac, list_others);
+			 if (num < list_others_len) {
+				    mc_maclist_set_random_vendor_from_list (mac, list_others, list_others_len);
 			 } else {
-				    mc_maclist_set_random_vendor_from_list (mac, list_wireless);
+				    mc_maclist_set_random_vendor_from_list (mac, list_wireless, list_wireless_len);
 			 }
 			 break;
 	   case mac_is_wireless:
-			 mc_maclist_set_random_vendor_from_list (mac, list_wireless);
+			 mc_maclist_set_random_vendor_from_list (mac, list_wireless, list_wireless_len);
 			 break;
 	   case mac_is_others:
-			 mc_maclist_set_random_vendor_from_list (mac, list_others);
+			 mc_maclist_set_random_vendor_from_list (mac, list_others, list_others_len);
 			 break;
 	   }
 }
@@ -160,12 +158,12 @@ mc_maclist_print (const char *keyword)
 
 
 static card_mac_list_item_t *
-mc_maclist_read_from_file (const char *fullpath)
+mc_maclist_read_from_file (const char *fullpath, int *list_len)
 {
 	FILE *f;
 	char *line;
 	char  tmp[512];
-	int   num =0;
+	int   num = 0;
 	card_mac_list_item_t *list;
 
 	if ((f = fopen(fullpath, "r")) == NULL) {
@@ -199,6 +197,7 @@ mc_maclist_read_from_file (const char *f
 
 	fclose (f);
 
+	*list_len = num;
 	return list;
 }
 
@@ -206,8 +205,8 @@ mc_maclist_read_from_file (const char *f
 int
 mc_maclist_init (void)
 {
-	list_others = mc_maclist_read_from_file(LISTDIR "/OUI.list");
-	list_wireless = mc_maclist_read_from_file(LISTDIR "/wireless.list");
+	list_others = mc_maclist_read_from_file(LISTDIR "/OUI.list", &list_others_len);
+	list_wireless = mc_maclist_read_from_file(LISTDIR "/wireless.list", &list_wireless_len);
 
 	return (list_others && list_wireless)? 0 : -1;
 }
diff -pruN macchanger-1.5.0.orig/src/maclist.h macchanger-1.5.0/src/maclist.h
--- macchanger-1.5.0.orig/src/maclist.h	2002-12-03 18:52:57.000000000 +0100
+++ macchanger-1.5.0/src/maclist.h	2009-09-02 20:20:42.000000000 +0200
@@ -33,7 +33,6 @@ typedef struct {
 	unsigned char byte[3];
 } card_mac_list_item_t;
 
-#define LIST_LENGHT(l)   ((sizeof(l) / sizeof(card_mac_list_item_t))-1)
 #define CARD_NAME(x)     mc_maclist_get_cardname_with_default(x, "unknown")
 
 int    mc_maclist_init  (void);

macchanger-1.5.0-man-update.diff:
 macchanger.1 |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- NEW FILE macchanger-1.5.0-man-update.diff ---
Make sure -s / --show is documented in man page.

Loosely based on Debian's 01-fix_manpage.patch .

diff -pruN macchanger-1.5.0.orig/macchanger.1 macchanger-1.5.0/macchanger.1
--- macchanger-1.5.0.orig/macchanger.1	2002-12-03 18:34:31.000000000 +0100
+++ macchanger-1.5.0/macchanger.1	2009-09-02 19:15:34.000000000 +0200
@@ -45,6 +45,9 @@ Show summary of options.
 .B \-V, \-\-version
 Show version of program.
 .TP
+.B \-s, \-\-show
+Prints the current MAC
+.TP
 .B \-e, \-\-endding
 Don't change the vendor bytes.
 .TP
@@ -60,7 +63,7 @@ Set fully random MAC.
 .B \-l, \-\-list[=keyword]
 Print known vendors (with keyword in the vendor's description string)
 .TP
-.B \-m, \-\-mac XX:XX:XX:XX:XX:XX
+.B \-m, \-\-mac=XX:XX:XX:XX:XX:XX
 Set the MAC XX:XX:XX:XX:XX:XX
 .SH EXAMPLE
 macchanger -A eth1

macchanger-1.5.0-random-seed.diff:
 main.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- NEW FILE macchanger-1.5.0-random-seed.diff ---
Use more than current time when seeding pseudo random number generator.

https://bugzilla.redhat.com/show_bug.cgi?id=520268

diff -pruN macchanger-1.5.0.orig/src/main.c macchanger-1.5.0/src/main.c
--- macchanger-1.5.0.orig/src/main.c	2004-02-04 14:38:11.000000000 +0100
+++ macchanger-1.5.0/src/main.c	2009-09-02 19:35:56.000000000 +0200
@@ -32,6 +32,9 @@
 #include <getopt.h>
 #include <stdlib.h>
 
+#include <unistd.h>
+#include <sys/types.h>
+
 #include "mac.h"
 #include "maclist.h"
 #include "netinfo.h"
@@ -174,7 +177,7 @@ main (int argc, char *argv[])
 	device_name = argv[optind];
 	
 	
-	srandom(time(NULL));
+	srandom(getpid() * time(NULL));
 
         /* Read the MAC */
 	if ((net = mc_net_info_new(device_name)) == NULL) exit(1);


Index: macchanger.spec
===================================================================
RCS file: /cvs/pkgs/rpms/macchanger/devel/macchanger.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- macchanger.spec	25 Jul 2009 11:37:26 -0000	1.5
+++ macchanger.spec	2 Sep 2009 19:10:44 -0000	1.6
@@ -1,12 +1,16 @@
 Name:           macchanger
 Version:        1.5.0
-Release:        7%{?dist}
+Release:        8%{?dist}
 Summary:        An utility for viewing/manipulating the MAC address of network interfaces
 
 Group:          Applications/System
 License:        GPLv2+
 URL:            http://www.alobbs.com/macchanger
 Source0:        ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz
+Patch0:         macchanger-1.5.0-OUI-list-update.diff
+Patch1:         macchanger-1.5.0-man-update.diff
+Patch2:         macchanger-1.5.0-random-seed.diff
+Patch3:         macchanger-1.5.0-dynamic-lists.diff
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 Requires(post): /sbin/install-info    
@@ -19,11 +23,15 @@ Features:
   * set a MAC of another vendor
   * set another MAC of the same vendor
   * set a MAC of the same kind (eg: wireless card)
-  * display a vendor MAC list (today, 6200 items) to choose from
+  * display a vendor MAC list (more than 12000 items) to choose from
 
 
 %prep
 %setup -q
+%patch0 -p1 -b .OUI-list
+%patch1 -p1 -b .man
+%patch2 -p1 -b .srandom
+%patch3 -p1 -b .dynlists
 
 
 %build
@@ -57,6 +65,13 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/*
 
 %changelog
+* Wed Sep  2 2009 Tomas Hoger <thoger at fedoraproject.org> - 1.5.0-8
+- Fix pseudo random number generator seeding (RHBZ#520268)
+- Update OUI list from IEEE, now more than 12000 items listed
+- Update man page to list -s / --show
+- Fix handling of internal mac lists where static array was still assumed,
+  while dynamically allocated array was used
+
 * Sat Jul 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.5.0-7
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 




More information about the fedora-extras-commits mailing list