• 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
dlls Loading commit data...
documentation Loading commit data...
fonts Loading commit data...
include Loading commit data...
libs Loading commit data...
loader Loading commit data...
nls Loading commit data...
po Loading commit data...
programs Loading commit data...
server Loading commit data...
tools Loading commit data...
.editorconfig Loading commit data...
.gitlab-ci.yml Loading commit data...
.mailmap Loading commit data...
ANNOUNCE Loading commit data...
AUTHORS Loading commit data...
COPYING.LIB Loading commit data...
LICENSE Loading commit data...
LICENSE.OLD Loading commit data...
MAINTAINERS Loading commit data...
README Loading commit data...
VERSION Loading commit data...
aclocal.m4 Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...