Glenn Greenwald's partner David Miranda to take legal action