Language:
كتاب الوصايا
55  
Wills and Testaments (Wasaayaa)
(29)
Chapter: The usufruct of an endowment
(29)
باب الْوَقْفِ لِلْغَنِيِّ وَالْفَقِيرِ وَالضَّيْفِ
Sahih al-Bukhari 2773

Narrated Ibn `Umar:

`Umar got some property in Khaibar and he came to the Prophet (ﷺ) and informed him about it. The Prophet said to him, "If you wish you can give it in charity." So `Umar gave it in charity (i.e. as an endowment) the yield of which was to be used for the good of the poor, the needy, the kinsmen and the guests.

حَدَّثَنَا أَبُو عَاصِمٍ، حَدَّثَنَا ابْنُ عَوْنٍ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، أَنَّ عُمَرَ، رضى الله عنه وَجَدَ مَالاً بِخَيْبَرَ، فَأَتَى النَّبِيَّ صلى الله عليه وسلم فَأَخْبَرَهُ، قَالَ ‏ "‏ إِنْ شِئْتَ تَصَدَّقْتَ بِهَا ‏"‏‏.‏ فَتَصَدَّقَ بِهَا فِي الْفُقَرَاءِ وَالْمَسَاكِينِ وَذِي الْقُرْبَى وَالضَّيْفِ‏.‏
Reference : Sahih al-Bukhari 2773
In-book reference : Book 55, Hadith 36
USC-MSA web (English) reference : Vol. 4, Book 51, Hadith 34
  (deprecated numbering scheme)