Commit Graph

794 Commits

Author SHA1 Message Date
Ivan Leo Puoti f0db7ab06b Added FSCTL_PIPE_LISTEN support. 2005-09-06 14:09:42 +00:00
Eric Pouech b3badc7dd3 - rewrite kernel32:{Set|Get}PriorityClass on top of ntdll equivalent
- priority for process in wineserver is now the NTDLL form (no longer
  the kernel32 one)
2005-09-06 10:25:11 +00:00
Alexandre Julliard f62f6e8fe1 Don't cache file descriptors open on removable devices. 2005-08-24 18:33:50 +00:00
Alexandre Julliard 38502f70eb Added a separate set_handle_cached_fd request instead of abusing
set_handle_info for that.
2005-08-23 18:43:50 +00:00
Alexandre Julliard 1b2adad892 Don't try to detach from a thread that is exiting, to avoid triggering
a kernel race condition.
2005-08-22 10:13:28 +00:00
Alexandre Julliard 9d99a04880 Added a watchdog mechanism to break out of the wait4 call in case it
didn't return properly (can happen at thread exit).
2005-08-19 14:01:43 +00:00
Alexandre Julliard 3f31a10d01 Avoid a crash in find_hardware_message_window when there's no
foreground input.
2005-08-16 19:58:12 +00:00
Alexandre Julliard 4ebd2fc0ff Better handling of conflicting section information between
SizeOfRawData and VirtualSize.
2005-08-15 14:50:06 +00:00
Mike McCormack e659f1e60c Fix some gcc 4.0 warnings. 2005-08-09 10:37:50 +00:00
Alexandre Julliard b0e091acbf The temp buffer always stores WCHARs, fixed its type and got rid of a
number of casts.
2005-08-09 10:36:45 +00:00
Alexandre Julliard 964815bc42 Added an unmount_device request that invalidates all file descriptors
open on a given Unix device.
2005-08-08 15:11:03 +00:00
Alexandre Julliard 49b7fdcfc0 Removed the broken mmap64 configure check, and moved the
_FILE_OFFSET_BITS define to wine/port.h. Made sure that all files that
need the define include it.
2005-08-03 21:25:10 +00:00
Alexandre Julliard d4325152db Added a separate device object to keep track of inodes that are on the
same device.
2005-07-30 19:09:43 +00:00
Alexandre Julliard 830d1edb9d Automatically generate the list of error names in make_requests. 2005-07-29 14:49:05 +00:00
Alexandre Julliard b6c7677778 Removed a no longer used variable. 2005-07-29 14:41:40 +00:00
Alexandre Julliard f895ad180d Fixed a couple of error codes. 2005-07-29 14:41:14 +00:00
Alexandre Julliard c132542470 Renamed fd to unix_fd in the closed_fd structure to make the code a
bit clearer.
2005-07-28 10:48:57 +00:00
Alexandre Julliard 8197e0b07b Create the desktop class when needed without requiring a client
request.
2005-07-19 19:45:48 +00:00
Robert Shearman 91eaea53ae - Change the default user SID to match what was previously returned by
NtQueryInformationToken.
- Implement TokenUser for NtQueryInformationToken.
- Add a function for getting the user's registry path from a SID.
2005-07-18 13:22:55 +00:00
Robert Shearman 37773dda84 Make mailslots use as much of the default async fd implementation as
possible.
2005-07-14 12:18:05 +00:00
Alexandre Julliard 9ad5628639 Moved the server start time to the init_thread request and got rid of
the init_process request (based on a patch by Felix Nawothnig).
2005-07-14 10:32:46 +00:00
Alexandre Julliard 11ad6a0ac4 Return the startup info size in the init_thread request, and allocate
the process parameters structure in ntdll instead of kernel.
2005-07-13 19:43:35 +00:00
Robert Shearman fbf0ea9f18 Store the default DACL in the token. 2005-07-13 19:31:27 +00:00
Alexandre Julliard 4391be583e Get rid of the boot_done request. 2005-07-13 14:20:13 +00:00
Alexandre Julliard 0424f38169 Already initialize the process in the first init_thread request
instead of waiting for the init_process request.
2005-07-13 12:12:43 +00:00
Alexandre Julliard c976db1a03 Avoid potential crashes when there is no handle table. 2005-07-13 12:09:49 +00:00
Alexandre Julliard 01caa5e645 Moved the fields that depends on startup info from the init_process
request to get_startup_info.
2005-07-12 20:27:09 +00:00
Alexandre Julliard 6aa0cc5e3c Load the HKEY_CURRENT_USER branch at server startup too. 2005-07-11 20:44:59 +00:00
Alexandre Julliard 4a40b2eefb Store the global hooks table in the desktop object. 2005-07-11 18:05:50 +00:00
Alexandre Julliard 5ad90c0f37 Tie windows and thread input structures to a specific desktop.
Support multiple desktop windows (one per desktop object).
Use the window desktop to find the window station to use for property
atoms.
2005-07-11 13:30:23 +00:00
Alexandre Julliard 499e343d9f Export the winstation and desktop structures to avoid having to write
too many accessor functions.
2005-07-11 10:55:53 +00:00
Alexandre Julliard c3ac57dd86 Explicitly pass the winstation to the atom functions so that they can
be used even when current is not set.
2005-07-08 14:23:27 +00:00
Alexandre Julliard 8c518808b8 Put in place the basic infrastructure to allow supporting multiple
desktop windows.
2005-07-08 11:37:40 +00:00
Alexandre Julliard bb82cbb90b Convert the shared mapping list to a standard list. 2005-07-07 12:04:55 +00:00
Dmitry Timoshkov 86af38c8ca Make IsWindowUnicode work in the case when window belongs to another
process.
2005-07-07 12:02:31 +00:00
Alexandre Julliard 248f4b29fe Store the global atom table in the process window station. 2005-07-07 11:29:23 +00:00
Vitaliy Margolen b2e74c3047 Load all dll sections no matter what attributes say. 2005-07-02 10:50:42 +00:00
Alexandre Julliard 112228dfe3 Don't bother loading the config file anymore. 2005-07-01 19:26:07 +00:00
Alexandre Julliard 45128bdcdd Make the clipboard information local to the process window station. 2005-06-29 20:13:36 +00:00
Alexandre Julliard 36b85d02f6 Clear the process handle table before releasing it to avoid potential
problems with destructors trying to access handles.
2005-06-29 19:29:15 +00:00
Alexandre Julliard 92fec7b67a Keep track of the windows and hooks used by a thread to properly
refuse to change the thread desktop when it's in use.
2005-06-28 19:37:52 +00:00
Mike McCormack 390bc5f52f Don't include winbase.h when it's not necessary. 2005-06-21 09:46:15 +00:00
Robert Shearman 4bba21643c Add support for impersonating a token. 2005-06-20 13:18:38 +00:00
Mike McCormack 66e5ce3066 Remove unnecessary includes. 2005-06-20 10:35:36 +00:00
Robert Shearman 8cb3f92e53 - All versions of Windows ignore the access rights of the passed in
parent handle to RegCreateKey(Ex).
- Add a test that shows this.
2005-06-16 20:34:34 +00:00
Alexandre Julliard 5f22e7caf6 Remove the process locks in process_killed, not process_destroy. 2005-06-14 19:23:56 +00:00
Alexandre Julliard 0901b23206 Call the close_handle notification for all objects when releasing a
handle table.
2005-06-14 19:16:56 +00:00
Robert Shearman dacc3dbfa5 Fix size used to validate the sids in aces. 2005-06-14 19:15:58 +00:00
Robert Shearman f95ef09b8e Add TokenType attribute to specify whether the token is a primary or
impersonation token.
2005-06-14 18:10:04 +00:00
Mike McCormack cdcb203691 Call remove_process_locks when a process ends, fix declarations. 2005-06-14 11:40:40 +00:00
Robert Shearman 3795709344 Change code style of form "if( x )" to "if (x)" for consistency. 2005-06-10 19:54:46 +00:00
Alexandre Julliard 9b3b7caf2d Store the process along with the key handle in notifications. 2005-06-09 20:36:08 +00:00
Alexandre Julliard b9b1ea9c9f Added a close_handle method to the object operations, and use it to
implement registry notifications and the strange behavior of
CloseHandle on winstation/desktop handles.
2005-06-09 15:39:52 +00:00
Alexandre Julliard 78a3e63377 The desktop of a new thread should be set from the process initial
desktop, not from the parent thread.
Fixed a couple of bugs in the desktop name handling.
2005-06-09 12:07:12 +00:00
Robert Shearman 9b82644d00 - Avoid evil signed bitfields.
- Fix bug with using wrong revision in security_sid_alloc.
- Add all builtin groups present in the Administrator token on Windows
  to the default token.
