Changeset 19004 for trunk/base/tests


Ignore:
Timestamp:
Aug 4, 2006, 6:40:42 AM (14 years ago)
Author:
pguyot (Paul Guyot)
Message:

Changes to strengthen the trace mode:

  • the values of the global variables are noted when the library is loaded and not when the first trapped function is called.
  • when a process calls exec[ve], the environment variables are restored.

Both changes aim at preventing processes to (inadvertantly) bypass of trace
mode.

Several holes remain (syscall, setuid binaries owned by a different user, kernel
modules), but this should prevent all inadvertant methods to bypass the trace
mode.

Location:
trunk/base/tests/trace
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/tests/trace/Makefile

    r18988 r19004  
    1111        @touch delete-trace
    1212        @touch rename-trace
    13         @mkdir rmdir-trace
     13        @mkdir -p rmdir-trace
    1414        @rm -f create-trace
     15        @rm -f create-trace-modenv
    1516        @rm -rf mkdir-trace
    1617        @rm -f /tmp/hello-trace
     
    2021        @rm -f rename-new-trace
    2122        @rm -f create-trace
     23        @rm -f create-trace-modenv
    2224        @rm -rf mkdir-trace
    2325        @rm -rf rmdir-trace
  • trunk/base/tests/trace/Portfile

    r18988 r19004  
    1 # $Id: Portfile,v 1.6 2006/08/02 00:48:29 pguyot Exp $
     1# $Id: Portfile,v 1.7 2006/08/04 06:40:42 pguyot Exp $
    22
    33PortSystem 1.0
     
    1919destroot        {}
    2020
    21 test { 
     21test {
    2222        catch {system "touch create-trace"}
    2323        catch {system "rm delete-trace"}
     
    2727        catch {system "rmdir rmdir-trace"}
    2828        catch {system "mv rename-trace rename-new-trace"}
     29        catch {system "DYLD_INSERT_LIBRARIES= touch create-trace-modenv"}
    2930        system "mkdir -p /usr/bin"
    3031}
  • trunk/base/tests/trace/master

    r18988 r19004  
    66--->  Testing trace
    77Warning: A creation/deletion/modification was attempted outside sandbox: PWD/create-trace
     8Warning: A creation/deletion/modification was attempted outside sandbox: PWD/create-trace-modenv
    89Warning: A creation/deletion/modification was attempted outside sandbox: PWD/delete-trace
    910Warning: A creation/deletion/modification was attempted outside sandbox: PWD/mkdir-trace
Note: See TracChangeset for help on using the changeset viewer.