(self)
return newly_set == elf_loader
Restore all executables and libs to the original ld.so pathname
Restore all executables and libs to the original ld.so pathname
Restore all executables and libs to the original ld . so pathname
def restore_binaries(self):
        """Restore all executables and libs to the original ld.so pathname"""
        patchelf_exec = self.select_patchelf()
        elf_loader = self.get_original_loader()
        last_path = self.get_patch_last_path()
        if last_path:
            cmd = [patchelf_exec, "--restore-root-prefix",
                   last_path + "/ROOT", "#f"]
        else:
            cmd = [patchelf_exec, "--restore-root-prefix",
                   self._container_root, "#f"]
        self._walk_fs(cmd, self._container_root, self.BIN | self.LIB)
        newly_set = self.guess_elf_loader()
        if newly_set == elf_loader:
            FileUtil(self._container_patch_path).remove()
            FileUtil(self._container_patch_time).remove()
        return newly_set == elf_loader
def restore_binaries ( self ) : patchelf_exec = self . select_patchelf ( ) elf_loader = self . get_original_loader ( ) last_path = self . get_patch_last_path ( ) if last_path : cmd = [ patchelf_exec , "--restore-root-prefix" , last_path + "/ROOT" , "#f" ] else : cmd = [ patchelf_exec , "--restore-root-prefix" , self . _container_root , "#f" ] self . _walk_fs ( cmd , self . _container_root , self . BIN | self . LIB ) newly_set = self . guess_elf_loader ( ) if newly_set == elf_loader : FileUtil ( self . _container_patch_path ) . remove ( ) FileUtil ( self . _container_patch_time ) . remove ( ) return newly_set == elf_loader