2005-06-09 09:47:28 +00:00
Robert Shearman d681022d68 Fix a regression in the performance of named pipes by only making the
fd non-blocking when overlapped I/O is requested for the fd (reported
by Ivan Leo Puoti).
2005-06-09 09:46:55 +00:00
Mike McCormack c61580133d Include user.h in the new winstation.c to avoid a warning from
-Wmissing-declarations.
2005-06-09 09:43:54 +00:00
Robert Shearman e51dd36453 Implement overlapped I/O with named pipes. 2005-06-08 19:11:46 +00:00
Alexandre Julliard 1bf96e09a9 Beginnings of support for window stations and desktops. 2005-06-08 18:44:50 +00:00
Robert Shearman d6a4e34a60 - Add a default asynchronous I/O implementation.
- Make file objects use it.
2005-06-07 20:09:01 +00:00
Alexandre Julliard db412aaf60 Added a from_child parameter to the get_update_region request to allow
restarting the search from a given child, in order to avoid looping
forever on windows that don't repaint correctly.
2005-05-31 13:37:16 +00:00
Alexandre Julliard 50dc5a30e1 Crop the update region to the new window rectangle when resizing a
window.
2005-05-26 12:28:07 +00:00
Robert Shearman c516571481 - Use NULL instead of 0 for all non-handle pointers.
- Fix non-ANSI function declarations.
- Make a function static.
2005-05-25 18:41:09 +00:00
Robert Shearman 616b293e1d - Print commas between ACE's.
- Dump access masks from all ACE's.
2005-05-25 09:54:05 +00:00
Robert Shearman 4ad93416a8 Implement NtAccessCheck. 2005-05-24 12:32:18 +00:00
Robert Shearman 7bff35428b - Add new server type "struct security_descriptor".
- Add tracing for this new type.
2005-05-23 16:33:00 +00:00
Rob Shearman b4b7f05dc3 Fix several memory leaks. 2005-05-23 09:53:06 +00:00
Robert Shearman 2a782c65bd Add user attribute to token objects. 2005-05-16 17:52:46 +00:00
Alexandre Julliard 110c8dc54a Fixed a number of atom test failures. 2005-05-14 11:11:21 +00:00
Alexandre Julliard 55d449e476 Fixed another case where a mouse message could get assigned to a
different thread input.
2005-05-14 11:08:05 +00:00
Alexandre Julliard 90b48e93a3 Only set the new window of a hardware message if the window belongs to
the same thread input, otherwise just drop the message.
2005-05-13 14:00:19 +00:00
Alexandre Julliard 9e73cdde39 Allow passing a string to the window property server requests instead
of an atom to avoid redundant server round-trips.
2005-05-11 19:01:10 +00:00
Alexandre Julliard 4bef6770b6 Changed atom handling to use counted strings instead of
null-terminated ones, avoiding the need for a temporary buffer.
2005-05-11 18:25:27 +00:00
Alexandre Julliard 63342353bc Store a bitmap of active hooks on the client side to try to avoid
server calls for hooks that are not set.
2005-05-11 13:03:15 +00:00
Eric Pouech e6267369b2 - changed ATOM support in wineserver to match NTDLL needs
- adapted accordingly kernel32 atom support
2005-05-10 15:15:50 +00:00
Michael Stefaniuc d40517cb18 Change the type of 1 bit wide bitfields to unsigned. 2005-05-09 09:26:28 +00:00
Eric Pouech f479eef986 Fixed a wrong ops when creating named pipe client. 2005-05-09 09:25:45 +00:00
Alexandre Julliard 90af05f060 Treat 0xffff the same as 0 for the handle generation field to avoid
sign extension problems.
2005-05-07 15:03:00 +00:00
Robert Lunnon 43e4139db2 Include <sys/filio.h> on platforms that support it. 2005-05-07 12:14:18 +00:00
Robert Shearman b3957e3004 - Fix access rights for RegOpenKeyEx and RegCreateKeyEx calls.
- Add privilege checks for RegLoadKey, RegUnloadKey & RegSaveKey
  calls.
2005-05-05 16:57:55 +00:00
Mike McCormack abe70f7648 Implemented GetLastInputInfo. 2005-04-28 12:04:14 +00:00
Alexandre Julliard d70a253f40 Make sure a thread has a queue as soon as it creates a window. 2005-04-26 14:31:33 +00:00
Mike McCormack f92fff66a2 Implemented NtSignalAndWaitForSingleObject. 2005-04-24 17:35:52 +00:00
Robert Shearman d2ea92d14e - Clean up well-known privileges.
- Implement checking tokens for privileges in the server.
- Implement NtPrivilegeCheck.
2005-04-22 21:17:15 +00:00
Alexandre Julliard 3e2f2a5265 Allow nested hardware message processing by storing a unique id in
every message and using it to manage the current queue position.
Better filtering of hardware messages to avoid returning messages that
have no chance to match the filter.
2005-04-20 13:03:59 +00:00
Alexandre Julliard 27f0f8001e Load system.reg and userdef.reg at server init time. 2005-04-20 12:57:53 +00:00
Alexandre Julliard a4334a6b95 Cleaned up handling of 64-bit file sizes. 2005-04-19 11:59:13 +00:00
Eric Pouech 0a9f98b9bd Removed the no longer user APC_ASYNC kind of APC. 2005-04-18 15:38:44 +00:00
Eric Pouech 5a2591d96d - moved named pipe creation to ntdll
- server now handles the named pipe flags as the NTDLL values (not the
  KERNEL32 ones)
