In the 'Tale of the Years' Sam is still living in Bag End. There's a passage which mentions him riding out from there to go to Gondor to see Aragorn. I also thought there was a passage somewhere which refers to Frodo giving Sam the keys to Bag End, although I cannot for the moment remember which text it is in. It may even be in a version in 'The History of Middle Earth'. Mawr yw ein braint i berthyn i'r gwm Llynfi