Libya security chief gets 7-year sentence