Restricting unauthorised execution of programs