It is narrated from Sayyiduna Amr bin Awf bin Milhah al-Muzani (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "The Muslims are bound by their conditions, except a condition that makes something lawful unlawful or something unlawful lawful; and reconciliation between people is permissible, except a reconciliation that makes something unlawful lawful or something lawful unlawful."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 14102