C.I.A. Played Major Role Fighting Militants in Libya Attack