Skip to content

Commit

Permalink
fix slightly incorrect handling on sha1 devices
Browse files Browse the repository at this point in the history
  • Loading branch information
asdfugil committed Apr 6, 2024
1 parent 3a2fd2b commit 1a50684
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/payload/jailbreakd/bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ pthread_join(tarLogThread, NULL); \
JOIN_TAR_ZSTD;

#define REMOVE_TPATH do { \
if ((pinfo->flags & palerain_option_rootless) && strlen(tarPath) > 118); \
if ((pinfo->flags & palerain_option_rootless) && strstr(tarPath, "/jb-")); \
removefile(tarPath, NULL, REMOVEFILE_RECURSIVE);\
} while(0)

Expand All @@ -269,7 +269,7 @@ removefile(tarPath, NULL, REMOVEFILE_RECURSIVE);\
ret = rename(bootstrapExtractedPath, finalBootstrapPath);
PALERA1ND_LOG_INFO("rename %s -> %s", bootstrapExtractedPath, finalBootstrapPath);

if (strlen(tarPath) > 118)
if (strstr(tarPath, "/jb-"))
rmdir(extrationVarPath);

BOOTSTRAP_ASSURE_F_CLEANUP(ret, REMOVE_TPATH, errno, "rename %s -> %s failed", bootstrapExtractedPath, finalBootstrapPath);
Expand Down

0 comments on commit 1a50684

Please sign in to comment.