tools/tests/isa-module.pl

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rwxr-xr-x

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 #!/usr/bin/perl -w
     3 use Cwd;
     5 $curdir = cwd();
     7 @path_fields = split(/\//,$curdir);
     9 $path = join ("/",@path_fields);
    11 print "Searching in " . $path . "\n";
    13 open (REPORT, "find $path -name \"*.so\" -print | xargs nm -Bno | egrep NSGetModule 2>&1 |" ) || die "open: $! \n";
    15 print "Modules:\n";
    16 while (<REPORT>) {
    17     $module = $_;
    18     $module =~ s/:.*//;
    19     print $module;
    20 }
    21 close(REPORT);
    23 open (REPORT, "find $path -name \"*.so\" -print | xargs nm -Bno | egrep NSGetFactory 2>&1 |" ) || die "open: $! \n";
    25 print "\nComponents:\n";
    26 while (<REPORT>) {
    27     $module = $_;
    28     $module =~ s/:.*//;
    29     print $module;
    30 }
    31 close(REPORT);

mercurial