I am not an Islamic scholar. I am relying totally on The reliance of the traveller and tools of the worshipper. This appears to be an authoritative source. The following view on the merits of The reliance of the traveller appears to accord with those of amazon reviewers:
It is considered an authoritative source on Sunni Islamic law, because it is certified as such by Al-Azhar University in Cairo. There is no higher authority on Sunni Islamic doctrine than Al-Azhar; it is the closest equivalent to the Vatican that can be found in Islam.
So whatever you find in Reliance of the Traveller is definitive Islamic law. No Sunni Muslim jurist would argue against anything cited there.
Source: The ESW Defense File
Here is what the The reliance of the traveller has to say about fornication and sodomy:
(O: Jihad means to war against non-Muslims, and is etymologically derived from the word mujahada signifying warfare to establish the religion. And it is the lesser jihad. As for the greater jihad, it is spiritual warfare against the lower self (nafs), which is why the Prophet (Allah bless him and give him peace) said as he was returning from jihad.
“We have returned from the lesser jihad to the greater jihad.”
The scriptural basis for jihad, prior to scholarly consensus (def: b7) is such Koranic verses as:
(1) “Fighting is prescribed for you” (Koran 2:216);
(2) “Slay them wherever you find them” (Koran 4:89);
(3) “Fight the idolators utterly” (Koran 9:36);
and such hadiths as the one related by Bukhari and Muslim that the Prophet (Allah bless him and give him peace) said:
“I have been commanded to fight people until they testify that there is no god but Allah and that Muhammad is the Messenger of Allah, and perform the prayer, and pay zakat. If they say it, they have saved their blood and possessions from me, except for the rights of Islam over them. And their final reckoning is with Allah”;and the hadith reported by Muslim,“To go forth in the morning or evening to fight in the path of Allah is better than the whole world and everything in it.”Details concerning jihad are found in the accounts of the military expeditions of the Prophet (Allah bless him and give him peace), including his own martial forays and those on which he dispatched others. The former consist of the ones he personally attended, some twenty-seven (others say twenty-nine) of them. He fought in eight of them, and killed only one person with his noble hand, Ubayy ibn Khalaf, at the battle of Uhud. On the latter expeditions he sent others to fight, himself remaining at Medina, and these were forty-seven in number.)
The Obligatory Character of Jihad
o9.1 Jihad is a communal obligation (def: c3.2). When enough people perform it to successfully accomplish it, it is no longer obligatory upon others (O: the evidence for which is the Prophet’s saying (Allah bless him and give him peace),
“He who provides the equipment for a soldier in jihad has himself performed jihad,”
and Allah Most High having said:
“Those of the believers who are unhurt but sit behind are not equal to those who fight in Allah’s path with their property and lives. Allah has preferred those who fight with their property and lives a whole degree above those who sit behind. And to each, Allah has promised great good” (Koran 4:95).If none of those concerned perform jihad, and it does not happen at all, then everyone who is aware that it is obligatory is guilty of sin, if there was a possibility of having performed it. In the time of the Prophet (Allah bless him and give him peace) jihad was a communal obligation after his emigration (hijra) to Medina. As for subsequent times, there are two possible states in respect to non-Muslims.The first is when they are in their own countries, in which case jihad (def: o9.8) is a communal obligation, and this is what our author is speaking of when he says, “Jihad is a communal obligation,” meaning upon the Muslims each year. The second state is when non-Muslims invade a Muslim country or near to one, in which case jihad is personally obligatory (def: c3.2) upon the inhabitants of that country, who must repel the non-Muslims with whatever they can).
o9.2 Jihad is personally obligatory upon all those present in the battle lines (A: and to flee is an enormity (dis: p11)) (O: provided one is able to fight. If unable, because of illness or the death of one’s mount when not able to fight on foot, or because one no longer has a weapon, then one may leave. One may also leave if the opposing non-Muslim army is more than twice the size of the Muslim force).
o9.3 Jihad is also (O: personally) obligatory for everyone (O: able to perform it, male or female, old or young) when the enemy has surrounded the Muslims (O: on every side, having entered our territory, even if the land consists of ruins, wilderness, or mountains, for non-Muslim forces entering Muslim lands is a weighty matter that cannot be ignored, but must be met with effort and struggle to repel them by every possible means. All of which is if conditions permit gathering (A: the above-mentioned) people, provisioning them, and readying them for war. If conditions do not permit this, as when the enemy has overrun the Muslims such that they are unable to provision or prepare themselves for war, then whoever is found by non-Muslim and knows he will be killed if captured is obliged to defend himself in whatever way possible. But if not certain that he will be killed, meaning that he might or might not be, as when he might merely be taken captive, and he knows he will be killed if he does not surrender, then he may either surrender or fight. A woman too has a choice between fighting or surrendering if she is certain that she will not be subjected to an indecent act if captured. If uncertain that she will be safe from such an act, she is obliged to fight, and surrender is not permissible).
Who is Obliged to Fight in Jihad
o9.4 Those called upon (O: to perform jihad when it is a communal obligation are every able bodied man who has reached puberty and is sane.
o9.5 The following may not fight in jihad:
(1) Someone in debt, unless his creditor gives him leave;
(2) or someone with at least one Muslim parent, until they give their permission;
unless the Muslims are surrounded by the enemy, in which case it is permissible for them to fight without permission.
o9.6 It is offensive to conduct a military expedition against hostile non-Muslims without the caliph’s permission (A: though if there is no caliph (def: o25), no permission is required).
o9.7 Muslims may not seek help from non-Muslims allies unless the Muslims are considerably outnumbered and the allies are of goodwill towards the Muslims.
The Objectives of Jihad
o9.8 The caliph (o25) makes war upon Jews, Christians, and Zoroastrians (N: provided he has first invited them to enter Islam in faith and practice, and if they will not, then invited them to enter the social order of Islam by paying the non-Muslim poll tax (jizya, def: o11.4)-which is the significance of their paying it, not the money itself-while remaining in their ancestral religions) (O: and the war continues)until they become Muslim or else pay the non-Muslim poll tax (O: in accordance with the word of Allah Most High,
“Fight those who do not believe in Allah and the Last Day and who forbid not what Allah and His messenger have forbidden-who do not practice the religion of truth, being of those who have been given the Book-until they pay the poll tax out of hand and are humbled” (Koran 9.29),the time and place for which is before the final descent of Jesus (upon whom be peace). After his final coming, nothing but Islam will be accepted from them, for taking the poll tax is only effective until Jesus’ descent (upon him and our Prophet be peace), which is the divinely revealed law of Muhammad. The coming of Jesus does not entail a separate divinely revealed law, for he will rule by the law of Muhammad. As for the Prophet’s saying (Allah bless him and give him peace),
“I am the last, there will be no prophet after me,”this does not contradict the final coming of Jesus (upon whom be peace), since he will not rule according to the Evangel, but as a follower of our Prophet (Allah bless him and give him peace)).
o9.9 The caliph fights all other peoples until they become Muslim (O: because they are not a people with a Book, nor honored as such, and are not permitted to settle with paying the poll tax (jizya)) (n: though according to the Hanafi school, peoples of all other religions, even idol worshippers, are permitted to live under the protection of the Islamic state if they either become Muslim or agree to pay the poll tax, the sole exceptions to which are apostates from Islam and idol worshippers who are Arabs, neither of whom has any choice but becoming Muslim (al-Hidaya sharh Bidaya al-mubtadi’ (y21), 6.48-49)).