Commit graph

10 commits

Author SHA1 Message Date
Alex Barney 36f00985d3
Update to LibHac 0.17.0 (#3878)
* Update to LibHac 0.17.0

* Don't clear SD card saves when starting the emulator

This was an old workaround for errors that happened when a user's SD card encryption seed changed. SD card saves have been unencrypted for over a year, so we should be fine to remove the workaround.
2022-11-23 18:32:35 +01:00
Alex Barney 3705c20668
Update LibHac to v0.16.0 (#3159) 2022-02-27 00:52:25 +01:00
Alex Barney aa932a6df1
Update to LibHac v0.14.3 (#2925)
* Update to LibHac v0.14.3

* Fix loading NCAs that don't have a data partition
2021-12-23 13:55:50 -03:00
Ac_K 5d08e9b495
hos: Cleanup the project (#2634)
* hos: Cleanup the project

Since a lot of changes has been done on the HOS project, there are some leftover here and there, or class just used in one service, things at wrong places, and more.
This PR fixes that, additionnally to that, I've realigned some vars because I though it make the code more readable.

* Address gdkchan feedback

* addresses Thog feedback

* Revert ElfSymbol
2021-09-15 01:24:49 +02:00
Alex Barney 32cad88cc6
Bugfix LibHac update to 0.13.3 and remove SD card workaround (#2579) 2021-08-26 23:18:49 +02:00
Alex Barney 5e99bff7de
Ignore exceptions when cleaning the SD card saves (#2576) 2021-08-21 01:03:17 +02:00
Alex Barney e0af248e6f
Clean the SD card save directory when opening the emulator (#2564)
Cleans "sdcard:/Nintendo/save" and deletes "sdcard:/save" when opening the emulator.

Works around invalid encryption when keys or the SD card encryption seed are changed.
2021-08-20 13:36:14 -07:00
Alex Barney dadc0e59da
Update to LibHac 0.13.1 (#2475)
* Update to LibHac 0.13.1

* Recreate directories for indexed saves if they're missing on emulator start
2021-08-12 23:56:24 +02:00
Mary 208ba1dde2 Revert LibHac update
Users are facing save destruction on failing extra data update apparently
2021-07-13 16:48:54 +02:00
Alex Barney 19afb3209c
Update to LibHac 0.13.1 (#2328)
Update the LibHac dependency to version 0.13.1. This brings a ton of improvements and changes such as:
- Refactor `FsSrv` to match the official refactoring done in FS.
- Change how the `Horizon` and `HorizonClient` classes are handled. Each client created represents a different process with its own process ID and client state.
- Add FS access control to handle permissions for FS service method calls.
- Add FS program registry to keep track of the program ID, location and permissions of each process.
- Add FS program index map info manager to track the program IDs and indexes of multi-application programs.
- Add all FS IPC interfaces.
- Rewrite `Fs.Fsa` code to be more accurate.
- Rewrite a lot of `FsSrv` code to be more accurate.
- Extend directory save data to store `SaveDataExtraData`
- Extend directory save data to lock the save directory to allow only one accessor at a time.
- Improve waiting and retrying when encountering access issues in `LocalFileSystem` and `DirectorySaveDataFileSystem`.
- More `IFileSystemProxy` methods should work now.
- Probably a bunch more stuff.

On the Ryujinx side:
- Forward most `IFileSystemProxy` methods to LibHac.
- Register programs and program index map info when launching an application.
- Remove hacks and workarounds for missing LibHac functionality.
- Recreate missing save data extra data found on emulator startup.
- Create system save data that wasn't indexed correctly on an older LibHac version.

`FsSrv` now enforces access control for each process. When a process tries to open a save data file system, FS reads the save's extra data to determine who the save owner is and if the caller has permission to open the save data. Previously-created save data did not have extra data created when the save was created.
With access control checks in place, this means that processes with no permissions (most games) wouldn't be able to access their own save data. The extra data can be partially created from data in the save data indexer, which should be enough for access control purposes.
2021-07-13 01:19:28 -07:00