id put a two joint skeleton straight through the rifle then paint in the weights properly so the rifle doesnt bend and stretch. Then parent the first joint to the soldiers front hand then the second joint to the second hand. If the hands float through the rifle this is just a key frame animation issue which could easily be fixed....................... well maybe not to easily but can be fixed hope this helps you i havnt tried this method out its just an idea so tell me if it works lol