Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756816AbXLBQnz (ORCPT ); Sun, 2 Dec 2007 11:43:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756672AbXLBQnj (ORCPT ); Sun, 2 Dec 2007 11:43:39 -0500 Received: from z2.cat.iki.fi ([212.16.98.133]:50533 "EHLO z2.cat.iki.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755418AbXLBQni (ORCPT ); Sun, 2 Dec 2007 11:43:38 -0500 Date: Sun, 2 Dec 2007 18:43:33 +0200 From: Matti Aarnio To: Bartlomiej Zolnierkiewicz Cc: Kay Sievers , Dan Kegel , Xavier Bestel , Andrey Borzenkov , linux-kernel@vger.kernel.org Subject: Re: Relax permissions for reading hard drive serial number? Message-ID: <20071202164333.GJ6372@mea-ext.zmailer.org> References: <3ae72650711290939w4fee581fm6f0d65a33abf1b82@mail.gmail.com> <200711292207.46967.bzolnier@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200711292207.46967.bzolnier@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1766 Lines: 42 On Thu, Nov 29, 2007 at 10:07:46PM +0100, Bartlomiej Zolnierkiewicz wrote: > > There are people who, for privacy reasons, really don't like that "unique" > > unchangeable serial numbers can be retrieved by untrusted users. > > > > You should probably chmod the file on the users system, if he is fine with > > that, but not change the kernel default. > > Seconded. > > While on it, how's about exporting model/firmware/serial through > sysfs so /proc/ide/hd*/identify don't have to be used? Nice, except that while my home workstation running 2.6.23 kernel does have 4 SATA disks in it, plus a compact flash memory card on PATA (boot device, while SATA-disks are JBOD in SW RAID), it has _no_ /sys/bus/ide/, nor /proc/ide/ All devices are under /sys/bus/scsi/ Simplest way for me to pick this data is to use "hdparm -I /dev/sdX" command. Which of course must be run as root. All it does is to open named device, and issue one ioctl(). That ioctl() can be embedded into a suid-root helper program, or it can even (in case of Wine) be run separately to write a text file storing these identifier data on some Wine config file, which the "read from physical device X" then does receive. In my case I don't want to report any of the hard-drive serial numbers, but rather my boot-device - a flash drive. Hard-drives do break at some point in time, a flash drive in read-only mode does last considerably longer. > [PATCH] ide: add /sys/bus/ide/devices/*/{model,firmware,serial} sysfs entries ... /Matti Aarnio -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/