mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Updated ntdll-Junction_Points patchset
This commit is contained in:
parent
3aed8374fa
commit
46ac00b4a4
@ -107,17 +107,17 @@ index 7e122780602..2ce175e1749 100644
|
||||
+
|
||||
+ /* Establish permissions for symlink creation */
|
||||
+ bret = OpenProcessToken( GetCurrentProcess(), TOKEN_ALL_ACCESS, &token );
|
||||
+ ok(bret, "OpenProcessToken failed: %u\n", GetLastError());
|
||||
+ ok(bret, "OpenProcessToken failed: %ld\n", GetLastError());
|
||||
+ bret = LookupPrivilegeValueA( NULL, "SeCreateSymbolicLinkPrivilege", &luid );
|
||||
+ todo_wine ok(bret || broken(!bret && GetLastError() == ERROR_NO_SUCH_PRIVILEGE) /* winxp */,
|
||||
+ "LookupPrivilegeValue failed: %u\n", GetLastError());
|
||||
+ "LookupPrivilegeValue failed: %lu\n", GetLastError());
|
||||
+ if (bret)
|
||||
+ {
|
||||
+ tp.PrivilegeCount = 1;
|
||||
+ tp.Privileges[0].Luid = luid;
|
||||
+ tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
|
||||
+ bret = AdjustTokenPrivileges( token, FALSE, &tp, 0, NULL, NULL );
|
||||
+ ok(bret, "AdjustTokenPrivileges failed: %u\n", GetLastError());
|
||||
+ ok(bret, "AdjustTokenPrivileges failed: %ld\n", GetLastError());
|
||||
+ }
|
||||
+ if ((!bret && GetLastError() != ERROR_NO_SUCH_PRIVILEGE) || GetLastError() == ERROR_NOT_ALL_ASSIGNED)
|
||||
+ {
|
||||
@ -134,15 +134,15 @@ index 7e122780602..2ce175e1749 100644
|
||||
+
|
||||
+ /* Create a directory symbolic link */
|
||||
+ bret = CreateSymbolicLinkW( linkW, target_dirW, SYMBOLIC_LINK_FLAG_DIRECTORY );
|
||||
+ ok(bret, "Failed to create directory symbolic link! (0x%x)\n", GetLastError());
|
||||
+ ok(bret, "Failed to create directory symbolic link! (0x%lx)\n", GetLastError());
|
||||
+ bret = RemoveDirectoryW( linkW );
|
||||
+ ok(bret, "Failed to remove directory symbolic link! (0x%x)\n", GetLastError());
|
||||
+ ok(bret, "Failed to remove directory symbolic link! (0x%lx)\n", GetLastError());
|
||||
+
|
||||
+ /* Create a file symbolic link */
|
||||
+ bret = CreateSymbolicLinkW( linkW, target_fileW, 0x0 );
|
||||
+ ok(bret, "Failed to create file symbolic link! (0x%x)\n", GetLastError());
|
||||
+ ok(bret, "Failed to create file symbolic link! (0x%lx)\n", GetLastError());
|
||||
+ bret = DeleteFileW( linkW );
|
||||
+ ok(bret, "Failed to remove file symbolic link! (0x%x)\n", GetLastError());
|
||||
+ ok(bret, "Failed to remove file symbolic link! (0x%lx)\n", GetLastError());
|
||||
+
|
||||
+cleanup:
|
||||
+ DeleteFileW( target_fileW );
|
||||
|
Loading…
Reference in New Issue
Block a user