Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
2f6a0a8
bump DLL version to 3.5.6
github-cygwin Dec 20, 2024
5f7ed46
Cygwin: access: Fix X_OK behaviour for backup operators and admins
github-cygwin Jan 7, 2025
b1199ab
Cygwin: unlink/rename: fix skipping deletion with POSIX semantics
github-cygwin Jan 12, 2025
e9d8349
Cygwin: doc: remove "faq.using.sshd-in-domain"
github-cygwin Jan 17, 2025
050e44d
Cygwin: doc: clarify usage of sshd vs. cygsshd
github-cygwin Jan 17, 2025
d9a4547
Cygwin: doc: Remove executable name setup.exe from user guide
github-cygwin Jan 17, 2025
176a306
Cygwin: cygwait: Make cygwait() reentrant
tyan0 Jan 20, 2025
12faeff
Cygwin: signal: Do not handle signal when __SIGFLUSHFAST is sent
tyan0 Jan 20, 2025
f9f6649
Cygwin: Add fd validation where needed in mq_* functions
mgeisert Jan 20, 2025
b838c8d
Cygwin: Document hang fixs introduced in 3.5.5
tyan0 Jan 20, 2025
f3a9f18
Cygwin: signal: Avoid frequent TLS lock/unlock for SIGCONT processing
tyan0 Jan 18, 2025
c180370
Cygwin: Minor updates to load average calculations
mgeisert Jan 20, 2025
437ca2d
Cygwin: CI: update deprecated artifacts action
jon-turney Jan 19, 2025
258a818
Cygwin: unlink_nt: clean up debug output and comment
github-cygwin Jan 23, 2025
ce947cc
Cygwin: path_conv: set on-disk-device flag for message queue files
github-cygwin Jan 21, 2025
002aad0
Cygwin: path_conv: simplify, rearrange, rename combined device checks
github-cygwin Jan 21, 2025
ed67082
Cygwin: unlink: fix error checking order
github-cygwin Jan 21, 2025
9c73122
Cygwin: add release msg for mq_unlink changes
github-cygwin Jan 25, 2025
61c7294
Add MSYS2 triplet
Alexpux Apr 14, 2019
e6895db
Fix msys library name in import libraries
ktbarrett Mar 14, 2021
e501600
Rename dll from cygwin to msys
Alexpux Apr 14, 2019
70cdcba
Add functionality for converting UNIX paths in arguments and environm…
Alexpux Apr 14, 2019
d6cd58e
Add functionality for changing OS name via MSYSTEM environment variab…
Alexpux Apr 14, 2019
e7d3c8f
- Move root to /usr. - Change sorting mount points. - By default moun…
Alexpux Apr 14, 2019
8c5cc28
Instead of creating Cygwin symlinks, use deep copy by default
Alexpux Apr 14, 2019
e907429
Automatically rewrite TERM=msys to TERM=cygwin
Alexpux Apr 14, 2019
8102cde
Do not convert environment for strace
Alexpux Apr 14, 2019
c68f8fd
strace.cc: Don't set MSYS=noglob
mingwandroid Aug 23, 2015
e6cc70d
Add debugging for strace make_command_line
mingwandroid Aug 21, 2015
e25ab86
strace --quiet: be *really* quiet
dscho May 17, 2017
8e18233
path_conv: special-case root directory to have trailing slash
Alexpux Apr 14, 2019
0c102ea
When converting to a Unix path, avoid double trailing slashes
dscho Nov 8, 2022
8ed6549
msys2_path_conv: pass PC_NOFULL to path_conv
lazka Nov 20, 2022
853cc54
path-conversion: Introduce ability to switch off conversion.
Jun 17, 2015
5d54a24
dcrt0.cc: Untangle allow_glob from winshell
mingwandroid Aug 21, 2015
d85da3a
dcrt0.cc (globify): Don't quote literal strings differently when dos_…
mingwandroid Aug 23, 2015
a3e7629
Add debugging for build_argv
mingwandroid Aug 21, 2015
ca226ec
environ.cc: New facility/environment variable MSYS2_ENV_CONV_EXCL
mingwandroid Apr 10, 2016
89f8cac
Fix native symbolic link spawn passing wrong arg0
SquallATF Sep 10, 2018
a46c753
Introduce the `enable_pcon` value for `MSYS`
dscho May 19, 2020
5f0df24
popen: call /usr/bin/sh instead of /bin/sh
lazka Jun 5, 2020
c1a9410
Disable the 'cygwin' GitHub workflow
dscho Mar 17, 2021
9354423
CI: add a GHA for doing a basic build test
lazka Aug 9, 2020
3edbe01
CI: fix the build with gcc 13
lazka Nov 10, 2023
d49861d
Set up a GitHub Action to keep in sync with Cygwin
dscho Nov 22, 2019
6d0c637
Expose full command-lines to other Win32 processes by default
dscho Aug 12, 2020
0e5a7de
Add a helper to obtain a function's address in kernel32.dll
dscho Apr 16, 2018
98632e1
Emulate GenerateConsoleCtrlEvent() upon Ctrl+C
dscho Mar 20, 2015
c890b0c
kill: kill Win32 processes more gently
dscho Mar 20, 2015
5ab3720
Cygwin: make option for native inner link handling.
jeremyd2019 Jul 22, 2021
1fcaaa3
docs: skip building texinfo and PDF files
dscho Nov 8, 2021
bbd5897
install-libs: depend on the "toollibs"
dscho Nov 8, 2021
7e40bdf
POSIX-ify the SHELL variable
dscho Nov 23, 2015
4c80b59
Handle ORIGINAL_PATH just like PATH
dscho Mar 21, 2017
0c124b9
uname: allow setting the system name to CYGWIN
lazka Jul 3, 2022
54d1ac9
Pass environment variables with empty values
dscho Feb 18, 2015
6fe00e2
Optionally disallow empty environment values again
dscho Sep 6, 2022
82d1e3b
build_env(): respect the `MSYS` environment variable
dscho Sep 6, 2022
855f33f
Revert "Cygwin: Enable dynamicbase on the Cygwin DLL by default"
lazka Dec 17, 2022
c8c911a
CI: set -Wno-error=maybe-uninitialized
lazka May 17, 2024
f840e12
Avoid sharing cygheaps across Cygwin versions
dscho Jan 30, 2023
905cab1
uname: report msys2-runtime commit hash, too
dscho Feb 21, 2023
856e949
Cygwin: find_fast_cwd: don't run assembler checking code on ARM64
github-cygwin Feb 13, 2024
c94b46b
cygthread: suspend thread before terminating.
jeremyd2019 Nov 12, 2024
62f6088
Cygwin: revert use of CancelSyncronousIo on wait_thread.
jeremyd2019 Nov 22, 2024
7f3ae80
Cygwin: cache IsWow64Process2 host arch in wincap.
jeremyd2019 Nov 27, 2024
7da06fd
Cygwin: uname: add host machine tag to sysname.
jeremyd2019 Nov 27, 2024
0f1907d
Start the merging-rebase to cygwin-3.5.6
dscho Jan 26, 2025
2c0e426
fixup! Instead of creating Cygwin symlinks, use deep copy by default
dscho Jan 27, 2025
2ba48a9
Merge branch 'msys2-3.5.6'
dscho Aug 14, 2020
9bfc180
Bump actions/checkout from 2 to 4
dependabot[bot] Feb 14, 2024
a981980
Handle 8-bit characters under LOCALE=C
dscho Feb 20, 2015
4d26e52
Mention the extremely useful small_printf() function
dscho Feb 20, 2015
b8aab4a
Fixed path converting with non ascii char.
Mar 9, 2015
2148f68
Make paths' WCS->MBS conversion explicit
dscho Dec 18, 2015
995ba4a
Allow native symlinks to non-existing targets in 'nativestrict' mode
kblees May 20, 2015
aba9b4c
Merge pull request #1 from dscho/git-for-windows
dscho Feb 12, 2018
0741b46
dependabot: help keeping GitHub Actions versions up to date
dscho Feb 6, 2024
8f39b1c
Use MB_CUR_MAX == 6 by default
dscho Nov 21, 2019
bc64dbd
Merge pull request #10 from kblees/kb/symlinks
dscho Feb 12, 2018
3f0076c
Do not try to sync with Cygwin
dscho Aug 20, 2020
bcccc1f
Change the default base address for x86_64
chirpnot Mar 10, 2022
dbff3e9
Merge branch 'wcstombs'
dscho Feb 12, 2018
bd1ebe7
msys2-runtime: restore fast path for current user primary group
rglidden Aug 24, 2023
6ff968d
Fix SSH hangs
dscho Oct 10, 2024
3c81a30
ci: run Git's entire test suite
dscho Feb 12, 2024
b589714
Merge pull request #37 from chirpnot/main
dscho May 13, 2022
746854d
Merge pull request #57 from rglidden/main
dscho Aug 28, 2023
2e979da
Merge pull request #75 from dscho/fix-ssh-hangs
dscho Oct 10, 2024
2a3a6df
Merge pull request #83 from dscho/run-gits-test-suite
dscho Jan 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
# resulting in errors due to -Werror. Disable them for now.
export CXXFLAGS="-Wno-error=stringop-truncation -Wno-error=array-bounds -Wno-error=overloaded-virtual -Wno-narrowing -Wno-use-after-free -Wno-error=maybe-uninitialized"
(cd winsup && ./autogen.sh)
./configure --disable-dependency-tracking --with-msys2-runtime-commit=$GITHUB_SHA
./configure --disable-dependency-tracking --with-msys2-runtime-commit="$GITHUB_SHA"
make -j8

- name: Install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cygwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ jobs:

# upload test logs to facilitate investigation of problems
- name: Upload test logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: testlogs
path: |
Expand Down
2 changes: 1 addition & 1 deletion winsup/cygwin/include/cygwin/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ details. */
changes to the DLL and is mainly informative in nature. */

#define CYGWIN_VERSION_DLL_MAJOR 3005
#define CYGWIN_VERSION_DLL_MINOR 5
#define CYGWIN_VERSION_DLL_MINOR 6

/* CYGWIN_VERSION_DLL_COMBINED gives us a single number representing the
combined DLL major and minor numbers. */
Expand Down
50 changes: 36 additions & 14 deletions winsup/cygwin/loadavg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,23 @@

A global load average estimate is maintained in shared memory. Access to that
is guarded by a mutex. This estimate is only updated at most every 5 seconds.
The updates are done by any/all callers of the getloadavg() syscall.

We attempt to count running and runnable processes, but unlike linux we don't
count processes in uninterruptible sleep (blocked on I/O).
We attempt to count running and runnable tasks (i.e., threads), but unlike
Linux we don't count tasks in uninterruptible sleep (blocked on I/O). There
doesn't seem to be a kernel counter for the latter on Windows.

The number of running processes is estimated as (NumberOfProcessors) * (%
Processor Time). The number of runnable processes is estimated as
ProcessorQueueLength.
In the following text and code, "PDH" refers to Performance Data Helper, a
Windows component that arranges access to kernel counters.

The number of running tasks is estimated as
(the NumberOfProcessors counter) * (the % Processor Time counter).
The number of runnable tasks is taken to be the ProcessorQueueLength counter.

Note that PDH will only return data for '% Processor Time' afer the second
call to PdhCollectQueryData(), as it's computed over an interval, so the first
attempt to estimate load will fail and 0.0 will be returned.
attempt to estimate load will fail and 0.0 will be returned. (This nuisance
is now worked-around near the end of load_init() below.)

We also assume that '% Processor Time' averaged over the interval since the
last time getloadavg() was called is a good approximation of the instantaneous
Expand Down Expand Up @@ -68,16 +74,27 @@ static bool load_init (void)
if (status != STATUS_SUCCESS)
{
debug_printf ("PdhAddEnglishCounterW(time), status %y", status);
return false;

/* Windows 10 Pro 21H1, and maybe others, use an alternative name */
status = PdhAddEnglishCounterW (query,
L"\\Processor Information(_Total)\\% Processor Time",
0, &counter1);
if (status != STATUS_SUCCESS)
{
debug_printf ("PdhAddEnglishCounterW(alt time), status %y", status);
return false;
}
}

/* Windows 10 Pro 21H1, and maybe others, are missing this counter */
status = PdhAddEnglishCounterW (query,
L"\\System\\Processor Queue Length",
0, &counter2);

if (status != STATUS_SUCCESS)
{
debug_printf ("PdhAddEnglishCounterW(queue length), status %y", status);
return false;
; /* Ignore missing counter, just use zero in later calculations */
}

mutex = CreateMutex(&sec_all_nih, FALSE, "cyg.loadavg.mutex");
Expand All @@ -87,6 +104,12 @@ static bool load_init (void)
}

initialized = true;

/* Do the first data collection (which always fails) here, rather than in
get_load(). We wait at least one tick afterward so the collection done
in get_load() is guaranteed to have data to work with. */
(void) PdhCollectQueryData (query); /* ignore errors */
Sleep (15/*ms*/); /* wait for at least one kernel tick to have occurred */
}

return initialized;
Expand All @@ -101,20 +124,19 @@ static bool get_load (double *load)
if (ret != ERROR_SUCCESS)
return false;

/* Estimate the number of running processes as (NumberOfProcessors) * (%
Processor Time) */
/* Estimate number of running tasks as
(NumberOfProcessors) * (% Processor Time) */
PDH_FMT_COUNTERVALUE fmtvalue1;
ret = PdhGetFormattedCounterValue (counter1, PDH_FMT_DOUBLE, NULL, &fmtvalue1);
if (ret != ERROR_SUCCESS)
return false;

double running = fmtvalue1.doubleValue * wincap.cpu_count () / 100;

/* Estimate the number of runnable processes using ProcessorQueueLength */
PDH_FMT_COUNTERVALUE fmtvalue2;
/* Estimate the number of runnable tasks as ProcessorQueueLength */
PDH_FMT_COUNTERVALUE fmtvalue2 = { 0 };
ret = PdhGetFormattedCounterValue (counter2, PDH_FMT_LONG, NULL, &fmtvalue2);
if (ret != ERROR_SUCCESS)
return false;
/* Ignore any error accessing this counter, just treat as if zero was read */

LONG rql = fmtvalue2.longValue;

Expand Down
26 changes: 19 additions & 7 deletions winsup/cygwin/local_includes/path.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,21 +207,33 @@ class path_conv
{
return (path_flags & (PATH_REP | PATH_REP_NOAPI)) == PATH_REP;
}
int isdevice () const {return dev.not_device (FH_FS) && dev.not_device (FH_FIFO);}

int isfifo () const {return dev.is_device (FH_FIFO);}
int isspecial () const {return dev.not_device (FH_FS);}
int iscygdrive () const {return dev.is_device (FH_CYGDRIVE);}
int is_fs_special () const {return dev.is_fs_special ();}

int is_lnk_special () const {return (isdevice () && is_fs_special ()
&& !issocket ())
|| isfifo () || is_lnk_symlink ();}
#ifdef __WITH_AF_UNIX
int issocket () const {return dev.is_device (FH_LOCAL)
|| dev.is_device (FH_UNIX);}
#else
int issocket () const {return dev.is_device (FH_LOCAL);}
#endif /* __WITH_AF_UNIX */

/* FIXME: This needs a cleanup with better, descriptive names and checking
all usages for correctness. */

/* Any file or device with representation on disk. This includes local
sockets, FIFOs, message queues and devices created with mknod. It does
not include the /proc hierarchy. */
int isondisk () const {return dev.isfs ();}
/* Any device, virtual or with on-disk representation, and anything under
/proc. */
int isspecial () const {return dev.not_device (FH_FS);}
/* Devices with representation on disk. This includes local sockets, FIFOs,
message queues and devices created with mknod. It does not include
the /proc hierarchy. */
int is_fs_special () const {return dev.is_fs_special ();}
/* Like is_fs_special but excluding local sockets. */
int is_lnk_special () const {return is_fs_special () && !issocket ();}

