Commit graph

52 commits

Author SHA1 Message Date
Johannes Anderwald 994dea8d8a - Add more error checks
svn path=/trunk/; revision=39438
2009-02-06 12:18:47 +00:00
Christoph von Wittich ab81d30c29 add a missing Status to ScmRpcStatusToWinError
svn path=/trunk/; revision=39437
2009-02-06 11:49:21 +00:00
Christoph von Wittich ead9dcbd31 add some more error checking
svn path=/trunk/; revision=39434
2009-02-06 08:51:51 +00:00
Johannes Anderwald d54988a73d - Ignore lpResult parameter
svn path=/trunk/; revision=39421
2009-02-05 20:19:32 +00:00
Johannes Anderwald c6c028fe41 - Add more error checks which reduce winetest errors
svn path=/trunk/; revision=39419
2009-02-05 19:13:35 +00:00
Johannes Anderwald 80187e8d4e - Improve error checking
svn path=/trunk/; revision=39413
2009-02-05 17:22:59 +00:00
KJK::Hyperion 138dcb0ad3 modified dll/win32/advapi32/sec/lsa.c
modified   dll/win32/advapi32/service/eventlog.c
modified   dll/win32/advapi32/service/scm.c
modified   dll/win32/advapi32/service/sctrl.c
modified   dll/win32/setupapi/cfgmgr.c
   Use RPC exception handling macros consistently

svn path=/trunk/; revision=38620
2009-01-07 09:44:21 +00:00
Christoph von Wittich 38418a1b4c -don't cast const char to char
-handle RPC_X_ENUM_VALUE_OUT_OF_RANGE and RPC_X_BYTE_COUNT_TOO_SMALL in ScmRpcStatusToWinError
-add some traces
-don't write to NULL pointers, don't do strlen on a NULL pointer

svn path=/trunk/; revision=38603
2009-01-06 07:53:04 +00:00
Stefan Ginsberg 32545494d9 - Go away STDCALL, time has come for WINAPI and NTAPI
svn path=/trunk/; revision=37763
2008-11-30 11:42:05 +00:00
Michael Martin 9bd1f294f3 - Migrate advapi32 to PSEH 2.0.
svn path=/trunk/; revision=37656
2008-11-26 10:45:42 +00:00
Eric Kohl e4bbc4a8bf Pass machine name to RpcStringBindingComposeA/W properly.
svn path=/trunk/; revision=37117
2008-10-31 22:21:34 +00:00
Eric Kohl e28588b48a ERR -> TRACE
svn path=/trunk/; revision=37007
2008-10-26 22:57:31 +00:00
Eric Kohl 725ff32421 Service Manager:
- Get rid of the globally created binding handle and use the WIDL-generated custom binding handles and context handles instead.

The other RPC interfaces will be converted as soon as possible.

svn path=/trunk/; revision=36991
2008-10-26 15:11:28 +00:00
Eric Kohl c22ad7e659 Service Manager:
- Fix declaration of SERVICE_STATUS_HANDLE in the PSDK.
- Add a new custom binding handle to svcctl.idl as an alias of SERVICE_STATUS_HANDLE.
- Enable all custom binding handles in svcctl.idl and fix services.exe and advapi32.dll accordingly.

svn path=/trunk/; revision=36985
2008-10-26 12:33:36 +00:00
Eric Kohl e7b8601c22 Fix lock handle typecasts.
svn path=/trunk/; revision=36540
2008-09-26 20:25:47 +00:00
Eric Kohl 2cbfa7cb91 EnumDependentServicesA/W and EnumServicesStatusA/W don't fix up pointers if the service manager returns an error.
This fixes bug #3737.
Patch by Michael Martin aka bugboy <martinmnet@hotmail.com>.


svn path=/trunk/; revision=36383
2008-09-21 15:19:52 +00:00
Christoph von Wittich 3415a605e5 this hack wasn't supposed to be committed
svn path=/trunk/; revision=36375
2008-09-21 13:05:48 +00:00
Christoph von Wittich 8ff60114b6 sync msxml3 with wine 1.1.5
svn path=/trunk/; revision=36374
2008-09-21 13:03:20 +00:00
Eric Kohl b3bb873fd3 Implement I_ScSetServiceBitsA/W and SetServiceBits.
svn path=/trunk/; revision=36200
2008-09-13 20:04:51 +00:00
Christoph von Wittich 81bc975c28 add missing HandleBind() calls
svn path=/trunk/; revision=36138
2008-09-11 16:48:42 +00:00
Eric Kohl 46cc92b9b6 QueryServiceConfig2A/W: Add more parameter checks. Fixes 3 winetest failures.
svn path=/trunk/; revision=35770
2008-08-29 22:31:54 +00:00
Eric Kohl 532fd2c7b0 - QueryServiceConfig2A/W: Fail if lpBuffer is NULL but cbBufSize is not 0.
- RChangeServiceConfigW: Update the display name if it has been changed.
- RQueryServiceConfigW: Return pointers to empty strings instead of NULL pointers if information is not available.
- RQueryServiceConfig2W: Fail if lpBuffer is NULL.
- Implement RChangeServiceConfigA, RQueryServiceConfigA and RQueryServiceConfig2A.

