Skip to content

Commit

Permalink
Also ensure the permissions of /private and /private/preboot are correct
Browse files Browse the repository at this point in the history
  • Loading branch information
opa334 committed Mar 4, 2024
1 parent 762024d commit e13f079
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Application/Dopamine/Jailbreak/DOBootstrapper.m
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,15 @@ - (NSError *)ensurePrivatePrebootIsWritable

- (void)fixupPathPermissions
{
// Ensure the following paths are owned by root:wheel and have permissions of 755:
// /private
// /private/preboot
// /private/preboot/UUID
// /private/preboot/UUID/dopamine-<UUID>
// /private/preboot/UUID/dopamine-<UUID>/procursus

NSString *tmpPath = NSJBRootPath(@"/");
while (![tmpPath isEqualToString:@"/private/preboot"]) {
while (![tmpPath isEqualToString:@"/"]) {
struct stat s;
stat(tmpPath.fileSystemRepresentation, &s);
if (s.st_uid != 0 || s.st_gid != 0) {
Expand Down

0 comments on commit e13f079

Please sign in to comment.