- named pipes in server now use the async IO mechanism for
  connect/wait ops
2005-04-18 14:57:04 +00:00
Mike McCormack d6fdac2676 Calculate the size of the next mailslot message correctly. 2005-04-11 16:11:32 +00:00
Raphael Junqueira 962a5e7742 Fix potential region leak. 2005-04-11 12:54:53 +00:00
Alexandre Julliard bc75f2f6c9 Return the coordinates information needed to setup the DC parameters
in the get_visible_region request instead of requiring the client to
compute it again.
2005-03-31 15:36:57 +00:00
Mike McCormack 2ab6a775bd Implement mailslots. 2005-03-30 19:02:15 +00:00
Alexandre Julliard eea706948a The update region passed in WM_NCPAINT and the clipping region passed
to GetDCEx have to be in screen coordinates.
2005-03-30 17:11:46 +00:00
Eric Pouech 7001d6ed34 Clean-up async IO internal functions. 2005-03-29 11:40:10 +00:00
James Hawkins 580ded65e7 - Implement NtLoadKey.
- Forward RegLoadKey to NtLoadKey.
2005-03-29 11:38:58 +00:00
Alexandre Julliard 4d32a475a8 Replace the link_window request by a set_parent request since that is
all link_window is used for at this point.
Get rid of the WIN_LinkWindow/UnlinkWindow functions.
2005-03-25 10:38:56 +00:00
Alexandre Julliard cb7aa8753c Added support for xbuttons. 2005-03-24 19:16:54 +00:00
Alexandre Julliard 0bc8377bc2 Create a new server request for accepting hardware messages instead of
abusing reply_message.
Allow passing the determined window for a hardware message back to the
server to have it redispatch the message to the correct thread.
2005-03-23 10:33:17 +00:00
Alexandre Julliard 5054c79880 Try to always keep the server window Z-order in sync with the X11 one
using a heuristic based on mouse and expose events.
2005-03-21 12:37:00 +00:00
Alexandre Julliard e3fe68926c Revert the previous change, this is not working right yet. 2005-03-17 20:51:53 +00:00
Alexandre Julliard f75609087a Make the server know about the visible area of a window, which is the
window rect minus the caption and borders when they are handled by the
window manager.
2005-03-17 19:10:41 +00:00
Alexandre Julliard 4e47afb36f Compute the top clipping window directly on the server side. 2005-03-17 14:02:06 +00:00
Alexandre Julliard 073d5f2b79 Queue hardware messages even if we don't find a window for them the
first time around.
2005-03-16 20:06:45 +00:00
Alexandre Julliard 705909ac09 Converted the window children lists to standard lists. 2005-03-16 19:54:33 +00:00
Alexandre Julliard cf2f14212a Avoid returning hardware messages if they have no chance to match the
filter.
2005-03-14 17:17:09 +00:00
Alexandre Julliard dcab706fa0 Get rid of the registry saving level hack.
Make periodic saving the default behavior.
2005-03-14 11:00:43 +00:00
Alexandre Julliard b9a9de6eb9 Clear the internal paint flag in the server before returning a
WM_PAINT message to avoid an extra server round-trip.
2005-03-10 17:19:33 +00:00
Alexandre Julliard 99615021fb Properly cope with get_message being called recursively while
processing a hardware message.
2005-03-10 11:52:25 +00:00
Peter Berg Larsen 514f432031 Tmp was not freed in case of errors in save_branch(). 2005-03-10 11:18:31 +00:00
Alexandre Julliard 1bc2caad02 Don't check children of minimized windows in get_update_region. 2005-03-09 11:49:46 +00:00
Ulrich Czekalla 5067909587 Create a thread-specific selection window to make sure we receive the
selection events in the correct thread.
2005-03-07 19:31:46 +00:00
Alexandre Julliard d6885fe7d4 Avoid potential crash when freeing a message queue.
Properly initialize newly allocated messages.
2005-03-05 10:51:35 +00:00
Steven Edwards 5727918424 Added a check for poll.h. 2005-03-04 12:38:36 +00:00
Alexandre Julliard a9e0fb1ba6 Convert the process dll list to a standard list. 2005-03-02 10:20:09 +00:00
Alexandre Julliard aa34768677 Convert the object wait queue to a standard list. 2005-03-01 11:49:58 +00:00
Francois Gouget 10e3d96617 Fix a race condition in create_dir(). 2005-03-01 11:00:06 +00:00
Alexandre Julliard 0502638ee1 Convert the per-process thread list to a standard list. 2005-03-01 10:56:18 +00:00
Alexandre Julliard efdb4960a2 Converted the debug event queue to a standard list. 2005-02-26 17:45:29 +00:00
Alexandre Julliard b2eff1ca01 Converted the global screen buffer list to a standard list. 2005-02-25 21:06:11 +00:00
Alexandre Julliard 8e3b072249 Replaced the message_list structure by a standard list. 2005-02-25 21:05:11 +00:00
Alexandre Julliard 73209eb73e Convert the global thread list to a standard list. 2005-02-25 19:33:35 +00:00
Alexandre Julliard 48c0d51dc3 Convert the global process list to a standard list. 2005-02-25 19:31:26 +00:00
Alexandre Julliard 20894e2ffb Convert the per-thread mutex list to a standard list. 2005-02-25 16:58:43 +00:00
Alexandre Julliard b1aad5d86f Regular files are always ready for I/O, no need to poll on them. 2005-02-25 14:02:20 +00:00
Alexandre Julliard 81b6a1fbe5 Convert the APC queues to use standard lists. 2005-02-25 14:01:40 +00:00
Alexandre Julliard 68abbc86e6 Convert the key notifications list to a standard list. 2005-02-24 19:43:53 +00:00
Alexandre Julliard dd81ac50a9 Convert async I/O queues to standard lists. 2005-02-24 17:06:31 +00:00
Alexandre Julliard 43b2826714 Removed no longer used create_region function, and directly export
create_empty_region instead.
2005-02-22 19:42:35 +00:00
Alexandre Julliard 548c973457 Allow the client rectangle to be of arbitrary size and dimensions,
regardless of the window rectangle.
2005-02-22 19:41:43 +00:00
Krzysztof Foltman b85017223f Ensure that caret position is not reset to (0, 0) when CreateCaret is
called second time with the same window.
2005-02-18 20:02:55 +00:00
Robert Shearman b0f02b28b9 - Implement AdjustTokenPrivileges, DuplicateTokenEx and
GetTokenInformation (for the TokenPrivileges case).
- Return STATUS_NO_TOKEN for OpenThreadToken when there is no token
  set for the thread.
