• Jinoh Kang's avatar
    ntdll: Open application manifest files with FILE_SHARE_DELETE. · bc854efd
    Jinoh Kang authored
    Today, RtlCreateActivationContext (CreateActCtxW) opens the source
    manifest file via NtOpenFile without the FILE_SHARE_DELETE sharing mode.
    
    This causes CreateActCtxW to fail if the source manifest file was
    created with the FILE_DELETE_ON_CLOSE flag.  FILE_DELETE_ON_CLOSE is
    often used for temporary files that should be automatically deleted
    after use, even if the creator process crashes.
    
    Fix this by specifying FILE_SHARE_DELETE for sharing mode when opening
    the source manifest or module file.  This allows the source manifest or
    module file to be marked as deleted while it is open.
    
    Note that concurrent deletion is not an issue for the following reasons:
    
    - The ability to read from an open file handle is unaffected by deletion
      of the corresponding file's name.
    
    - RtlCreateActivationContext does not open the source manifest or module
      file by the given filename (lpSource) more than once.
    bc854efd
Name
Last commit
Last update
..
tests Loading commit data...
Makefile.in Loading commit data...
atom.c Loading commit data...
comm.c Loading commit data...
computername.c Loading commit data...
console.c Loading commit data...
debugger.c Loading commit data...
file.c Loading commit data...
heap.c Loading commit data...
kernel32.spec Loading commit data...
kernel_main.c Loading commit data...
kernel_private.h Loading commit data...
locale.c Loading commit data...
lzexpand.c Loading commit data...
module.c Loading commit data...
path.c Loading commit data...
powermgnt.c Loading commit data...
process.c Loading commit data...
profile.c Loading commit data...
resource.c Loading commit data...
sync.c Loading commit data...
tape.c Loading commit data...
thread.c Loading commit data...
toolhelp.c Loading commit data...
version.c Loading commit data...
version.rc Loading commit data...
virtual.c Loading commit data...
volume.c Loading commit data...