What would happen to a soldier who kept a weapon on base?
You can keep a personally owned firearm on post, but there are significant rules you have to comply with to do so, including registration. If you live in the barracks you have to store your POF in the arms room.
I don’t know these days, but back when military people kept guns in their base housing.