From owner-freebsd-bugs@FreeBSD.ORG Mon Dec 23 15:50:01 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14DD7F8D for ; Mon, 23 Dec 2013 15:50:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E3E5A168E for ; Mon, 23 Dec 2013 15:50:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id rBNFo0pT093135 for ; Mon, 23 Dec 2013 15:50:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id rBNFo0nF093134; Mon, 23 Dec 2013 15:50:00 GMT (envelope-from gnats) Resent-Date: Mon, 23 Dec 2013 15:50:00 GMT Resent-Message-Id: <201312231550.rBNFo0nF093134@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Kurt Lidl Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2AA8E1D for ; Mon, 23 Dec 2013 15:40:36 +0000 (UTC) Received: from oldred.freebsd.org (oldred.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8745A1626 for ; Mon, 23 Dec 2013 15:40:36 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rBNFeZmF066658 for ; Mon, 23 Dec 2013 15:40:35 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rBNFeZeT066603; Mon, 23 Dec 2013 15:40:35 GMT (envelope-from nobody) Message-Id: <201312231540.rBNFeZeT066603@oldred.freebsd.org> Date: Mon, 23 Dec 2013 15:40:35 GMT From: Kurt Lidl To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: misc/185138: makefs doesn't record serial numbers in rock ridge extensions X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Dec 2013 15:50:01 -0000 >Number: 185138 >Category: misc >Synopsis: makefs doesn't record serial numbers in rock ridge extensions >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Dec 23 15:50:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Kurt Lidl >Release: 9.2-RELEASE >Organization: >Environment: FreeBSD host.pix.net 9.2-RELEASE-p1 FreeBSD 9.2-RELEASE-p1 #0: Fri Nov 29 23:01:31 PST 2013 [redacted]:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Makefs, used to generated the cd9660 filesystem for boot media, does not record the serial number in the rock ridge extensions. This can be used, when extracting a filesystem from the cd9660 filesystem, to detect hard links in the filesystem. This was pointed out several months ago: http://lists.freebsd.org/pipermail/freebsd-stable/2013-April/073050.html Other bugs were also listed in the followup to that thread -- it looks like all the other issues have been addressed. >How-To-Repeat: >Fix: Patch attached with submission follows: diff --git a/usr.sbin/makefs/cd9660/iso9660_rrip.c b/usr.sbin/makefs/cd9660/iso9660_rrip.c --- a/usr.sbin/makefs/cd9660/iso9660_rrip.c +++ b/usr.sbin/makefs/cd9660/iso9660_rrip.c @@ -629,28 +629,29 @@ cd9660_createSL(cd9660node *node) } } } } int cd9660node_rrip_px(struct ISO_SUSP_ATTRIBUTES *v, fsnode *pxinfo) { - v->attr.rr_entry.PX.h.length[0] = 36; + v->attr.rr_entry.PX.h.length[0] = 44; v->attr.rr_entry.PX.h.version[0] = 1; cd9660_bothendian_dword(pxinfo->inode->st.st_mode, v->attr.rr_entry.PX.mode); cd9660_bothendian_dword(pxinfo->inode->st.st_nlink, v->attr.rr_entry.PX.links); cd9660_bothendian_dword(pxinfo->inode->st.st_uid, v->attr.rr_entry.PX.uid); cd9660_bothendian_dword(pxinfo->inode->st.st_gid, v->attr.rr_entry.PX.gid); + cd9660_bothendian_dword(pxinfo->inode->st.st_ino, + v->attr.rr_entry.PX.serial); - /* Ignoring the serial number for now */ return 1; } int cd9660node_rrip_pn(struct ISO_SUSP_ATTRIBUTES *pn_field, fsnode *fnode) { pn_field->attr.rr_entry.PN.h.length[0] = 20; pn_field->attr.rr_entry.PN.h.version[0] = 1; diff --git a/usr.sbin/makefs/cd9660/iso9660_rrip.h b/usr.sbin/makefs/cd9660/iso9660_rrip.h --- a/usr.sbin/makefs/cd9660/iso9660_rrip.h +++ b/usr.sbin/makefs/cd9660/iso9660_rrip.h @@ -98,17 +98,17 @@ #define SL_FLAGS_ROOT 8 typedef struct { ISO_SUSP_HEADER h; u_char mode [ISODCL(5,12)]; u_char links [ISODCL(13,20)]; u_char uid [ISODCL(21,28)]; u_char gid [ISODCL(29,36)]; - u_char serial [ISODCL(37,44)];/* Not used */ + u_char serial [ISODCL(37,44)]; } ISO_RRIP_PX; typedef struct { ISO_SUSP_HEADER h; u_char high [ISODCL(5,12)]; u_char low [ISODCL(13,20)]; } ISO_RRIP_PN; >Release-Note: >Audit-Trail: >Unformatted: