Commit graph

161 commits

Author SHA1 Message Date
Eric Kohl 033b6639e4 [DHCPCSVC] Make the DHCP client service stoppable
- Make all threads (pipe thread, adapter discovery thread and dispatcher thread) wait on the stop event.
- Close shared resources in the main (dispatcher) thread after the pipe thread and the adapter discovery thread have shut down.

This enables us to stop and restart the DHCP client properly.

CORE-14390
2021-08-08 14:10:25 +02:00
Timo Kreuzer 41bc57ddf0 [REACTOS] Silence warnings in 3r-party code 2021-07-23 22:03:48 +02:00
Timo Kreuzer 5d8e834897 [REACTOS] Fix a number of MSVC warnings 2021-07-23 22:03:48 +02:00
Eric Kohl 13073e1acb [UMPNPMGR] PNP_GetDeviceStatus: Add status checks as documented in MS-PNPR
CORE-17527
2021-06-22 00:02:56 +02:00
Eric Kohl 830e15b622 [UMPNPMGR] Add missing parameter checks to PNP_GetDeviceStatus 2021-06-21 21:33:24 +02:00
Eric Kohl 2047cf3613 [DHCPCSRV] Send an ARP request to check if an automatic private address is available 2021-05-24 15:18:58 +02:00
Eric Kohl 894cc4ac0c [dnsapi][dnsrslvr] Implement DnsFlushResolverCacheEntry_A/_UTF8/_W 2021-05-24 14:43:30 +02:00
Eric Kohl 0f27609813 [UMPNPMGR] Fix DPRINT in PNP_GetDeviceStatus() 2021-04-24 17:06:08 +02:00
Eric Kohl b24f463a33 [UMPNPMGR] Start the device in SetupDeviceInstance 2021-04-24 17:04:11 +02:00
Eric Kohl d5b20cb118 [UMPNPMGR] Implement PNP_SetDeviceProblem
CORE-17527
2021-04-24 11:59:22 +02:00
Hervé Poussineau 1ff3d1c395 [DHCPCSVC] Change automatic address assignment to use hardware address
According to RFC 3927, the pseudo-random number generation algorithm MUST be chosen
so that different hosts do not generate the same sequence of numbers, and that the
pseudo-random number generator SHOULD be seeded using a value derived from the
IEEE 802 MAC address, so that a host will usually select the same IPv4 Link-Local
address each time it is booted.
2021-04-20 18:28:36 +02:00
Victor Perevertkin 74ec94e12c [CMAKE] Some options are only supported by GCC, don't use them for clang
These are (so far):
-Wno-format-overflow
-Wno-nonnull-compare
-Wno-old-style-declaration
-Wno-unused-but-set-variable
2021-04-09 03:58:19 +03:00
Mark Jansen 5028c3adec
[UMPNPMGR] Fix remaining length calculation 2021-04-03 01:43:48 +02:00
Victor Perevertkin 16173c0798
[UMPNPMGR] Fix GCC build
Addendum to 420c4a7abf
2021-03-19 09:14:05 +03:00
Victor Perevertkin 420c4a7abf
[UMPNPMGR] Install drivers for all devices available on boot
Don't wait for their events to appear, just retrieve the list and
install drivers. This fixes the installation of manually reported device
nodes

CORE-17212 CORE-17398
2021-03-19 08:59:42 +03:00
Victor Perevertkin abbc5ba45a
[UMPNPMGR][USETUP] Use PlugPlayControlStartDevice in usetup and umpnpmgr
Instead of PlugPlayControlResetDevice, PlugPlayControlStartDevice should
be used for a newly installed device.
For usetup, add a device status check before starting attempt, so we're
not touching devices which are already started.

