Well, briefly, validity of the sacrament of holy orders depends entirely on three things, the sacramental form of the ordination rite employed, the matter which is merely the laying on off hands, and the correct intention of the minister of this sacrament, who in this case is a Bishop.
If these three are present, all else to the contrary notwithstanding, the sacerdotal character is validly conferred, and the person is a true priest. If any one is lacking, he remains a mere layman, and consequently would be unable to forgive sins in the sacrament of penance and validly confect the holy Eucharist in the Blessed Sacrament.
So, briefly, provided a Bishop lays his hands on a candidate for the priesthood, intends to make him a priest, and uses a valid ordination rite, the person becomes a priest.
The only controversy arises today because some allege that the new rite of ordination of priests (1968) is invalid. Yet, between the essential form of the 1968 rite and the essential form of the 1947 rite there is only one word of difference, a word which is trivial to the meaning.
Everyone knows the traditional rite is valid and it has always been used since the earliest ages. Whether or not the 1968 rite of consecration of Bishops is valid is much disputed, though in my opinion it can be shown this rite itself is based on a quite ancient usage, and is therefore part of the liturgical Tradition of the early Church.
So, yes, priestly lineage is important in such considerations. But if the 1968 rite is valid, then, practically speaking, probably most priests you encounter, including at the Indult or elsewhere in the Church, even notoriously bad ones, just like the traitor Judas was a bad and apostate priest, are still real priests.