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

[release/0.4] Backport fixes from v0.5.1 to 0.4 #222

Merged
merged 4 commits into from Oct 15, 2021

Commits on Oct 15, 2021

  1. Fix syscall error handling in vhd and pkg/security

    These packages had incorrect error handling for their generated syscall
    bindings. The functions they were calling returned errors directly, but
    the binding was written such that the generated code was calling
    GetLastError instead.
    
    Thankfully, this did not affect the detection of whether or not an error
    had occurred, it only caused the value returned in the case of an error
    to be not the right error code.
    
    Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
    (cherry picked from commit 9f0ab2c)
    Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
    kevpar committed Oct 15, 2021
    Copy the full SHA
    6442b6c View commit details
    Browse the repository at this point in the history
  2. Fix corruption in x86 callback

    (cherry picked from commit 0b148d1)
    Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
    KaiserKyle authored and kevpar committed Oct 15, 2021
    Copy the full SHA
    38765a6 View commit details
    Browse the repository at this point in the history
  3. backuptar: Fix sparse file handling

    A recent OS change altered how sparse files are represented in backup
    streams. This caused backuptar to no longer work with certain files. The
    specific behavior that changed is as follows:
    - Empty sparse files (size = 0), previously did not have any data or
      sparse block streams in the backup stream. Now, they will have a
      data stream with size = 0, and no sparse block streams.
    - Sparse files with a single allocated range (e.g. a normal file that
      has the sparse attribute set) previously would not show as sparse in
      the backup stream. Now, they will show as sparse.
    
    The old backuptar behavior assumed that if the sparse flag was set on
    the data stream, then there would always be a set of sparse blocks
    following. These changes break this assumption, and so require special
    handling.
    
    It is unsupported to have a data stream, marked sparse, that contains
    file content AND a series of sparse block streams following. As far as
    I can tell this is not a valid case for backup streams.
    
    This change also cleans up some code and error messages, and expands on
    the test coverage for backuptar.
    
    For more information on backup stream format see: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-bkup/f67950c8-d583-469a-83dd-c4ff4cedf533
    
    Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
    (cherry picked from commit 33a4801)
    Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
    kevpar committed Oct 15, 2021
    Copy the full SHA
    7329d86 View commit details
    Browse the repository at this point in the history
  4. FIxing corruption in callbacks

    Signed-off-by: Kyle Wojtaszek <kylewo@microsoft.com>
    (cherry picked from commit 4c72048)
    Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
    kylewo authored and kevpar committed Oct 15, 2021
    Copy the full SHA
    d255db1 View commit details
    Browse the repository at this point in the history