CORE-17463 CORE-17490
2021-03-16 03:17:58 +03:00
Victor Perevertkin 029accdcf7
[NDK] Change the data structure for PlugPlayControlResetDevice control class
PlugPlayControlResetDevice shares the input structure with several other
control classes.
Source: ProcessHacker sources e9c8121f41/ntpnpapi.h
2021-03-16 03:17:42 +03:00
Victor Perevertkin fc2b105e5d
[CMAKE] Use remove_target_compile_option when disabling manually enabled warnings 2021-03-03 06:04:25 +03:00
Eric Kohl 95188553ba [WKSSVC] Get version info and authentication package on startup 2021-02-27 19:07:47 +01:00
Eric Kohl 87a4624e20 [WKSSVC][NETAPI32] Implement NetrWkstaGetInfo and get rid of the old NetWkstaGetInfo implementation 2021-02-13 23:19:29 +01:00
Victor Perevertkin ff13301eb2
[UMPNPMGR] Set the data type in all cases of PNP_GetDeviceRegProp
CORE-14187
2020-12-06 19:48:38 +03:00
Hervé Poussineau b483be4af2 [UMPNPMGR] Remove invalid prototype of inline function
This fixes eede1b9b7a.
2020-12-01 18:51:42 +01:00
Jérôme Gardou ab825334dd Apply suggestions from code review
Beautification and clarity

Co-authored-by: Victor Perevertkin <victor@perevertkin.ru>
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2020-10-20 21:44:54 +02:00
Jérôme Gardou c004b53d77 Apply suggestions from code review
Style fixes

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
Co-authored-by: Victor Perevertkin <victor@perevertkin.ru>
2020-10-20 21:44:54 +02:00
Jérôme Gardou 00ed72d7e8 [CMAKE] Get rid of add_compile_flags
Use add_compile_options and the like instead
2020-10-20 21:44:54 +02:00
Jérôme Gardou 7e116f0ef3 [CMAKE] Get rid of replace_compile_flags
Introduce a finer-grained remove_target_compile_option instead
2020-10-20 21:44:54 +02:00
Hermès Bélusca-Maïto ffc96d26ec
[UMPNPMGR][USETUP] Fix the way device-install events are queued and dequeued. Fixes CORE-16103.
Dedicated to the hard work of Joachim Henze! xD

This reverts part of commit 043a98dd (see also commit b2aeafca).

Contrary to what I assumed in commit 043a98dd (and was also assumed in
the older commit b2aeafca), we cannot use the singled-linked lists to
queue and dequeue the PnP device-install events, because:

- the events must be treated from the oldest to the newest ones, for
  consistency, otherwise this creates problems, as shown by e.g. CORE-16103;

- the system singled-linked lists only offer access to the top of the
  list (like a stack) instead of to both the top and the bottom of the
  list, as would be required for a queue. Using the SLISTs would mean
  that only the newest-received events would be treated first, while the
  oldest (which were the first received) events would be treated last,
  and this is wrong.

