We present an extension for nonlinear optimization under linear constraints, of an algorithm for quadratic programming using a trust region idea, introduced by Ye and Tse and extended by Bonnans and Bouhtou. Due to the nonliearity of the cost we use a linesearch in order to reduce the step if necessary. We prove that, under suitable hypotheses, the algorithm converges to a point satisfying the first-order optimality system and we analyse under which conditions the unit stepsize will be asymptotically accepted.