2005-02-11 11:52:06 +00:00
Robert Shearman 795e9de806 Support WaitNamedPipe timeouts. 2005-02-08 12:54:23 +00:00
Robert Shearman 04995ce90d Don't overwrite last byte of the window structure as we might not have
allocated the memory for it if extrabytes was 0.
2005-02-08 12:07:48 +00:00
Dmitry Timoshkov 6dba0a7718 Add support for winevent hooks. 2005-02-03 16:40:20 +00:00
Alexandre Julliard ae661da49c Properly compute the client area valid rects and pass them to the
server in set_window_pos to avoid invalidating areas that remain
valid.
2005-02-03 13:40:12 +00:00
Alexandre Julliard 7c1cf8f009 Fixed refcount handling (waiting clients must not increase the
refcount of the pipe).
Converted linked lists to use the standard functions.
Small cleanups.
2005-02-03 10:48:23 +00:00
Alexandre Julliard 52e5ac5e41 Make sure leaked objects are printed even if a file descriptor is
still open.
2005-02-03 10:46:15 +00:00
Alexandre Julliard e432d54fd7 Fixed potential crash in fd_dump function. 2005-02-03 10:45:18 +00:00
Dmitry Timoshkov ed04d36b5d Add more tests for old style hooks and winevent hooks, make them pass
under Wine.
2005-01-27 11:14:19 +00:00
Eric Pouech 4634447d6b - got rid of include/async.h
- fixed some overlapped issues in socket handling
- moved kernel32.CancelIo implementation to ntdll
2005-01-14 19:54:38 +00:00
Alexandre Julliard 56206376b8 Desktop window is repainted on WM_ERASEBKGND, it must never get a
WM_PAINT.
2005-01-11 15:15:11 +00:00
Alexandre Julliard 646ab89f0a Support mapping non page-aligned binaries for SEC_IMAGE mappings. 2005-01-04 12:04:06 +00:00
Rein Klazes 5dc91e6c08 A starting process must obey the STARTF_USESTDHANDLES flag and use the
standard io handles from the StartupInfo structure, even if it is
starting a new console.
2004-12-15 10:47:23 +00:00
Robert Shearman 7572b125b5 Implement NtQueryTimer. 2004-12-13 21:10:58 +00:00
Alexandre Julliard 5defa49979 Moved update region handling to the server. 2004-12-07 17:31:53 +00:00
Eric Pouech 294835a839 Another round of const correctness fixes. 2004-12-06 20:43:55 +00:00
Peter Chapman 505dfdefb5 Fix up several inline assembler blocks so that they produce correct
code with the -fomit-frame-pointer gcc flag.
2004-12-02 18:19:25 +00:00
Eric Pouech 44158dd690 - moved event, semaphore, mutex implementation from kernel32 to ntdll
- added mutant implementation in ntdll, and use it for mutex
  implementation in kernel32
- added access parameter on event, semaphore, timer creation in
  wineserver (as ntdll interface requires it)
- added missing definitions in include/winternl.h
2004-12-02 18:05:37 +00:00
Eric Pouech 0a258964c2 Const correctness fixes. 2004-11-30 21:38:57 +00:00