ret = LookupAccountSid(NULL, Groups->Groups[i].Sid, Name, &NameLength, Domain, &DomainLength, &SidNameUse);
if (ret)
{
+ pConvertSidToStringSidA(Groups->Groups[i].Sid, &SidString);
trace("%s, %s\\%s use: %d attr: 0x%08x\n", SidString, Domain, Name, SidNameUse, Groups->Groups[i].Attributes);
- LocalFree(SidString);
- }
+ LocalFree(SidString);
+ }
else trace("attr: 0x%08x LookupAccountSid failed with error %d\n", Groups->Groups[i].Attributes, GetLastError());
}
HeapFree(GetProcessHeap(), 0, Groups);
domain = HeapAlloc(GetProcessHeap(), 0, domain_size);
ret = LookupAccountNameA(NULL, computer_name, psid, &sid_size, domain, &domain_size, &sid_use);
ok(ret, "LookupAccountNameA failed: %d\n", GetLastError());
- ok(sid_use == SidTypeDomain, "expected SidTypeDomain, got %d\n", sid_use);
+ ok(sid_use == SidTypeDomain ||
+ (sid_use == SidTypeUser && ! strcmp(computer_name, user_name)), "expected SidTypeDomain for %s, got %d\n", computer_name, sid_use);
HeapFree(GetProcessHeap(), 0, domain);
- HeapFree(GetProcessHeap(), 0, psid);
- }
+ HeapFree(GetProcessHeap(), 0, psid);
+}
/* Well Known names */
if (!pCreateWellKnownSid)
ok(size == 0xdeadbeef, "Expected size to remain unchanged\n");
/* try an invalid inf filename */
- /* do not use NULL as absolute inf filename on win9x (crash) */
+ /* do not use NULL as absolute inf filename on win9x/winMe (crash) */
if ((GetLastError() != ERROR_BAD_PATHNAME) && /* win95 */
- (GetLastError() != ERROR_FILE_NOT_FOUND)) /* win98 */
+ (GetLastError() != ERROR_FILE_NOT_FOUND) && /* win98 */
+ (GetLastError() != ERROR_GENERAL_SYNTAX)) /* winMe */
{
- size = 0xdeadbeef;
- SetLastError(0xbeefcafe);
- ret = SetupGetInfInformationA(NULL, INFINFO_INF_NAME_IS_ABSOLUTE, NULL, 0, &size);
- ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
- ok(size == 0xdeadbeef, "Expected size to remain unchanged\n");
+ size = 0xdeadbeef;
+ SetLastError(0xbeefcafe);
+ ret = SetupGetInfInformationA(NULL, INFINFO_INF_NAME_IS_ABSOLUTE, NULL, 0, &size);
+ ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n");
+ ok(GetLastError() == ERROR_INVALID_PARAMETER,
+ "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ ok(size == 0xdeadbeef, "Expected size to remain unchanged\n");
}
create_inf_file(inf_filename, inf_data1, sizeof(inf_data1) - 1);
ok (pFileStructA->uFileDate == pFileStructW->uDate &&
pFileStructA->uFileTime == pFileStructW->uTime,
"Last write time should match creation time!\n");
-
+
- ok (pFileStructA->uFileDate == pFileStructW->uDate2 &&
- pFileStructA->uFileTime == pFileStructW->uTime2,
- "Last write time should match last access time!\n");
+ /* On FAT filesystems the last access time is midnight
+ local time, so the values of uDate2 and uTime2 will
+ depend on the local timezone. If the times are exactly
+ equal then the dates should be identical for both FAT
+ and NTFS as no timezone is more than 1 day away from UTC.
+ */
+ if (pFileStructA->uFileTime == pFileStructW->uTime2)
+ {
+ ok (pFileStructA->uFileDate == pFileStructW->uDate2,
+ "Last write date and time should match last access date and time!\n");
+ }
+ else
+ {
+ /* Filesystem may be FAT. Check date within 1 day
+ and seconds are zero. */
+ trace ("Filesystem may be FAT. Performing less strict atime test.\n");
+ ok ((pFileStructW->uTime2 & 0x1F) == 0,
+ "Last access time on FAT filesystems should have zero seconds.\n");
+ /* TODO: Perform check for date being within one day.*/
+ }
ok (!lstrcmpW(wszFile[i], pFileStructW->wszName) ||
- !lstrcmpW(wszFile[i], (WCHAR *)(pFileStructW->abFooBar2 + 22)), /* Vista */
+ !lstrcmpW(wszFile[i], (WCHAR *)(pFileStructW->abFooBar2 + 22)) || /* Vista */
+ !lstrcmpW(wszFile[i], (WCHAR *)(pFileStructW->abFooBar2 + 26)), /* Win7 */
"The filename should be stored in unicode at this position!\n");
}
}
{
{ "appbar", func_appbar },
{ "autocomplete", func_autocomplete },
- { "generated", func_generated },
+ { "generated", func_generated },
+ { "progman_dde", func_progman_dde },
{ "shelllink", func_shelllink },
{ "shellpath", func_shellpath },
{ "shfldr_netplaces", func_shfldr_netplaces },