Commit Graph

296 Commits

Author SHA1 Message Date
Damian Dixon a9bbd7dc86 advapi32: Implement SetEntriesInAclA by calling SetEntriesInAclW. 2011-01-03 16:37:59 +01:00
André Hentschel b49e1c2994 advapi32/tests: Don't test function directly when reporting GetLastError(). 2011-01-03 11:54:06 +01:00
André Hentschel 92f9cb6c5d advapi32/tests: Don't test function directly when reporting GetLastError(). 2010-12-31 11:42:52 +01:00
Alexandre Julliard 5fc51fd10e advapi32/tests: Avoid sizeof in traces. 2010-11-17 15:07:47 +01:00
Austin Lund f18554c735 advapi32/tests: Fix test for WoW64 handle size differences. 2010-10-22 12:37:14 +02:00
Alexandre Julliard 53d810c9ad advapi32/tests: Make function pointers static and remove redundant typedefs. 2010-10-01 13:33:37 +02:00
Hans Leidekker 0cffcb77d6 advapi32: Fix handling of zero account and domain size parameters in LookupAccountSid. 2010-09-21 17:53:55 +02:00
Alexandre Goujon 2c127dd320 advapi32: Fix GetNamedSecurityInfo with NULL descriptor. 2010-08-24 17:57:41 +02:00
Marko Nikolic 29dd523505 advapi32/tests: Removed sign comparison warning in test_LookupAccountName. 2010-06-30 11:53:22 +02:00
Marko Nikolic ff08a68668 advapi32/tests: Replaced function lstrlen with strlen in condition check. 2010-06-29 13:28:58 +02:00
Marko Nikolic b8978553ad advapi32/tests Fixed test macro in ConvertSecurityDescriptorToString. 2010-06-21 12:20:31 +02:00
Marko Nikolic 3675a38447 advapi32/tests: Fixed -Wsign-compare warnings in security tests. 2010-06-21 12:20:27 +02:00
James Hawkins 621a772d48 advapi32: Fix a few memory leaks. Use the correct API to free SIDs (FreeSid). 2010-01-07 17:59:58 +01:00
Marcin Baczyński 005b9066f4 advapi32/tests: Remove superfluous void* cast. 2010-01-07 09:27:02 +01:00
Rob Shearman 190a11ddb6 advapi32: Fix memory leaks in security tests. 2009-12-02 16:08:53 +01:00
Rob Shearman 8bfc736561 advapi32: Don't test the contents of memory outside of a valid block of memory. 2009-12-02 16:08:52 +01:00
Austin Lund 5c45c35e4e advapi32/tests: Skip tests for ACL file info if ACL info not stored. 2009-11-18 15:15:45 +01:00
Paul Vriens bfa2479d4d advapi32/tests: Fix some test failures on NT4. 2009-11-17 15:14:53 +01:00
Paul Vriens 3912286aad advapi32/tests: Skip some tests on Win9x and WinMe. 2009-11-17 15:14:53 +01:00
Rob Shearman 1f3a14e767 advapi32: EqualSid should set last error to ERROR_SUCCESS. 2009-11-16 11:39:28 +01:00
Rob Shearman 3498a88179 advapi32: Add tests for EqualSid. 2009-11-16 11:39:24 +01:00
Rob Shearman 1802a5b9ba advapi32: Use a duplicate of the process token if a NULL token is passed into CheckTokenMembership and there is no thread token. 2009-11-11 10:56:03 +01:00
Rob Shearman 9b3b9a1060 advapi32: Fix CheckTokenMembership test on Windows. 2009-11-11 10:55:57 +01:00
Paul Vriens 77c672f86f advapi32/tests: Run tests on Win9x/WinMe again. 2009-11-10 15:18:05 +01:00
Rob Shearman cf680ed0f2 advapi32: Implement CheckTokenMembership. 2009-11-09 19:44:11 +01:00
Jeremy White e07e2ac3f7 advapi32/tests: Prevent test failure when computer name and user name are the same. 2009-11-03 22:23:27 +01:00
Paul Vriens 133c0f5401 advapi32/tests: Fix a test failure on Vista and higher. 2009-10-14 11:22:52 +02:00
Paul Vriens 17c1881953 advapi32/tests: Add some extra tests. 2009-10-13 16:23:16 +02:00
Paul Vriens 69568dac91 advapi32/tests: Make some tests table driven. 2009-10-13 16:22:57 +02:00
Andrey Turkin 7de9f842e5 advapi32: Ignore invalid MultipleTrusteeOperation values in SetEntriesInAcl. 2009-10-12 12:14:25 +02:00
Ge van Geldorp 227cbdea9b advapi32/tests: Fix tests on Win7. 2009-08-26 14:56:00 +02:00
Rein Klazes b46e2ef9b1 advapi32: SetEntriesInAclW() should accept account name "CURRENT_USER". 2009-08-17 15:52:57 +02:00
Francois Gouget d475279149 advapi32/tests: Add a trailing '\n' to ok() calls. 2009-06-30 12:39:29 +02:00
Louis Lenders 011c5b8fae advapi32: Add a few tests for GetSidSubAuthority and SetLastError correctly. 2009-06-29 15:08:00 +02:00
Alexandre Julliard ac5002ed2b advapi32/tests: Avoid accessing an uninitialized pointer. 2009-06-16 13:27:32 +02:00
Hans Leidekker f483f71ad2 ntdll: Implement NtQuery/SetInformationToken(TokenDefaultDacl). 2009-04-21 15:41:05 +02:00
Hans Leidekker dbe5453f7c advapi32: Fix buffer size query for CreateWellKnownSid. 2009-04-15 15:56:38 -05:00
Andreas.Rosenberg f212579ae9 advapi32/tests: Added a test to verify result of LookupAccountSid. 2009-04-09 17:38:33 +02:00
Paul Vriens 8955d7c233 advapi32/tests: Fix test failures on W2K. 2009-04-03 13:01:54 +02:00
Aric Stewart 9d9a684ef6 advapi32: Handle fully qualified account names for well known sids in LookupAccountName. 2009-04-01 14:23:31 +02:00
Aric Stewart b540d57c39 advapi32: Modify check_well_known_name test to be more robust on more Windows platforms.
Thanks to Paul Vriens for pointing out the need for this.
2009-04-01 14:23:31 +02:00
Aric Stewart 4ea704d15a advapi32: Alias some sids in LookupAccountName and make comparison case insensitive. 2009-03-30 17:48:24 +02:00
Alexandre Julliard ec1d6aa617 advapi32/tests: GetTokenInformation apparently needs a dword-aligned buffer. 2009-03-04 12:07:20 +01:00
Francois Gouget e3b00de35f advapi32/tests: Use win_skip() to skip over unimplemented functionality. 2009-02-26 12:18:46 +01:00
Juan Lang 58c6467ce6 advapi32: Fix a test failure on systems that are domain members. 2009-02-13 12:59:34 +01:00
Juan Lang fc5ea773e5 advapi32: Support the computer name as an account name in LookupAccountNameW. 2009-02-05 14:24:19 +01:00
Juan Lang 0b32bdc4b4 advapi32: Test LookupAccountName with the computer name as the account name. 2009-02-05 14:22:39 +01:00
Alasdair Sinclair d2915c0f99 advapi32/tests: Fix missing void in empty parameter list. 2009-01-26 15:07:22 +01:00
Nikolay Sivov 800b05c4b5 ntdll: Check pointers in NtAccessCheck to prevent access violation. 2009-01-14 12:20:17 +01:00
Michael Stefaniuc 2fc7b81009 advapi32/tests: Remove superfluous pointer casts. 2009-01-13 15:26:00 +01:00
James Hawkins 954820d027 advapi32: Request the owner and group token size instead of hardcoding the value. 2009-01-02 11:54:31 +01:00
Paul Vriens 2b2f04c514 advapi32/tests: Fix a test failure on NT4. 2008-12-10 10:48:17 +01:00
Paul Vriens d6cfe04621 advapi32/tests: Only skip tests on NT4. 2008-12-10 10:48:10 +01:00
Paul Vriens e38d569590 advapi32/tests: Fix some test failures on NT4. 2008-12-09 12:52:55 +01:00
Paul Vriens 6630470ec4 advapi32/tests: Fix a few test failures on NT4. 2008-12-08 12:00:52 +01:00
Paul Vriens dd56259453 advapi32/tests: Fix some crashes on NT4. 2008-12-01 12:45:46 +01:00
Alistair Leslie-Hughes d0ccdfbd4f advapi32: Correct off by one in LookupPrivilegeValueW. 2008-11-10 13:29:27 +01:00
Detlef Riekenberg 44540a664f advapi32/tests: Fix broken GetLastError tests. 2008-11-10 11:08:30 +01:00
Detlef Riekenberg 21a70825bc advapi32/tests: Fix tests on win9x (GetFileSecurity not implemented). 2008-11-10 11:08:09 +01:00
Alistair Leslie-Hughes 8c57a6ef8b advapi32: Correct spelling of SE_CHANGE_NOTIFY_PRIVILEGE. 2008-11-10 11:08:01 +01:00
Alexandre Julliard adc09cc1b4 advapi32/tests: Avoid sizeof in traces. 2008-11-07 13:34:11 +01:00
Paul Bryan Roberts 6435a5ddab server: Clone file_get_sd() and file_set_fd() for directories. 2008-11-07 12:01:51 +01:00
Paul Bryan Roberts fa9c9f0e4c advapi32/tests: Simple tests of GetFileSecurity()/SetFileSecurity(). 2008-11-07 11:54:39 +01:00
Austin English 955759381d advapi32/tests: fix a couple failures on Vista. 2008-10-28 13:26:01 +01:00
Paul Bryan Roberts f04804f44c advapi32: LookupAccountNameW() - only first user account and well known SIDs accepted. 2008-10-21 13:22:50 +02:00
Paul Bryan Roberts 0e6626958f advapi32: LookupAccountNameW() - NULL account name handled. 2008-10-21 13:22:50 +02:00
Paul Bryan Roberts e9e4da8f36 advapi32: LookupAccountNameW() - return correct domain name length for not-so-well-known SIDs. 2008-10-21 13:22:50 +02:00
Paul Bryan Roberts a1a2dd3509 advapi32: LookupAccountNameW() - passes expected SidTypeUser test. 2008-10-21 13:22:50 +02:00
Paul Bryan Roberts 30e6ca9eeb advapi32: LookupAccountNameW() - add got clause to test. 2008-10-21 13:22:50 +02:00
Paul Bryan Roberts b1542f4f00 ntdll: RtlSetControlSecurityDescriptor() implementation and test. 2008-10-20 13:46:33 +02:00
Paul Bryan Roberts 7e0932d627 advapi32: ConvertStringSecurityDescriptorToSecurityDescriptor - more tests (pass). 2008-10-17 12:49:11 +02:00
Michael Stefaniuc 1988e6ea88 advapi32/tests: Remove superfluous casts of void pointers to other pointer types. 2008-10-16 11:28:59 +02:00
James Hawkins 3c53fcc4c4 advapi32: Fix the process access rights value for Vista. 2008-09-03 13:14:50 +02:00
James Hawkins 1519d9e995 advapi32: Fix several failing tests in Vista. 2008-08-29 13:21:19 +02:00
Paul Vriens 70c7cd2bd6 advapi32/tests: Don't test unimplemented functions. 2008-08-26 10:56:50 +02:00
Michael Stefaniuc 3b8aeb913b advapi/tests: CreateFile returns INVALID_HANDLE_VALUE on error (Smatch). 2008-08-19 12:54:57 +02:00
Alistair Leslie-Hughes 4d6d09553b advapi32: Fix two tests for w2k8. 2008-08-18 17:15:55 +02:00
Dan Hipschman 80c6099b2c advapi32/tests: Add tests for GetSecurityInfo with a NULL security descriptor pointer. 2008-08-18 14:34:10 +02:00
Dan Hipschman 62e5b6270b advapi32: Implement GetSecurityInfo. 2008-08-18 14:34:10 +02:00
James Hawkins 448cfaeb8f advapi32: Fix a failing test in win2k. 2008-07-02 12:04:42 +02:00
James Hawkins 9dc979604c advapi32: Fix a few tests that fail in win2k. 2008-04-11 11:16:14 +02:00
Francois Gouget 304b415284 Assorted spelling fixes. 2008-03-19 11:21:27 +01:00
Paul Vriens 81e0ef44e9 advapi32/tests: Fix a few typos. 2008-03-07 10:52:20 +01:00
Paul Vriens bfc290f6d0 advapi32/tests: Skip not available functions. 2008-03-03 15:38:57 +01:00
Rob Shearman 608ac1e828 advapi32: Fix the AccessCheck tests so that the ACCESS_SYSTEM_SECURITY test now runs (when the user has the Security privilege).
Duplicate the token at SecurityImpersonation impersonation level instead
of SecurityIdentification, otherwise the call to RtlAdjustPrivilege
fails on Windows.
2008-02-19 13:39:24 +01:00
Paul Vriens ba4669860e advapi32/tests: Skip tests when our language isn't LANG_ENGLISH. 2008-02-18 14:13:18 +01:00
Alexandre Julliard 05c7174909 tests: Add a helper routine to wait for a child process and propagate its result correctly. 2008-02-07 12:56:00 +01:00
Rob Shearman b503bcf6e6 advapi32: Implement LookupAccountNameW for well-known groups. 2008-01-23 11:31:42 +01:00
Rob Shearman 28cabdfe9f advapi32: Add a test for LookupAccountNameA on a well-known group. 2008-01-23 11:31:42 +01:00
Rob Shearman 6efa903cf0 advapi32: Implement SetEntriesInAclW. 2008-01-23 11:31:42 +01:00
Rob Shearman 261bf8dad5 advapi32: Add more tests for SetEntriesInAcl. 2008-01-23 11:31:42 +01:00
Paul Vriens d2e0786eb2 advapi32/tests: Don't crash on win98. 2008-01-08 12:54:58 +01:00
Alexandre Julliard c0b12351e0 Avoid size_t types in traces. 2007-12-07 18:49:18 +01:00
Paul Vriens cac17c455d advapi32/tests: Make tests run on win98 again. 2007-11-02 12:38:36 +01:00
Mikolaj Zalewski e7d423ce48 advapi32: Fix CreateWellKnownSid test on Windows XP. 2007-10-26 14:03:46 +02:00
Rob Shearman e51f8490f2 server: Ignore ACEs with the INHERIT_ONLY_ACE flag set during access checks. 2007-10-26 12:46:30 +02:00
Rob Shearman 340122abb7 advapi32: Fix the ACCESS_SYSTEM_SECURITY test by impersonating the token during the call to RtlAdjustPrivileges. 2007-10-26 12:46:30 +02:00
Rob Shearman efed229a08 advapi32: Add a test for access checks with the INHERIT_ONLY_ACE flag. 2007-10-26 12:46:30 +02:00
Rob Shearman 87b15db617 advapi32: Print out the unknown value for sid use in the LookupAccountName test, instead of the known value. 2007-10-25 12:14:34 +02:00
Rob Shearman 06b2da9560 ntdll: Fix RtlValidAcl to accept newer ACL revisions. 2007-10-23 18:18:29 +02:00
Rob Shearman 866ec27044 advapi32: Add some tests for ACL functions. 2007-10-23 18:18:29 +02:00
Rob Shearman 8bfb77b958 advapi32: Runtime link to CreateWellKnownSid in the tests for the function, since it isn't available on all platforms. 2007-10-23 18:18:29 +02:00
Mikołaj Zalewski cf509c29f1 advapi32: Make CreateWellKnownSid create domain sids (with test). 2007-10-22 14:54:39 +02:00
Mikołaj Zalewski b06379b2b3 advapi32: Add a test for CreateWellKnownSid and implement two more SIDs. 2007-10-22 14:54:39 +02:00
Mikołaj Zalewski 8bc12f3f41 advapi32/tests: Define OBJECT_BASIC_INFORMATION in source file as it is not defined in Windows SDK winternl.h. 2007-10-22 14:54:39 +02:00
Mikołaj Zalewski 05cb54fcc8 advapi32/tests: Make the SDDL test pass under Vista. 2007-10-22 14:54:39 +02:00
Rob Shearman 2cecc630b6 advapi32: Don't link to CreateWellKnownSid at compile time in the security tests.
It isn't available on some Windows platforms.
2007-10-16 13:17:29 +02:00
Rob Shearman 12e44bf299 server: Fix token_access_check to allow full access to security descriptors with present but NULL DACLs. 2007-10-16 13:17:22 +02:00
Rob Shearman a006b06080 ntdll: Fix the return code from RtlSetDaclSecurityDescriptor when daclpresent is FALSE. 2007-10-16 13:17:14 +02:00
Rob Shearman d1a3e2ede5 advapi32: Add tests for AccessCheck with NULL DACLs and blank DACLs. 2007-10-16 13:17:09 +02:00
Francois Gouget fda899a778 Assorted spelling fixes. 2007-10-11 19:52:49 +02:00
Lionel Debroux 57a67ebcce advapi32/tests: Fix a typo. 2007-10-03 12:02:48 +02:00
Lionel Debroux 40c66b8977 advapi32/tests: Fix memory leaks (found by Smatch). 2007-10-03 12:02:38 +02:00
Mikolaj Zalewski 8fd1cf0f56 advapi32: Implement GetPrivateObjectSecurity (with test). 2007-09-28 11:26:45 +02:00
Mikolaj Zalewski 0590dc9b5c advapi32: In ConvertStringSecurityDescriptorToSecurityDescriptor "AU" should be checked before "A" (with testcase). 2007-09-28 11:26:25 +02:00
Mikolaj Zalewski 611f57bc20 advapi32/ntdll: GetSecurityDescriptorOwner/Group should fill isDefaulted also for NULL sids. 2007-09-28 11:26:10 +02:00
Mikolaj Zalewski 3c51b2c645 advapi32/ntdll: MakeRelativeSD should preserve NULL pointers (with testcase). 2007-09-28 11:26:00 +02:00
Mikolaj Zalewski 3198809fd5 advapi32: Implement ConvertSecurityDescriptorToStringSecurityDescriptor[AW]. 2007-09-26 12:15:14 +02:00
Mikolaj Zalewski ff3ab48081 advapi32: Make ConvertStringSidToSid not to ignore the first subauthority. 2007-09-25 11:18:53 +02:00
Mikołaj Zalewski 5b4aa62fd2 advapi32: Add some more rights constants for ConvertStringSecurityDescriptorToSecurityDescriptor. 2007-09-24 13:31:30 +02:00
Paul Vriens c213c2c2ab advapi32/tests: Don't use locale dependent string for testing. 2007-08-27 11:57:57 +02:00
Paul Vriens 95af1823ca advapi32/tests: Skip a test when not properly logged in on win9x. 2007-08-17 11:47:51 +02:00
Paul Vriens 4e8b83dcde advapi32/tests: Make tests run again on win95. 2007-08-14 12:45:49 +02:00
Paul Vriens a5aab7fae6 advapi32/tests: Fix typo. 2007-08-08 15:32:04 +02:00
Francois Gouget 5266e57975 Assorted spelling fixes. 2007-07-31 21:37:50 +02:00
Paul Vriens 12dbeef655 advapi32/tests: Run on NT4 again. 2007-07-23 11:48:19 +02:00
Dmitry Timoshkov 433393fd51 advapi32: Rename the test to better represent the tested functionality. 2007-07-20 12:25:50 +02:00
Rob Shearman 4fdf90d406 advapi32: Add tests for ConvertStringSecurityDescriptorToSecurityDescriptor. 2007-07-19 11:55:47 +02:00
Paul Vriens 21492e4904 advapi32/tests: Use skip for not implemented function. 2007-07-05 19:54:31 +02:00
Rob Shearman d521a2c6d3 advapi32: Always set the requested fields of the security descriptor according to the info flags in GetNamedSecurityInfoW.
Also, set the control flags so that other security descriptor
functions can retrieve the info from it.
2007-06-25 23:21:50 +02:00
Paul Vriens 81a95ff6ee advapi32/tests: Add check to see if SetEntriesInAclW is implemented. 2007-03-30 10:09:15 +02:00
Paul Vriens 33b8ec1cb5 advapi32/tests: Add check to see if ImpersonateSelf is implemented. 2007-03-30 10:09:10 +02:00
Paul Vriens bb00c95c45 advapi32/tests: Add check to see if LookupAccountNameA is implemented. 2007-03-29 21:13:54 +02:00
Paul Vriens e54247b10c advapi32/tests: Move check for ERROR_CALL_NOT_IMPLEMENTED to the first call. 2007-03-29 21:13:38 +02:00
Paul Vriens 640cb29bb7 advapi32/tests: Use skip. 2007-03-29 21:13:32 +02:00
Francois Gouget d9e8a0f63e Remove unneeded checks on the GetModuleHandle() return value for cases where we are linked with the dll. 2007-03-28 12:36:13 +02:00
Jacek Caban 2cd033eee1 advapi: Improve SetEntriesInAclW stub. 2007-03-20 12:39:41 +01:00
Detlef Riekenberg fc45352781 advapi32/tests: DuplicateTokenEx is not present on all platforms. 2007-03-17 19:52:01 +01:00
Rob Shearman c2b05d32f0 advapi32: Fix a failing test on Windows caused by the existence of one SID that always has no associated account. 2007-03-16 11:21:02 +01:00
Vitaliy Margolen c0a5671d9c ntdll: More error checking. Properly handle NULL ACLs. 2007-02-28 13:28:33 +01:00
Rob Shearman d342d1413c server: Add get_token_impersonation_level server call for retrieving the impersonation level from a token.
Add tests for GetTokenInformation(TokenImpersonationLevel).
2007-02-21 19:49:37 +01:00
Rob Shearman 6a76a0ac7a server: Check object's security when creating handles.
Don't check object's security when duplicating a handle of the same or 
lower access rights. Based on a patch by Vitaliy Margolen.
2007-02-21 19:49:02 +01:00
Rob Shearman c9b9847dce server: Track the impersonation level of tokens. 2007-02-16 13:09:55 +01:00
Rob Shearman 795b40187e advapi32: Add tests for token impersonation levels and what operations are allowed at each level. 2007-02-15 19:16:52 +01:00
Rob Shearman 4ea7535497 advapi32: Add some more tests for AccessCheck that determine what
token impersonation levels it accepts and to show that it doesn't
accept primary tokens.
2007-02-15 19:15:42 +01:00
Vitaliy Margolen 78a28e6043 advapi32: Add more tests for DuplicateHandle security. 2007-02-15 14:19:29 +01:00
Vitaliy Margolen c04e7e7878 advapi32: Add more tests for granted access mask. Fix test on Wine. 2007-01-25 12:52:27 +01:00
Vitaliy Margolen 2cf11ef771 advapi32: Add few more tests for token access check and fix it on Wine. 2007-01-25 12:42:32 +01:00
Paul Vriens 3d3529d605 advapi32/tests: Free memory after use. 2006-12-06 11:26:48 +01:00
James Hawkins 19a49eb51a advapi32: Add tests for LookupAccountName. 2006-12-01 13:12:04 +01:00