From Jim.Pirzyk@disney.com Wed Feb 21 16:14:50 2001 Return-Path: Received: from mail.disney.com (mail.disney.com [204.128.192.15]) by hub.freebsd.org (Postfix) with ESMTP id 3577037B491 for ; Wed, 21 Feb 2001 16:14:50 -0800 (PST) (envelope-from Jim.Pirzyk@disney.com) Received: from pain10.corp.disney.com (root@pain10.corp.disney.com [153.7.110.100]) by mail.disney.com (Switch-2.0.1/Switch-2.0.1) with SMTP id f1M0EHc16930 for ; Wed, 21 Feb 2001 16:14:17 -0800 (PST) Received: from louie.fa.disney.com by pain.corp.disney.com with ESMTP for FreeBSD-gnats-submit@freebsd.org; Wed, 21 Feb 2001 16:15:23 -0800 Received: from plio.fan.fa.disney.com (plio.fan.fa.disney.com [153.7.118.2]) by louie.fa.disney.com (8.9.2/8.9.2) with ESMTP id QAA27942 for ; Wed, 21 Feb 2001 16:14:45 -0800 (PST) (envelope-from Jim.Pirzyk@fa.disney.com) Received: from snoopy.fan.fa.disney.com (snoopy.fan.fa.disney.com [153.7.117.170]) by plio.fan.fa.disney.com (8.9.2/8.9.2) with ESMTP id QAA10394 for ; Wed, 21 Feb 2001 16:14:44 -0800 (PST) (envelope-from Jim.Pirzyk@fa.disney.com) Received: (from Jim.Pirzyk@localhost) by snoopy.fan.fa.disney.com (8.11.1/8.9.3) id f1M0EiO40669; Wed, 21 Feb 2001 16:14:44 -0800 (PST) (envelope-from Jim.Pirzyk@fa.disney.com) Message-Id: <200102220014.f1M0EiO40669@snoopy.fan.fa.disney.com> Date: Wed, 21 Feb 2001 16:14:44 -0800 (PST) From: Jim.Pirzyk@disney.com Reply-To: Jim.Pirzyk@disney.com To: FreeBSD-gnats-submit@freebsd.org Subject: brandelf does not add string for file(1) to find X-Send-Pr-Version: 3.2 >Number: 25271 >Category: bin >Synopsis: brandelf use to add the string for file(1) to use >Confidential: no >Severity: non-critical >Priority: medium >Responsible: obrien >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Feb 21 16:20:00 PST 2001 >Closed-Date: Wed Feb 28 02:38:49 PST 2001 >Last-Modified: Wed Feb 28 02:39:40 PST 2001 >Originator: Jim Pirzyk >Release: FreeBSD 4.2-RELEASE i386 >Organization: >Environment: Standard FreeBSD 4.2-RELEASE system.. >Description: brandelf in the 3.x days would write a string into the elf binary, now it only writes the byte code. >How-To-Repeat: Run brandelf from 3.x on a elf binary and then run it from 4.x on another copy of the binary and run the file command over it. >Fix: *** ./src/usr.bin/brandelf/brandelf.c.orig Fri Jul 7 01:32:13 2000 --- ./src/usr.bin/brandelf/brandelf.c Wed Feb 21 16:11:21 2001 *************** *** 142,147 **** --- 142,153 ---- } else { buffer[EI_OSABI] = type; + + /* Also add the assocated string so file(1) finds it */ + strncpy(buffer+EI_ABIVERSION, + iselftype(buffer[EI_OSABI]), + EI_NIDENT-EI_ABIVERSION); + lseek(fd, 0, SEEK_SET); if (write(fd, buffer, EI_NIDENT) != EI_NIDENT) { warn("error writing %s %d", argv[0], fd); >Release-Note: >Audit-Trail: Responsible-Changed-From-To: freebsd-bugs->obrien Responsible-Changed-By: dwmalone Responsible-Changed-When: Thu Feb 22 02:16:53 PST 2001 Responsible-Changed-Why: David O'Brien updated the way we do elf branding, so he should be able to say it this is the correct course of action or not. http://www.freebsd.org/cgi/query-pr.cgi?pr=25271 State-Changed-From-To: open->closed State-Changed-By: obrien State-Changed-When: Wed Feb 28 02:38:49 PST 2001 State-Changed-Why: This PR does not give enough detail to figure out what the submitter does not like. Since I don't have access to a 3.x box any longer, I cannot compare the output from file(1) to see what the submitter finds objectionable. http://www.freebsd.org/cgi/query-pr.cgi?pr=25271 >Unformatted: