Emancipating a Slave who is jointly owned, buying a relative, and emancipating during an illness - Section 2 Mishkat al-Masabih 3398

Arabic hadith text
وَعَن سفينة قَالَ: كُنْتُ مَمْلُوكًا لِأُمِّ سَلَمَةَ فَقَالَتْ: أُعْتِقُكَ وَأَشْتَرِطُ عَلَيْكَ أَنْ تَخْدُمَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ مَا عِشْتَ فَقُلْتُ: إِنْ لَمْ تَشْتَرِطِي عَلَيَّ مَا فَارَقْتُ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ مَا عِشْتُ فَأَعْتَقَتْنِي وَاشْتَرَطَتْ عَلَيَّ. رَوَاهُ أَبُو دَاوُدَ وَابْنُ مَاجَهْ
Translation
Safina said

I was a slave of Umm Salama, and she said, “I shall emancipate you, but I stipulate that you must serve God’s Messenger as long as you live” I replied, “Even if you do not make a stipulation with me I shall not leave God’s Messenger as long as I live”. She then emancipated me and made the stipulation with me. Abu Dawud and Ibn Majah transmitted it.