int iscygexec () const {return mount_flags & MOUNT_CYGWIN_EXEC;}
int isopen () const {return path_flags & PATH_OPEN;}
int isctty_capable () const {return path_flags & PATH_CTTY;}
Expand Down
10 changes: 6 additions & 4 deletions winsup/cygwin/path.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,10 @@ path_conv::check (const char *src, unsigned opt,

/* FIXME: bad hack alert!!! We need a better solution */
if (!strncmp (path_copy, MQ_PATH, MQ_LEN) && path_copy[MQ_LEN])
dev.parse (FH_MQUEUE);
{
dev.parse (FH_MQUEUE);
dev.setfs (1);
}
}

if (opt & PC_NOFULL)
Expand Down Expand Up @@ -2153,8 +2156,7 @@ symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice)
syscall_printf ("symlink (%s, %S) wsym_type %d", oldpath,
win32_newpath.get_nt_native_path (), wsym_type);

if ((!isdevice && win32_newpath.exists ())
|| (win32_newpath.isdevice () && !win32_newpath.is_fs_special ()))
if (win32_newpath.exists() && (!isdevice || !win32_newpath.isondisk ()))
{
set_errno (EEXIST);
__leave;
Expand Down Expand Up @@ -2343,7 +2345,7 @@ symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice)
set_errno (src_path.error);
__leave;
}
if (!src_path.isdevice () && !src_path.is_fs_special ())
if (!src_path.isspecial ())
{
/* MSYS copy file instead make symlink */

Expand Down
81 changes: 48 additions & 33 deletions winsup/cygwin/posix_ipc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,14 @@ mq_getattr (mqd_t mqd, struct mq_attr *mqstat)
int ret = -1;

cygheap_fdget fd ((int) mqd, true);
fhandler_mqueue *fh = fd->is_mqueue ();
if (!fh)
set_errno (EBADF);
else
ret = fh->mq_getattr (mqstat);
if (fd >= 0)
{
fhandler_mqueue *fh = fd->is_mqueue ();
if (!fh)
set_errno (EBADF);
else
ret = fh->mq_getattr (mqstat);
}
return ret;
}

Expand All @@ -239,11 +242,14 @@ mq_setattr (mqd_t mqd, const struct mq_attr *mqstat, struct mq_attr *omqstat)
int ret = -1;

cygheap_fdget fd ((int) mqd, true);
fhandler_mqueue *fh = fd->is_mqueue ();
if (!fh)
set_errno (EBADF);
else
ret = fh->mq_setattr (mqstat, omqstat);
if (fd >= 0)
{
fhandler_mqueue *fh = fd->is_mqueue ();
if (!fh)
set_errno (EBADF);
else
ret = fh->mq_setattr (mqstat, omqstat);
}
return ret;
}

Expand All @@ -253,11 +259,14 @@ mq_notify (mqd_t mqd, const struct sigevent *notification)
int ret = -1;

cygheap_fdget fd ((int) mqd, true);
fhandler_mqueue *fh = fd->is_mqueue ();
if (!fh)
set_errno (EBADF);
else
ret = fh->mq_notify (notification);
if (fd >= 0)
{
fhandler_mqueue *fh = fd->is_mqueue ();
if (!fh)
set_errno (EBADF);
else
ret = fh->mq_notify (notification);
}
return ret;
}

Expand All @@ -268,11 +277,14 @@ mq_timedsend (mqd_t mqd, const char *ptr, size_t len, unsigned int prio,
int ret = -1;

cygheap_fdget fd ((int) mqd, true);
fhandler_mqueue *fh = fd->is_mqueue ();
if (!fh)
set_errno (EBADF);
else
ret = fh->mq_timedsend (ptr, len, prio, abstime);
if (fd >= 0)
{
fhandler_mqueue *fh = fd->is_mqueue ();
if (!fh)
set_errno (EBADF);
else
ret = fh->mq_timedsend (ptr, len, prio, abstime);
}
return ret;
}

