Re: Relax permissions for reading hard drive serial number?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Bartlomiej Zolnierkiewicz <bzolnier@...>
Cc: Kay Sievers <kay.sievers@...>, Dan Kegel <dank@...>, Xavier Bestel <xavier.bestel@...>, Andrey Borzenkov <arvidjaar@...>, <linux-kernel@...>
Date: Sunday, December 2, 2007 - 12:43 pm

On Thu, Nov 29, 2007 at 10:07:46PM +0100, Bartlomiej Zolnierkiewicz wrote:


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.

...

/Matti Aarnio
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Relax permissions for reading hard drive serial number?, Bartlomiej Zolnierkiewicz..., (Thu Nov 29, 5:07 pm)
Re: Relax permissions for reading hard drive serial number?, Matti Aarnio, (Sun Dec 2, 12:43 pm)