Changeset 5030

Show
Ignore:
Timestamp:
11/19/07 23:27:26 (6 years ago)
Author:
khali
Message:

Private Sony Vaio data might not be readable by non-root users.

Location:
lm-sensors/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r5024 r5030  
    1010  Program decode-dimms.pl: Fix DDR2 SDRAM module speed decoding 
    1111                           Update manufacturer IDs. 
     12  Program decode-vaio.pl: Private data might not be readable by non-root users 
    1213  Program pwmconfig: Better diagnostics in pwmdisable 
    1314                     Give the fans some time to spin up 
  • lm-sensors/trunk/prog/eeprom/decode-vaio.pl

    r4164 r5030  
    11#!/usr/bin/perl -w 
    22# 
    3 # Copyright (C) 2002-2006 Jean Delvare <khali@linux-fr.org> 
     3# Copyright (C) 2002-2007 Jean Delvare <khali@linux-fr.org> 
    44# 
    55#    This program is free software; you can redistribute it and/or modify 
     
    4444# Version 1.4  2006-09-20  Jean Delvare <khali@linux-fr.org> 
    4545#  Detect and skip false positives (e.g. EDID EEPROMs). 
     46# Version 1.5  2007-11-19  Jean Delvare <khali@linux-fr.org> 
     47#  UUID and serial number might be hidden 
    4648# 
    4749# EEPROM data decoding for Sony Vaio laptops.  
     
    8284use vars qw($sysfs $found); 
    8385 
     86use constant ONLYROOT   => "Readable only by root"; 
     87 
    8488sub print_item 
    8589{ 
     
    176180        } 
    177181 
    178         return($string); 
     182        if ($string eq '00000000-0000-0000-0000-000000000000') 
     183        { 
     184                return(ONLYROOT); 
     185        } 
     186        else 
     187        { 
     188                return($string); 
     189        } 
    179190} 
    180191 
     
    188199 
    189200        print_item('Machine Name', $name); 
    190         print_item('Serial Number', decode_string($bus, $addr, 192, 32)); 
     201        my $serial = decode_string($bus, $addr, 192, 32); 
     202        print_item('Serial Number', $serial ? $serial : ONLYROOT); 
    191203        print_item('UUID', decode_uuid($bus, $addr, 16)); 
    192204        my $revision = decode_string($bus, $addr, 160, 10); 
     
    202214{ 
    203215        print("Sony Vaio EEPROM Decoder\n"); 
    204         print("Copyright (C) 2002-2006  Jean Delvare\n"); 
    205         print("Version 1.4\n\n"); 
     216        print("Copyright (C) 2002-2007  Jean Delvare\n"); 
     217        print("Version 1.5\n\n"); 
    206218} 
    207219