Expand All @@ -289,11 +301,14 @@ mq_timedreceive (mqd_t mqd, char *ptr, size_t maxlen, unsigned int *priop,
int ret = -1;

cygheap_fdget fd ((int) mqd, true);
fhandler_mqueue *fh = fd->is_mqueue ();
if (!fh)
set_errno (EBADF);
else
ret = fh->mq_timedrecv (ptr, maxlen, priop, abstime);
if (fd >= 0)
{
fhandler_mqueue *fh = fd->is_mqueue ();
if (!fh)
set_errno (EBADF);
else
ret = fh->mq_timedrecv (ptr, maxlen, priop, abstime);
}
return ret;
}

Expand All @@ -309,14 +324,14 @@ mq_close (mqd_t mqd)
__try
{
cygheap_fdget fd ((int) mqd, true);
if (!fd->is_mqueue ())
{
set_errno (EBADF);
__leave;
}

if (mq_notify (mqd, NULL)) /* unregister calling process */
__leave;
if (fd < 0 || !fd->is_mqueue ())
{
set_errno (EBADF);
__leave;
}

if (mq_notify (mqd, NULL)) /* unregister calling process */
__leave;

fd->isclosed (true);
fd->close ();
Expand Down
24 changes: 24 additions & 0 deletions winsup/cygwin/release/3.5.6
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Fixes:
------

- Fix a regression in 3.5.5 when checking for execute permissions in
execve(2) and access(2).
Addresses: https://cygwin.com/pipermail/cygwin/2024-December/256972.html

- Fix a regression since 3.5.0 which fails to use POSIX semantics in
unlink/rename on NTFS.

- Add fd validation where needed in mq_* functions.
Addresses: https://cygwin.com/pipermail/cygwin/2025-January/257090.html

- Fix regression in 3.5.5 which causes process hangs.
Addresses: https://cygwin.com/pipermail/cygwin/2024-December/256954.html
Addresses: https://cygwin.com/pipermail/cygwin/2024-December/256971.html
Addresses: https://cygwin.com/pipermail/cygwin/2025-January/257058.html
Addresses: https://cygwin.com/pipermail/cygwin/2024-December/256987.html

- Minor updates to load average calculations.
Addresses: https://cygwin.com/pipermail/cygwin/2024-August/256361.html

- Fix mq_unlink().
Addresses: https://cygwin.com/pipermail/cygwin/2025-January/257119.html
27 changes: 20 additions & 7 deletions winsup/cygwin/sec/base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -603,25 +603,38 @@ check_access (security_descriptor &sd, GENERIC_MAPPING &mapping,
int
check_file_access (path_conv &pc, int flags, bool effective)
{
int ret = -1;
ACCESS_MASK desired = 0;
OBJECT_ATTRIBUTES attr;
IO_STATUS_BLOCK io;
NTSTATUS status;
HANDLE h = NULL;
ULONG opts = 0;
int ret = -1;

if (flags & R_OK)
desired |= FILE_READ_DATA;
if (flags & W_OK)
desired |= FILE_WRITE_DATA;
if (flags & X_OK)
desired |= FILE_EXECUTE;

/* For R_OK and W_OK we check with FILE_OPEN_FOR_BACKUP_INTENT since
we want to enable the full power of backup/restore privileges.
For X_OK, drop the FILE_OPEN_FOR_BACKUP_INTENT flag. If the caller
holds SE_BACKUP_PRIVILEGE, FILE_OPEN_FOR_BACKUP_INTENT opens the file,
no matter what access is requested.
For directories, FILE_OPEN_FOR_BACKUP_INTENT flag is always required. */
if (!(flags & X_OK) || pc.isdir ())
opts = FILE_OPEN_FOR_BACKUP_INTENT;
else /* For a regular file to be executable, it must also be readable. */
desired |= FILE_READ_DATA;

if (!effective)
cygheap->user.deimpersonate ();

OBJECT_ATTRIBUTES attr;
pc.init_reopen_attr (attr, pc.handle ());
NTSTATUS status;
IO_STATUS_BLOCK io;
HANDLE h;
status = NtOpenFile (&h, desired, &attr, &io, FILE_SHARE_VALID_FLAGS,
FILE_OPEN_FOR_BACKUP_INTENT);

status = NtOpenFile (&h, desired, &attr, &io, FILE_SHARE_VALID_FLAGS, opts);
if (NT_SUCCESS (status))
{
NtClose (h);
Expand Down
Loading