Therefore one must use e.g. the standard doubly-linked list. Also, using
locked operations (insertion & removal) on the list of device-install
events is necessary, because these operations are done concurrently by
two different threads: PnpEventThread() and DeviceInstallThread().
Since the interlocked linked list functions are not available in user-mode,
we need to use instead locking access through e.g. a mutex.
2020-10-01 01:52:09 +02:00
Serge Gautherie 98bbe8358c
[REACTOS] Fix GetTokenInformation() usage (#2997)
The first call to GetTokenInformation is used to determine the size of a TokenInformation buffer.
It should fail and return ERROR_INSUFFICIENT_BUFFER
2020-07-21 15:39:11 +03:00
Serge Gautherie b509658280
[CMAKE] Remove obsolete 'CMAKE_CXX_COMPILER_VERSION' checks (#2981)
Following upgrade to RosBE 2.2.0 support and GCC 8.4.
2020-07-18 15:37:29 +02:00
Serge Gautherie 353b544047 [AUDIOSRV] logmsg(): Disable its file part
Mininal workaround for
CORE-16814
2020-07-11 01:22:56 +02:00
Mark Jansen 6859348aea
[SVCHOST] Fix PSID initialization
CORE-17151
2020-07-04 19:39:06 +02:00
Oleg Dubinskiy dcc5dd2a69
[SDK][SVCHOST] Move all global svchost declarations to public header.
Also update the includes.
It will allow to use those declarations globally where they are required (e. g. for SvchostPushServiceGlobals functions in some services).
No functional changes.
2020-06-27 14:54:22 +02:00
Joachim Henze 1b8b339aae [DNSRSLVR] Define NDEBUG in cache.c
To avoid leaking private data into logs by default.
Some testers may consider their DNS-suffix private data.
And DnsIntCacheAddEntry() logs that via Record->pName.
2020-06-14 20:03:33 +02:00
Amine Khaldi 139a3d6661
[CMAKE] Implement PCH builds with target_precompile_headers. CORE-16905 2020-06-06 21:58:41 +03:00
Serge Gautherie 1e861d9759
[NFSD] readdir_copy_shortname(): Add needed brackets to '*name_size_out' (#2856)
CORE-17078
2020-06-06 18:21:05 +02:00
Eric Kohl 505b9f8052 [SCHEDSVC] Implement the job start time calculation for given days of month 2020-05-31 22:33:49 +02:00
Eric Kohl d70c64bde0 [SCHEDSVC] Fix the job start time calculation for given days of week. 2020-05-31 15:49:22 +02:00
Serge Gautherie 11345aedd8
[FORMATTING] [CMAKE] Remove space in 'if (' (#2847) 2020-05-26 20:24:02 +02:00
Eric Kohl 1b90e54242 [BROWSER] Add the browser service 2020-05-21 22:49:33 +02:00
Eric Kohl 80b139d726 [UMPNPMGR] Start work on PNP_GetNextResDes() 2020-05-21 21:51:06 +02:00
Eric Kohl 38494d0997 [UMPNPMGR] Improve some debug messages 2020-05-20 19:56:30 +02:00
Katayama Hirofumi MZ fe9838f578
[SERVICES][DCOMLAUNCH] Don't hardcode C: drive (#2779)
CORE-13235
2020-05-17 17:45:56 +09:00
Eric Kohl 4246b64dcb [UMPNPMGR] Implement PNP_GetFirstLogConf and PNP_GetNextLogConf (WIP)
- PNP_GetFirstLogConf only works for resources lists.
- PNP_GetNextLogConf does not return a valid tag yet.
2020-05-10 20:46:41 +02:00
Thomas Faber 5a5ba1ad10
[SHSVCS] Don't call UnregisterWait from within the wait callback.
Doing this causes deadlocks, the process runs out of worker threads and
the system runs out of memory by allocating too many I/O completion ports
when using ntdll.dll from Windows.
2020-04-22 12:37:26 +02:00
Victor Perevertkin 7e069ccdb2
[CMAKE] Replace custom functions to built-in ones
add_target_compile_definitions -> target_compile_definitions
add_target_compile_flags -> target_compile_options
add_target_include_directories -> target_include_directories
2020-04-16 15:59:38 +03:00
Hermès Bélusca-Maïto 622c7ed609
[W32TIME][BOOTDATA] Export SvchostEntry_W32Time() as an alias to W32TmServiceMain, and use the former as the service entry point specified in the registry, for Windows compatibility. 2020-04-09 23:22:40 +02:00
Serge Gautherie 2712762538
[UMPNPMGR] rpcserver.c: Fix debug message copypastas (#2426)
Addendum to db02f87d.
2020-03-09 16:00:53 +01:00
Eric Kohl b39c55e5d2 [UMPNPMGR] Implement PNP_DisableDevInst() 2020-03-08 10:36:02 +01:00
Eric Kohl db02f87d7b [UMPNPMGR] Fix indentation and improve debug messages 2020-03-08 10:30:25 +01:00
Eric Kohl c11491b750 [UMPNPMGR] Improve PNP_DeviceInstanceAction
- Rename parameters according to [MS_PNPR] (no longer available for download).
- Remove unsupported PNP_DEVINST_MOVE and PNP_DEVINST_DISABLE actions.
- Implement most of the PNP_DEVINST_SETUP action.
2020-02-23 10:44:43 +01:00