Changeset 5019

Show
Ignore:
Timestamp:
11/16/07 09:48:06 (1 year ago)
Author:
khali
Message:

Hide Sony Vaio serial number and UUID to regular users. This is a backport
from Linux 2.6.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/CHANGES

    r5018 r5019  
    55  Library: Fix fschrc and fschmd support 
    66  Makefile: Revert changeset 4738, fix bug #2187 differently 
     7  Module eeprom: Hide Sony Vaio serial numbers to regular users (2.6 backport) 
    78  Program decode-dimms.pl: Fix DDR2 SDRAM module speed decoding 
    89                           Update manufacturer IDs. 
  • lm-sensors/trunk/kernel/chips/eeprom.c

    r4652 r5019  
    208208                 && i2c_smbus_read_byte(new_client) == '-') { 
    209209                        printk(KERN_INFO "Vaio EEPROM detected, " 
    210                                "enabling password protection\n"); 
     210                               "enabling privacy protection\n"); 
    211211                        data->nature = NATURE_VAIO; 
    212212                } 
     
    309309        else if (operation == SENSORS_PROC_REAL_READ) { 
    310310                eeprom_update_client(client, nr >> 1); 
    311                 /* Hide Vaio security settings to regular users */ 
    312                 if (nr == 0 && data->nature == NATURE_VAIO 
    313                  && !capable(CAP_SYS_ADMIN)) 
     311                /* Hide Vaio private settings to regular users: 
     312                   - BIOS passwords: bytes 0x00 to 0x0f (row 0) 
     313                   - UUID: bytes 0x10 to 0x1f (row 1) 
     314                   - Serial number: 0xc0 to 0xdf (rows 12 and 13) */ 
     315                if (data->nature == NATURE_VAIO 
     316                 && !capable(CAP_SYS_ADMIN) 
     317                 && (nr == 0 || nr == 1 || nr == 12 || nr == 13)) 
    314318                        for (i = 0; i < 16; i++) 
    315319                                results[i] = 0;