Patch is based on bug report #3669 by bugboy <marinmnet@hotmail.com>.

svn path=/trunk/; revision=35752
2008-08-29 11:15:53 +00:00
Eric Kohl b1d48577f8 - GetServiceDisplayNameA/W and GetServiceKeyNameA/W: Fix returned name size.
- RGetServiceDisplayNameW: Return the service name if the display name is not available.
- Implement RGetServiceDisplayNameA and RGetServiceKeyNameA.

svn path=/trunk/; revision=35748
2008-08-29 10:01:06 +00:00
Eric Kohl 866b97d444 SEH-protect all calls to remote functions.
Based on patches from Bug #3669 by bugboy <martinmnet@hotmail.com>.

svn path=/trunk/; revision=35605
2008-08-24 18:27:17 +00:00
Eric Kohl 413b6d969f Hack the declaration of RQueryServiceConfigA. This hack has already been applied to RQueryServiceConfigW.
Based on patches from Bug #3669 by bugboy <martinmnet@hotmail.com>.

svn path=/trunk/; revision=35604
2008-08-24 18:08:17 +00:00
Ged Murphy 5032762531 - dependencies is a double terminated string array
- patch by bugboy <martinmnet at hotmail dot com>

svn path=/trunk/; revision=34729
2008-07-24 07:57:20 +00:00
Ged Murphy ee13626507 - fix the length of the dependencies string
- spotted by bugboy <martinmnet at hotmail dot com>

svn path=/trunk/; revision=34634
2008-07-21 11:43:55 +00:00
Johannes Anderwald 502222bd4c - fix typo in CreateServiceA
- bug found by Michael martinmnet at hotmail dot com (IRC: bugboy)

svn path=/trunk/; revision=33728
2008-05-27 08:54:07 +00:00
Hervé Poussineau 8163d0f36b Replace ERR() by WARN() on error codes which can be normal
svn path=/trunk/; revision=33584
2008-05-18 15:26:24 +00:00
Hervé Poussineau bf17b94f76 Use R- prefix instead of Scmr- prefix for service RPC calls
svn path=/trunk/; revision=32908
2008-04-10 16:39:01 +00:00
Hervé Poussineau 4e1f93f6eb Make service RPC interface more compatible with MS Windows
svn path=/trunk/; revision=32906
2008-04-10 14:49:04 +00:00
Aleksey Bragin f190c5ef68 Kamil Hornicek <tykef@atlas.cz>
- Convert advapi32 to use wine-style debug macros.

svn path=/trunk/; revision=32222
2008-02-08 17:04:39 +00:00
Christoph von Wittich ea6661ca60 only allocate a buffer in StartServiceA when dwNumServiceArgs > 0
adjust the image path in services/rpcserver

svn path=/trunk/; revision=31761
2008-01-13 14:22:55 +00:00
Christoph von Wittich 0a1860718e fix a bug in CreateServiceA
svn path=/trunk/; revision=31757
2008-01-13 13:33:28 +00:00
Hervé Poussineau b3fad2a219 Change service interface too
svn path=/trunk/; revision=31003
2007-12-04 17:21:46 +00:00
Ged Murphy b7d1b4a8f8 - Send the SERVICE_STATUS_HANDLE to the SCM so SetServiceStatus has something to work with
- Add control code to stop, pause and resume services and forward it onto the service control handler

svn path=/trunk/; revision=29005
2007-09-11 12:59:38 +00:00
Ged Murphy dae207d99a Fix the client side of the ChangeServiceConfig2 RPC call to send the text in the lpDescription pointer of SERVICE_DESCRIPTION tagged onto the end of the struct.
This fixes setting service descriptions

svn path=/trunk/; revision=28913
2007-09-07 10:52:43 +00:00
Hervé Poussineau 3bf2d78767 Forward RegisterEventSourceW and DeregisterEventSource to eventlog service
svn path=/trunk/; revision=28337
2007-08-14 08:49:29 +00:00
Ged Murphy 87bd668b8c fix the startup event name as per r27697
svn path=/trunk/; revision=27698
2007-07-16 17:48:57 +00:00
Ged Murphy e9982e936f fix SetServiceStatus to now call ScmrSetServiceStatus to set the service data
svn path=/trunk/; revision=27566
2007-07-10 14:54:30 +00:00
Ged Murphy 843b40c7ad - ensure SetLastError is called when EnumServicesStatusEx is returning required buffer sizes
- servman.exe now lists all ReactOS services

