The late-night vote was a step towards bringing the 40-day partial shutdown - and long security lines at US airports - to an end.