Recent years have witnessed the emergence and rapid growth of distributed service infrastructures such as mobile ad hoc networks, P2P, PlanetLab and Grids. In such distributed infrastructures, an entity needs to utilize the services provided by other entities or the infrastructures, where trust is an important factor. There exists a gap between current trust research focusing limitedly on specific applications and a systematic, adaptable and customizable trust framework. The first limitation of current research is the lack of characterizing service-specific trust features. The second limitation lies in the restricted evaluation formulae of trust values. The trust value formulae are usually drawn from a particular mathematical model and may not satisfy some desirable properties. The third limitation is the lack of flexibility and adaptability of trust models. In this paper a comprehensive trust model is presented to address these limitations and provide a trust-based environment for distributed service infrastructures. Our simulation results demonstrate the robustness of the trust model against various attacks.