svn path=/trunk/; revision=27423
2007-07-06 13:53:29 +00:00
Ged Murphy f18c692bc2 turn debugging off
svn path=/trunk/; revision=26862
2007-05-22 10:17:07 +00:00
Aleksey Bragin 149c5b1cae - Revert rpcrt4 update, too buggy for now. My apologizes.
svn path=/trunk/; revision=26792
2007-05-15 12:12:42 +00:00
Alex Ionescu c39989df1b - Fix SleepEx.
- Put volatile statements in EX_RUNDOWN_REF, IRP, DEVICE_OBJECT, ERESOURCE, FILE_OBJECT, IO_REMOVE_LOCK, WORK_QUEUE_ITEM where required (thanks to Microsoft's changes in the WDK to mark the fields properly).
- Update FILE_OBJECT definition.
- Add some asserts to some I/O functions.
- Add stub support for File Objects created by XP+ Drivers which have File Object Extensions.
- Add some fixes to IopDeleteFile, including proper reference counting for the DO and VPB, as well as cleanup when the file is closed without a handle.
- Fix a bug in IopSecurityFile.
- Queue and unqueue IRPs in all I/O functions.
- Fully support IRP cancellation now.
- Fix critical bugs in NtDeviceIoControlFile and NtDeviceFsControlFile which were causing double queueing of IRPs and freeing of invalid memory, as well as invalid paramter checking for user-mode buffers.
- Add exhaustive validation checks to IoCreateFile, add more failure cases, and validate the EA buffer. Also support IO_ATTACH_DEVICE_API flag.
- Implement IoCreateStreamFileObjectEx and IoCreateStreamFileObjectLite and fix several bugs in the original implementation of IoCreateStreamFileObject.
- Fix a bug in RtlRaiseException.
- Update Io*ShareAccess routines to support XP+ style semantics related to special File Object flags which disable their use.
- Add validation to all Query/Set routines so that information clasess, lengths, buffers and alignment are properly checked.
- Also add an array for the proper acess rights that each query/set operation requires.
- Check backup/restore privileges during I/O File operations.
- Check traverse access during I/O File Operations.
- Check access privileges to the device during I/O file operations.
- Rename IopReferenceDeviceObject and also verify if an exclusive DO is trying to be invalidly opened.
- Support various extra security checks during I/O File/Device Parse Routine.
- Fix a bug during IopCleanupIrp so that we don't dereference the File OBject if this was a create operation.
- Fix some bogus asserts in IofCompleteRequest, and save the IRP Flags before signalling it's event, since the driver might've freed it behind our back.
- Fix a large bug in ObInsertObject which affected the insert of unnamed objects with forced security options (Such as process/threads).
- Fix the creation of the Process/Thread/Job Obejct Types to that security information is forced.
- Remove "Fix PS!!!" messages since the bug is now fixed and these objects now get proper security descriptors.
- Fix another bug in ObInsertObjet which wasn't properly validating user-mode objects and always assumed kernel mode.
- Silence multiple trace/checkpoint messages that have accumulated throughout time for various debugging purposes.

svn path=/trunk/; revision=25118
2006-12-10 18:40:30 +00:00
Eric Kohl 99e4b3809f - fix indentation and remove trailing whitespace
- StartServiceA/W: terminate argument buffer with a double zero.

svn path=/trunk/; revision=23801
2006-08-30 10:53:37 +00:00
Eric Kohl 4d64dd44c6 - Implement ScmStartServiceA and revert the last modification of StartServiceA.
- Fix EnumServicesStatusExW.

svn path=/trunk/; revision=23521
2006-08-07 22:13:26 +00:00
Hervé Poussineau 30c988c9be Call ScmrStartServiceW in StartServiceA to prevent code duplicating between ScmrStartServiceA/W in services.exe
svn path=/trunk/; revision=23519
2006-08-07 17:04:48 +00:00
Magnus Olsen 3f9f57f91e 1. revert my last changes to this file
2. Did solv the heapfree null check with if statement

svn path=/trunk/; revision=22733
2006-06-30 22:26:19 +00:00
Magnus Olsen 11963867d1 CreateServiceA
1. Do not try todo HeapFree when pointer is NULL in cleanup:
2. Remove goto cleanup code
3. Rewrote the code so it does not need goto 

 

svn path=/trunk/; revision=22732
2006-06-30 22:07:54 +00:00
Hervé Poussineau cabeb71d14 Don't try to allocate 0 byte (spotted by Alex Ionescu)
svn path=/trunk/; revision=22720
2006-06-30 17:38:12 +00:00