summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2010-06-04 13:26:05 +0200
committerGravatar Nikias Bassen2010-06-04 13:26:05 +0200
commit837d5b0f5a401389802bddb468372a9bcbd418a0 (patch)
treed6a1398ed86e74a13f127dcffc0628e5b20aee02 /tools
parentfadef8f4ee9e986eeb87de11d752a14c63974f3b (diff)
downloadlibimobiledevice-837d5b0f5a401389802bddb468372a9bcbd418a0.tar.gz
libimobiledevice-837d5b0f5a401389802bddb468372a9bcbd418a0.tar.bz2
idevicebackup: verify Info.plist to ensure restoring to same device
Diffstat (limited to 'tools')
-rw-r--r--tools/idevicebackup.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/idevicebackup.c b/tools/idevicebackup.c
index 04e633e..2018bc6 100644
--- a/tools/idevicebackup.c
+++ b/tools/idevicebackup.c
@@ -602,9 +602,19 @@ int main(int argc, char *argv[])
602 printf("Aborting backup. Backup is not compatible with the current device.\n"); 602 printf("Aborting backup. Backup is not compatible with the current device.\n");
603 cmd = CMD_LEAVE; 603 cmd = CMD_LEAVE;
604 } 604 }
605 } else if (info_plist && (cmd == CMD_RESTORE)) {
606 if (!mobilebackup_info_is_current_device(info_plist)) {
607 printf("Aborting restore. Backup data is not compatible with the current device.\n");
608 cmd = CMD_LEAVE;
609 }
605 } 610 }
606 } else { 611 } else {
607 is_full_backup = 1; 612 if (cmd == CMD_RESTORE) {
613 printf("Aborting restore. Info.plist is missing.\n");
614 cmd = CMD_LEAVE;
615 } else {
616 is_full_backup = 1;
617 }
608 } 618 }
609 619
610 uint64_t lockfile = 0; 620 uint64_t lockfile = 0;