Changeset 5026

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

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

Location:
i2c-tools/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • i2c-tools/trunk/CHANGES

    r5017 r5026  
    55  decode-dimms: Fix DDR2 SDRAM module speed decoding 
    66                Update manufacturer IDs. 
     7  decode-vaio: Private data might not be readable by non-root users 
    78  i2cset: Final status messages go to stdout 
    89          Return success even when readback fails or doesn't match 
  • i2c-tools/trunk/eeprom/decode-vaio.pl

    r4493 r5026  
    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