mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-25 20:28:21 +00:00
Hide Sony Vaio serial number and UUID to regular users. This is a backport
from Linux 2.6. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5019 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
2ae24a97ed
commit
7294b74b97
2 files changed
+9
-4
No files matched your search
@@ -4,6 +4,7 @@ lm_sensors CHANGES file
|
|||||||
SVN-HEAD
|
SVN-HEAD
|
||||||
Library: Fix fschrc and fschmd support
|
Library: Fix fschrc and fschmd support
|
||||||
Makefile: Revert changeset 4738, fix bug #2187 differently
|
Makefile: Revert changeset 4738, fix bug #2187 differently
|
||||||
|
Module eeprom: Hide Sony Vaio serial numbers to regular users (2.6 backport)
|
||||||
Program decode-dimms.pl: Fix DDR2 SDRAM module speed decoding
|
Program decode-dimms.pl: Fix DDR2 SDRAM module speed decoding
|
||||||
Update manufacturer IDs.
|
Update manufacturer IDs.
|
||||||
Program sensors: Hide spurious errors on missing f71872f voltage inputs
|
Program sensors: Hide spurious errors on missing f71872f voltage inputs
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ static int eeprom_detect(struct i2c_adapter *adapter, int address,
|
|||||||
&& i2c_smbus_read_byte(new_client) == 'G'
|
&& i2c_smbus_read_byte(new_client) == 'G'
|
||||||
&& i2c_smbus_read_byte(new_client) == '-') {
|
&& i2c_smbus_read_byte(new_client) == '-') {
|
||||||
printk(KERN_INFO "Vaio EEPROM detected, "
|
printk(KERN_INFO "Vaio EEPROM detected, "
|
||||||
"enabling password protection\n");
|
"enabling privacy protection\n");
|
||||||
data->nature = NATURE_VAIO;
|
data->nature = NATURE_VAIO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -308,9 +308,13 @@ void eeprom_contents(struct i2c_client *client, int operation,
|
|||||||
*nrels_mag = 0;
|
*nrels_mag = 0;
|
||||||
else if (operation == SENSORS_PROC_REAL_READ) {
|
else if (operation == SENSORS_PROC_REAL_READ) {
|
||||||
eeprom_update_client(client, nr >> 1);
|
eeprom_update_client(client, nr >> 1);
|
||||||
/* Hide Vaio security settings to regular users */
|
/* Hide Vaio private settings to regular users:
|
||||||
if (nr == 0 && data->nature == NATURE_VAIO
|
- BIOS passwords: bytes 0x00 to 0x0f (row 0)
|
||||||
&& !capable(CAP_SYS_ADMIN))
|
- UUID: bytes 0x10 to 0x1f (row 1)
|
||||||
|
- Serial number: 0xc0 to 0xdf (rows 12 and 13) */
|
||||||
|
if (data->nature == NATURE_VAIO
|
||||||
|
&& !capable(CAP_SYS_ADMIN)
|
||||||
|
&& (nr == 0 || nr == 1 || nr == 12 || nr == 13))
|
||||||
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16; i++)
|
||||||
results[i] = 0;
|
results[i] = 0;
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in new issue
Block a user