Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't follow symlinks when deleting test outputs #19948

Closed

Commits on Dec 1, 2023

  1. Don't follow symlinks when deleting test outputs

    Update tools/test/test-setup.sh to not follow symlinks when deleting the
    contents of `$TEST_UNDECLARED_OUTPUTS_DIR` after creating the
    `$TEST_UNDECLARED_OUTPUTS_ZIP` when `--zip_undeclared_test_outputs` is
    enabled.
    
    This fixes a serious bug where an absolute symlink generated in the test
    could delete files anywhere on the filesystem.
    
    For example, a `sh_test` containing a line like:
    
        ln -s "$HOME" "$TEST_UNDECLARED_OUTPUTS_DIR/home"
    
    would have caused the users home directory to be deleted after copying
    it in to the output.zip.
    
    Change-Id: Ia4a8a9699e4e2f40498342af55babc5554a9ac93
    alanfalloon committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    6daca29 View commit details
    Browse the repository at this point in the history